This service is used to subscribe to range data from components with the Range Sensor service. More...
#include <rangesubscriber.h>
Classes | |
class | Callback |
Callback class used to receive image/range data as it arrives. More... | |
Public Member Functions | |
RangeSubscriber () | |
Constructor. | |
~RangeSubscriber () | |
Destructor. | |
virtual void | Shutdown () |
Method called on Shutdown. | |
bool | CreateRangeSubscription (const Address &id, const Byte deviceID=0, const unsigned int waitTimeMs=Service::DefaultWaitMs) |
Create a subscription to range data. | |
bool | GetRangeSensorInfo (const Address &id, RangeSensorConfig::List &list, const unsigned int waitTimeMs=Service::DefaultWaitMs *3) const |
Query a component with a Range Sensor service for number of devices. | |
virtual void | ProcessLocalRangeScan (const Point3D::List &scan, const Address &sourceID, const Byte deviceID, const Time ×tamp) |
bool | HaveRangeSubscription (const Address &id, const int deviceID=-1) const |
Method to check if a video subscription is present. | |
bool | CancelRangeSubscription (const Address &id=Address(), const int deviceID=-1) |
Method to check cancel a range subscription. | |
void | RegisterCallback (Callback *callback, const bool add=true) |
Method to register a callback to receive range data as it arrives. | |
virtual bool | GenerateEvent (const Events::Subscription &info) const |
virtual bool | IsEventSupported (const Events::Type type, const double requestedPeriodicRate, const Message *queryMessage, double &confirmedPeriodicRate, std::string &errorMessage) const |
virtual bool | IsDiscoverable () const |
virtual void | Receive (const Message *message) |
Processes message received by the Service. If not supported, then message is passed to inheriting services. | |
virtual Message * | CreateMessage (const UShort messageCode) const |
Attempts to create the message desired. Only message supported by this Service can be created by this Service. | |
virtual bool | Resume () |
virtual bool | Reset () |
virtual bool | Standby () |
virtual bool | SetEmergency () |
virtual bool | ClearEmergency () |
virtual bool | ReleaseControl () |
Method called whenever control of the parent component has been released. | |
Static Public Attributes | |
static const std::string | Name = "urn:jaus:jss:jpp:extras:RangeSubscriber" |
String name of the Service. |
This service is used to subscribe to range data from components with the Range Sensor service.
Definition at line 58 of file rangesubscriber.h.
RangeSubscriber::RangeSubscriber | ( | ) |
Constructor.
Definition at line 52 of file rangesubscriber.cpp.
RangeSubscriber::~RangeSubscriber | ( | ) |
Destructor.
Definition at line 64 of file rangesubscriber.cpp.
bool RangeSubscriber::CancelRangeSubscription | ( | const Address & | id = Address() , |
const int | deviceID = -1 |
||
) |
Method to check cancel a range subscription.
[in] | id | ID of the source of the subscription. |
[in] | deviceID | ID of the sensor, set to -1 for any sensor. |
Definition at line 180 of file rangesubscriber.cpp.
virtual bool JAUS::RangeSubscriber::ClearEmergency | ( | ) | [inline, virtual] |
Reimplemented from JAUS::Management::Child.
Definition at line 130 of file rangesubscriber.h.
Attempts to create the message desired. Only message supported by this Service can be created by this Service.
[in] | messageCode | Message to create. |
Implements JAUS::Service.
Definition at line 400 of file rangesubscriber.cpp.
bool RangeSubscriber::CreateRangeSubscription | ( | const Address & | id, |
const Byte | deviceID = 0 , |
||
const unsigned int | waitTimeMs = Service::DefaultWaitMs |
||
) |
Create a subscription to range data.
[in] | id | The component ID to get video data from. |
[in] | deviceID | The sensor/source on the component. |
[in] | waitTimeMs | How long to wait in ms before timeout on request. |
Definition at line 90 of file rangesubscriber.cpp.
virtual bool JAUS::RangeSubscriber::GenerateEvent | ( | const Events::Subscription & | info ) | const [inline, virtual] |
Implements JAUS::Events::Child.
Definition at line 108 of file rangesubscriber.h.
bool RangeSubscriber::GetRangeSensorInfo | ( | const Address & | id, |
RangeSensorConfig::List & | list, | ||
const unsigned int | waitTimeMs = Service::DefaultWaitMs*3 |
||
) | const |
Query a component with a Range Sensor service for number of devices.
[in] | id | The component ID to get range data from. |
[out] | list | Range sensor data. |
[in] | waitTimeMs | How long to wait in ms before timeout on request. |
Definition at line 115 of file rangesubscriber.cpp.
bool RangeSubscriber::HaveRangeSubscription | ( | const Address & | id, |
const int | deviceID = -1 |
||
) | const |
Method to check if a video subscription is present.
[in] | id | ID of the source of the subscription. |
[in] | deviceID | ID of the sensor, set to -1 for any sensor. |
Definition at line 140 of file rangesubscriber.cpp.
virtual bool JAUS::RangeSubscriber::IsDiscoverable | ( | ) | const [inline, virtual] |
Implements JAUS::Service.
Definition at line 116 of file rangesubscriber.h.
virtual bool JAUS::RangeSubscriber::IsEventSupported | ( | const Events::Type | type, |
const double | requestedPeriodicRate, | ||
const Message * | queryMessage, | ||
double & | confirmedPeriodicRate, | ||
std::string & | errorMessage | ||
) | const [inline, virtual] |
Implements JAUS::Events::Child.
Definition at line 110 of file rangesubscriber.h.
virtual void JAUS::RangeSubscriber::ProcessLocalRangeScan | ( | const Point3D::List & | scan, |
const Address & | sourceID, | ||
const Byte | deviceID, | ||
const Time & | timestamp | ||
) | [inline, virtual] |
Definition at line 97 of file rangesubscriber.h.
void RangeSubscriber::Receive | ( | const Message * | message ) | [virtual] |
Processes message received by the Service. If not supported, then message is passed to inheriting services.
This Service supports the following message: Report Image
[in] | message | Message data to process. |
Reimplemented from JAUS::Service.
Definition at line 260 of file rangesubscriber.cpp.
void RangeSubscriber::RegisterCallback | ( | Callback * | callback, |
const bool | add = true |
||
) |
Method to register a callback to receive range data as it arrives.
[in] | callback | Pointer to callback to add/remove. |
[in] | add | If true, callback is added, if false, it is removed. |
Definition at line 230 of file rangesubscriber.cpp.
virtual bool JAUS::RangeSubscriber::ReleaseControl | ( | ) | [inline, virtual] |
Method called whenever control of the parent component has been released.
Reimplemented from JAUS::Management::Child.
Definition at line 132 of file rangesubscriber.h.
virtual bool JAUS::RangeSubscriber::Reset | ( | ) | [inline, virtual] |
Implements JAUS::Management::Child.
Definition at line 124 of file rangesubscriber.h.
virtual bool JAUS::RangeSubscriber::Resume | ( | ) | [inline, virtual] |
Implements JAUS::Management::Child.
Definition at line 122 of file rangesubscriber.h.
virtual bool JAUS::RangeSubscriber::SetEmergency | ( | ) | [inline, virtual] |
Reimplemented from JAUS::Management::Child.
Definition at line 128 of file rangesubscriber.h.
void RangeSubscriber::Shutdown | ( | ) | [virtual] |
Method called on Shutdown.
Reimplemented from JAUS::Service.
Definition at line 74 of file rangesubscriber.cpp.
virtual bool JAUS::RangeSubscriber::Standby | ( | ) | [inline, virtual] |
Implements JAUS::Management::Child.
Definition at line 126 of file rangesubscriber.h.
const std::string RangeSubscriber::Name = "urn:jaus:jss:jpp:extras:RangeSubscriber" [static] |
String name of the Service.
Definition at line 82 of file rangesubscriber.h.