Reactive layer module to monitor basic sensations.
More...
Reactive layer module to monitor basic sensations.
Version:1.0
- Author
- Clément Moulin-Frier cleme.nosp@m.nt.m.nosp@m.oulin.nosp@m.frie.nosp@m.r@gma.nosp@m.il.c.nosp@m.om, Jordi-Ysard Puigbò jordi.nosp@m.ysar.nosp@m.d.pui.nosp@m.gbo@.nosp@m.upf.e.nosp@m.du
- Copyright
- Released under the terms of the GNU GPL v2.0
Description
This module is designed to pre-process all sensory requirements for the reactiveLayer modules (allostaticController and behaviorManager). It's main module (opcSensation) parses the OPC for entities and relays the relevant information to the corresponding modules (e.g. quantity of people or objects to allostaticController for internal variable decay, name and entity type to behaviorManager for interaction). This module can parse the data independently but behaviorManager and allostaticController strongly depend on it. Each sensation module to be used must be listed in the config file (see default.ini as an example with opcSensation). Jordi and Clement contributed equally to the development of this module.
Parameters
- – name : name of the module
- – period : change the update rate of this module
Input Ports
- /SensationManager/rpc [Bottle] [default carrier:tcp]: Response port. Supported commands:
- help
- ['is'] [entity name] [state]: Returns true or false if the entity is in the state requested (e.g. present)
Output Ports
Services
◆ OpcSensation
Definition at line 21 of file opcSensation.h.
◆ OpcSensation()
OpcSensation::OpcSensation |
( |
| ) |
|
|
inline |
◆ close_ports()
void OpcSensation::close_ports |
( |
| ) |
|
|
virtual |
◆ configure()
void OpcSensation::configure |
( |
| ) |
|
|
virtual |
◆ get_property()
int OpcSensation::get_property |
( |
std::string |
name, |
|
|
std::string |
property |
|
) |
| |
get_property quickly answers a boolean query
- Parameters
-
name | entity name |
property | entity property (e.g. present or known) |
- Returns
- int 1 if entity has the given property
Definition at line 145 of file opcSensation.cpp.
◆ publish()
void OpcSensation::publish |
( |
| ) |
|
|
virtual |
◆ k_entities
yarp::os::Bottle OpcSensation::k_entities |
◆ kp_entities
yarp::os::Bottle OpcSensation::kp_entities |
◆ o_positions
yarp::os::Bottle OpcSensation::o_positions |
◆ p_entities
yarp::os::Bottle OpcSensation::p_entities |
◆ u_entities
yarp::os::Bottle OpcSensation::u_entities |
◆ up_entities
yarp::os::Bottle OpcSensation::up_entities |
◆ Sensation
Definition at line 13 of file sensation.h.
◆ close_ports()
virtual void Sensation::close_ports |
( |
| ) |
|
|
pure virtual |
◆ configure()
virtual void Sensation::configure |
( |
| ) |
|
|
pure virtual |
◆ publish()
virtual void Sensation::publish |
( |
| ) |
|
|
pure virtual |
◆ SensationManager
Definition at line 22 of file sensationManager.h.
◆ SensationManager()
SensationManager::SensationManager |
( |
| ) |
|
|
inline |
◆ close()
bool SensationManager::close |
( |
| ) |
|
◆ configure()
bool SensationManager::configure |
( |
yarp::os::ResourceFinder & |
rf | ) |
|
◆ getPeriod()
double SensationManager::getPeriod |
( |
| ) |
|
|
inline |
◆ interruptModule()
bool SensationManager::interruptModule |
( |
| ) |
|
|
inline |
◆ respond()
bool SensationManager::respond |
( |
const Bottle & |
cmd, |
|
|
Bottle & |
reply |
|
) |
| |
◆ updateModule()
bool SensationManager::updateModule |
( |
| ) |
|
◆ period
double SensationManager::period |
|
protected |
◆ TestSensation
Definition at line 19 of file test.h.
◆ TestSensation()
TestSensation::TestSensation |
( |
| ) |
|
|
inline |
◆ close_ports()
void TestSensation::close_ports |
( |
| ) |
|
|
inlinevirtual |
◆ configure()
void TestSensation::configure |
( |
| ) |
|
|
virtual |
◆ publish()
void TestSensation::publish |
( |
| ) |
|
|
virtual |