DUECA/DUSIME
|
For requesting specific state changes of the DUSIME control process. More...
#include <SimStateRequest.hxx>
Public Types | |
typedef SimStateRequest | __ThisDCOType__ |
typedef for internal reference | |
Public Member Functions | |
SimStateRequest () | |
default constructor. | |
SimStateRequest (const SimulationState &request) | |
Constructor with arguments. | |
SimStateRequest (const SimStateRequest &o) | |
copy constructor. | |
SimStateRequest (::dueca::AmorphReStore &r) | |
constructor to restore an SimStateRequest from amorphous storage. | |
~SimStateRequest () | |
destructor. | |
void | packData (::dueca::AmorphStore &s) const |
packs the SimStateRequest into amorphous storage. | |
void | packDataDiff (::dueca::AmorphStore &s, const SimStateRequest &ref) const |
packs the SimStateRequest into amorphous storage. | |
void | unPackData (::dueca::AmorphReStore &s) |
unpacks the SimStateRequest from an amorphous storage. | |
void | unPackDataDiff (::dueca::AmorphReStore &s) |
unpacks the differences for SimStateRequest from an amorphous storage. | |
bool | operator== (const SimStateRequest &o) const |
Test for equality. | |
bool | operator!= (const SimStateRequest &o) const |
Test for inequality. | |
SimStateRequest & | operator= (const SimStateRequest &o) |
Assignment operator. | |
std::ostream & | print (std::ostream &s) const |
prints the SimStateRequest to a stream. | |
Static Public Member Functions | |
static void * | operator new (size_t size) |
new operator "new", which places objects not on a heap, but in one of the memory arenas. | |
static void | operator delete (void *p) |
new operator "delete", to go with the new version of operator new. | |
static void * | operator new (size_t size, SimStateRequest *&o) |
placement "new", needed for stl. | |
Public Attributes | |
SimulationState | request |
requested simulation state | |
Static Public Attributes | |
static const char *const | classname |
The name of this class. | |
static const uint32_t | magic_check_number |
a "magic" number, hashed out of the class definition, that will be used to check consistency of the sent objects across the dueca nodes. | |
For requesting specific state changes of the DUSIME control process.
The SimStateRequest channel is a channel with event data, and with zero or more entries. A receiving token is defined by the DUSIME code.
You can use this channel to request changes in the DUSIME state machine. In your header file, declare a writing token:
In your constructor, initialize the token with
At the appropriate moment, you can request a DUSIME state change with the desired final state (HoldCurrent, Advance, Replay or Inactive) as data in the request. Note that state changes, due to the nature of DUECA's distributed processing, cannot be instantaneous. The effect of sending the state change would be that of pressing the button at that moment.
new operator "new", which places objects not on a heap, but in one of the memory arenas.
This to speed up memory management.
void dueca::SimStateRequest::packDataDiff | ( | ::dueca::AmorphStore & | s, |
const SimStateRequest & | ref ) const |
packs the SimStateRequest into amorphous storage.
only differences with a previous object are packed.