AIM
 All Classes Functions Variables Typedefs Enumerations
PhysicalActivity Class Reference
Inheritance diagram for PhysicalActivity:
AIM

Public Member Functions

 PhysicalActivity (std::string name="activity")
 
AIMValue setProperty (const std::string &key, AIMValue value)
 
AIMValue getProperty (std::string key)
 
std::string exportProperties ()
 
void setProperties (const std::map< std::string, AIMValue > &properties)
 
void addData (const AIMData &data)
 
void doTick ()
 
- Public Member Functions inherited from AIM
 AIM (std::string name="")
 
 AIM (const AIM &other)
 
AIMoperator= (const AIM &rhs)
 
virtual void addDataSubscriber (const std::string &key, AIM *subscriber)
 
virtual void removeDataSubscriber (const std::string &key)
 
virtual AIMValue getProperty (std::string key) const
 
virtual void sendData ()
 
virtual std::vector< std::pair
< std::string, AIMValue > > 
getOutputData (bool clear_output=false)
 
virtual std::vector< std::pair
< std::string, AIMValue > > 
getInputData (bool clear_input=false)
 
virtual AIMgetDataSubscriber (std::string subscriber)
 
virtual const std::map
< std::string, AIMValue > & 
getProperties ()
 
virtual std::string getName () const
 
virtual std::vector< AIMValuegetRequirements () const
 
virtual bool requirementsAreUpdated (bool reset=true) const
 

Static Public Attributes

static const std::string PROPERTY_MODEL = "model"
 
static const std::string PROPERTY_IS_LEARNING = "isLearning"
 
- Static Public Attributes inherited from AIM
static const std::string VERSION = AIM_VERSION
 

Additional Inherited Members

- Public Types inherited from AIM
typedef std::pair< std::string,
AIMValue
AIMData
 
typedef std::queue< AIMDataAIMDataQueue
 
typedef std::queue< AIMValueAIMValueQueue
 
typedef std::map< std::string,
AIMValueQueue
InputDataQueue
 
- Protected Member Functions inherited from AIM
void setDataSubscribers (const std::map< std::string, AIM * > &subscribers)
 
void setInputDataQueue (const InputDataQueue &inputDataQueue)
 
void setOutputDataQueue (const AIMDataQueue &outputDataQueue)
 
- Protected Attributes inherited from AIM
std::string name
 
std::vector< AIMValuerequirements
 
bool requirementsUpdated
 
std::map< std::string, AIM * > dataSubscribers
 
std::map< std::string, AIMValueproperties
 
InputDataQueue inputDataQueue
 
AIMDataQueue outputDataQueue
 

Member Function Documentation

void PhysicalActivity::addData ( const AIMData data)
virtual

Add data

This method adds data to the input queue of the AI-module The AIMData object

Parameters
AIMDatadata The input data

Reimplemented from AIM.

void PhysicalActivity::doTick ( )
virtual

Do an AIM tick

This method is called to tick the AI-module to do its processing. During this tick the AI module grabs it's input data, does its processing, and sends the data to its data receivers. This method can be used in combination with AIM priorities, to streamline the data flow and timers for timed AI modules.

Reimplemented from AIM.

std::string PhysicalActivity::exportProperties ( )
virtual

Export properties

This method exports the properties of the AI-module in JSON format.

Returns
string The export string in JSON format

Reimplemented from AIM.

void PhysicalActivity::setProperties ( const std::map< std::string, AIMValue > &  properties)
virtual

Set the module properties

Set the defined properties. Old property values will remain if no new values are specified for a property.

Parameters
mapproperties The properties to set

Set the properties for this module and for each submodule

Reimplemented from AIM.

AIMValue PhysicalActivity::setProperty ( const std::string &  key,
AIMValue  value 
)
virtual

Set property

This method sets the value of a property. An AIMValue response value is returned and it can have the type EMPTY if no response data is present.

Parameters
stringkey The key of the property
AIMValuevalue The value of the property
Returns
AIMValue An optional response value.

Reimplemented from AIM.


The documentation for this class was generated from the following files: