A Sensor is a type of service that primarily provides information to other services, or synchronizes data with other services of the same time. More...
#include <sensor.h>
Public Member Functions | |
Sensor () | |
virtual | ~Sensor () |
void | SynchronizeToComponent (const Address &componentID) |
bool | IsSynchronizing () const |
Address | GetSynchronizeID () const |
virtual void | CheckServiceSynchronization (const unsigned int timeSinceLastCheckMs)=0 |
A Sensor is a type of service that primarily provides information to other services, or synchronizes data with other services of the same time.
For example, one component contains a Time service on it, that is the master Time service for that subsystem. Another component has a slave service which synchronizes it's data with the master, so that other services on the same component that need time data can access it directly from the slave (useing a method call) service without having to create subscriptions to that data themselves.
For examples of how to use this class see TimeService or GlobalPoseSensor in the Mobility Library.
A sensor can only synchronize to one other service, and you cannot have more than one of the same sensor service on a single component. also, once a service is synchronized to another component it can not be discovered by other external components using the Discovery services.
Definition at line 72 of file sensor.h.
virtual void JAUS::Sensor::CheckServiceSynchronization | ( | const unsigned int | timeSinceLastCheckMs ) | [pure virtual] |
Implemented in JAUS::TimeService, and JAUS::Microcontroller.
void JAUS::Sensor::SynchronizeToComponent | ( | const Address & | componentID ) | [inline] |