AIM
|
#include <LocationTrace.h>
Public Member Functions | |
LocationTrace (std::string name="location_trace") | |
void | doTick () |
virtual AIMValue | setProperty (const std::string &key, AIMValue value) |
virtual void | setProperties (const std::map< std::string, AIMValue > &properties) |
Public Member Functions inherited from AIM | |
AIM (std::string name="") | |
AIM (const AIM &other) | |
AIM & | operator= (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 void | addData (const AIMData &data) |
virtual std::string | exportProperties () |
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 AIM * | getDataSubscriber (std::string subscriber) |
virtual const std::map < std::string, AIMValue > & | getProperties () |
virtual std::string | getName () const |
virtual std::vector< AIMValue > | getRequirements () const |
virtual bool | requirementsAreUpdated (bool reset=true) const |
Static Public Attributes | |
static const std::string | PROPERTY_STAY_UPDATE_INTERVAL = "stay update interval" |
static const std::string | PROPERTY_LOCATIONS = "locations" |
static const double | DEFAULT_STAY_UPDATE_INTERVAL = -1 |
static const std::string | PROPERTY_TEST_USE_FILTER = "use filter" |
static const std::string | PROPERTY_TEST_MIN_DISTANCE_BEFORE_LEAVE = "min distance" |
static const std::string | PROPERTY_TEST_MIN_TIME_BEFORE_ARRIVAL = "min time before arrival" |
static const std::string | PROPERTY_TEST_IMMOBILE_RADIUS = "immobile radius" |
static const double | DEFAULT_TEST_USE_FILTER = true |
static const double | DEFAULT_TEST_MIN_DISTANCE_BEFORE_LEAVE = 100 |
static const double | DEFAULT_TEST_MIN_TIME_BEFORE_ARRIVAL = 10 * 60 |
static const double | DEFAULT_TEST_IMMOBILE_RADIUS = 100 |
static const std::string | EVENT_ARRIVE = "arrive" |
static const std::string | EVENT_APPEAR = "appear" |
static const std::string | EVENT_DEPART = "depart" |
static const std::string | EVENT_DISAPPEAR = "disappear" |
static const std::string | EVENT_STAY = "stay" |
static const std::string | FEEDBACK_SENSOR = "location_trace_feedback" |
static const std::string | VERSION = "1.0.1" |
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< AIMData > | AIMDataQueue |
typedef std::queue< AIMValue > | AIMValueQueue |
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< AIMValue > | requirements |
bool | requirementsUpdated |
std::map< std::string, AIM * > | dataSubscribers |
std::map< std::string, AIMValue > | properties |
InputDataQueue | inputDataQueue |
AIMDataQueue | outputDataQueue |
LocationTrace outputs a list of location transitions and updates. E.g. entered location x, still at location x, leave location x.
Output:
An ordered json array where each elements contains the following fields:
A new data point is produced whenever an event occurs, or an update
Properties:
|
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.
|
virtual |
Set the module properties
Set the defined properties. Old property values will remain if no new values are specified for a property.
map | properties The properties to set |
Reimplemented from AIM.
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.
string | key The key of the property |
AIMValue | value The value of the property |
Reimplemented from AIM.