Fawkes API
Fawkes Development Version
|
24 #include <interfaces/ExitSimulationInterface.h>
26 #include <core/exceptions/software.h>
44 ExitSimulationInterface::ExitSimulationInterface() : Interface()
46 data_size =
sizeof(ExitSimulationInterface_data_t);
48 data = (ExitSimulationInterface_data_t *)
data_ptr;
53 unsigned char tmp_hash[] = {0xbf, 0xa, 0x70, 0x60, 0x7f, 0xe8, 0xb2, 0xaf, 0x54, 0xce, 0x2d, 0xf7, 0xff, 0x79, 0x84, 0x40};
58 ExitSimulationInterface::~ExitSimulationInterface()
70 return data->shutdown_initiated;
97 if ( strncmp(
"ExitSimulationMessage",
type, INTERFACE_MESSAGE_TYPE_SIZE_ - 1) == 0 ) {
101 "message type for this interface type.",
type);
117 memcpy(data, oi->data,
sizeof(ExitSimulationInterface_data_t));
137 data_size =
sizeof(ExitSimulationMessage_data_t);
140 data = (ExitSimulationMessage_data_t *)
data_ptr;
158 data = (ExitSimulationMessage_data_t *)
data_ptr;
void * data_ptr
Pointer to local memory storage.
ExitSimulationInterface Fawkes BlackBoard Interface.
Base class for all messages passed through interfaces in Fawkes BlackBoard.
bool is_shutdown_initiated() const
Get shutdown_initiated value.
void * data_ptr
Pointer to memory that contains local data.
virtual void copy_values(const Interface *other)
Copy values from other interface.
message_data_ts_t * data_ts
data timestamp aliasing pointer
~ExitSimulationMessage()
Destructor.
virtual Message * clone() const
Clone this message.
const char * type() const
Get type of interface.
Timestamp data, must be present and first entries for each interface data structs!...
virtual const char * enum_tostring(const char *enumtype, int val) const
Convert arbitrary enum value to string.
bool data_changed
Indicator if data has changed.
Fawkes library namespace.
void set_hash(unsigned char *ihash)
Set hash.
unsigned int data_size
Size of memory needed to hold all data.
Base class for all Fawkes BlackBoard interfaces.
virtual Message * create_message(const char *type) const
Create message based on type name.
void add_fieldinfo(interface_fieldtype_t type, const char *name, size_t length, void *value, const char *enumtype=0, const interface_enum_map_t *enum_map=0)
Add an entry to the info list.
virtual bool message_valid(const Message *message) const
Check if message is valid and can be enqueued.
ExitSimulationMessage()
Constructor.
size_t maxlenof_shutdown_initiated() const
Get maximum length of shutdown_initiated value.
void add_messageinfo(const char *name)
Add an entry to the message info list.
ExitSimulationMessage Fawkes BlackBoard Interface Message.
bool change_field(FieldT &field, const DataT &value)
Set a field and return whether it changed.
void set_shutdown_initiated(const bool new_shutdown_initiated)
Set shutdown_initiated value.