AIM
|
#include <TopLocations.h>
Public Member Functions | |
TopLocations (std::string name="top_locations") | |
virtual void | addData (const AIMData &newData) |
void | doTick () |
virtual AIMValue | setProperty (const std::string &key, AIMValue value) |
virtual void | setProperties (const std::map< std::string, AIMValue > &properties) |
std::vector< AIMValue > | getRequirements () const |
bool | requirementsAreUpdated (bool reset=true) const |
std::map< std::string, AIMValue > & | getProperties () |
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 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 std::string | getName () const |
Static Public Attributes | |
static const std::string | PROPERTY_MAX_INTERPOLATION_INTERVAL |
static const std::string | PROPERTY_RESIDING_UPDATE_INTERVAL = "min visit time interval" |
static const std::string | PROPERTY_MIN_VISIT_TIME = "min_initial_time" |
static const std::string | PROPERTY_MAX_NR_TOP = "max_nr_top" |
static const std::string | PROPERTY_LAST_TOP_LOCATIONS = "last data point" |
static const double | DEFAULT_MAX_INTERPOLATION_INTERVAL = 2 * 60 * 60 |
static const double | DEFAULT_MIN_VISIT_TIME = 5 * 60 |
static const double | DEFAULT_RESIDING_UPDATE_INTERVAL = 60 * 60 |
static const int | DEFAULT_MAX_NR_TOP = 100 |
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 |
TopLocations produces a ranked list of visited locations based on a position sensor. A visit means that some time was spend at the location, in contrast to just passing by the location.
Output:
An ordered json array where each elements contains the following fields:
A new data point is produced whenever
Properties:
|
virtual |
Add data
This method adds data to the input queue of the AI-module The AIMData object
AIMData | data The input data |
Reimplemented from AIM.
|
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 |
TODO: create function import properties
Reimplemented from AIM.
|
virtual |
Get the requirements of the module.
Reimplemented from AIM.
|
virtual |
Return wether the requirements have been updated since the last call to this function.
reset | If false, don't reset wether the requirements have been updated. |
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.
|
static |