This service is used to subscribe to video data from components with the Visual Sensor service. More...
#include <videosubscriber.h>
Classes | |
class | Callback |
Callback class used to receive image/video data as it arrives. More... | |
Public Member Functions | |
VideoSubscriber () | |
Constructor. | |
~VideoSubscriber () | |
Destructor. | |
virtual void | Shutdown () |
Method called on Shutdown. | |
bool | CreateVideoSubscription (const Address &id, const Byte cameraID=0, const unsigned int waitTimeMs=Service::DefaultWaitMs) |
Create a subscription to video data. | |
bool | GetCameraCount (const Address &id, unsigned int &count, const unsigned int waitTimeMs=Service::DefaultWaitMs *3) const |
Query a component with a Visual Sensor service for number of cameras. | |
bool | GetCameraList (const Address &id, std::vector< Byte > &list, const unsigned int waitTimeMs=Service::DefaultWaitMs *3) const |
Query a component with a Visual Sensor service for number of cameras. | |
bool | HaveVideoSubscription (const Address &id, const int cameraID=-1) const |
Method to check if a video subscription is present. | |
bool | CancelVideoSubscription (const Address &id=Address(), const int cameraID=-1) |
Method to check cancel a video subscription. | |
void | RegisterCallback (Callback *callback, const bool rawImage, const bool add=true) |
Method to register a callback to receive Video 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:VideoSubscriber" |
String name of the Service. |
This service is used to subscribe to video data from components with the Visual Sensor service.
Definition at line 61 of file videosubscriber.h.
VideoSubscriber::VideoSubscriber | ( | ) |
Constructor.
Definition at line 55 of file videosubscriber.cpp.
VideoSubscriber::~VideoSubscriber | ( | ) |
Destructor.
Definition at line 67 of file videosubscriber.cpp.
bool VideoSubscriber::CancelVideoSubscription | ( | const Address & | id = Address() , |
const int | cameraID = -1 |
||
) |
Method to check cancel a video subscription.
[in] | id | ID of the source of the subscription. |
[in] | cameraID | ID of the camera, set to -1 for any camera. |
Definition at line 267 of file videosubscriber.cpp.
virtual bool JAUS::VideoSubscriber::ClearEmergency | ( | ) | [inline, virtual] |
Reimplemented from JAUS::Management::Child.
Definition at line 133 of file videosubscriber.h.
Attempts to create the message desired. Only message supported by this Service can be created by this Service.
This Service supports the following message: Query Image, Report Image
[in] | messageCode | Message to create. |
Implements JAUS::Service.
Definition at line 453 of file videosubscriber.cpp.
bool VideoSubscriber::CreateVideoSubscription | ( | const Address & | id, |
const Byte | cameraID = 0 , |
||
const unsigned int | waitTimeMs = Service::DefaultWaitMs |
||
) |
Create a subscription to video data.
[in] | id | The component ID to get video data from. |
[in] | cameraID | The camera/source on the component. |
[in] | waitTimeMs | How long to wait in ms before timeout on request. |
Definition at line 114 of file videosubscriber.cpp.
virtual bool JAUS::VideoSubscriber::GenerateEvent | ( | const Events::Subscription & | info ) | const [inline, virtual] |
Implements JAUS::Events::Child.
Definition at line 111 of file videosubscriber.h.
bool VideoSubscriber::GetCameraCount | ( | const Address & | id, |
unsigned int & | count, | ||
const unsigned int | waitTimeMs = Service::DefaultWaitMs*3 |
||
) | const |
Query a component with a Visual Sensor service for number of cameras.
[in] | id | The component ID to get video data from. |
[out] | count | Number of cameras on component. |
[in] | waitTimeMs | How long to wait in ms before timeout on request. |
Definition at line 159 of file videosubscriber.cpp.
bool VideoSubscriber::GetCameraList | ( | const Address & | id, |
std::vector< Byte > & | list, | ||
const unsigned int | waitTimeMs = Service::DefaultWaitMs*3 |
||
) | const |
Query a component with a Visual Sensor service for number of cameras.
[in] | id | The component ID to get video data from. |
[out] | list | List of component IDs of cameras. |
[in] | waitTimeMs | How long to wait in ms before timeout on request. |
Definition at line 188 of file videosubscriber.cpp.
bool VideoSubscriber::HaveVideoSubscription | ( | const Address & | id, |
const int | cameraID = -1 |
||
) | const |
Method to check if a video subscription is present.
[in] | id | ID of the source of the subscription. |
[in] | cameraID | ID of the camera, set to -1 for any camera. |
Definition at line 215 of file videosubscriber.cpp.
virtual bool JAUS::VideoSubscriber::IsDiscoverable | ( | ) | const [inline, virtual] |
Implements JAUS::Service.
Definition at line 119 of file videosubscriber.h.
virtual bool JAUS::VideoSubscriber::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 113 of file videosubscriber.h.
void VideoSubscriber::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 387 of file videosubscriber.cpp.
void VideoSubscriber::RegisterCallback | ( | Callback * | callback, |
const bool | rawImage, | ||
const bool | add = true |
||
) |
Method to register a callback to receive Video data as it arrives.
[in] | callback | Pointer to callback to add/remove. |
[in] | rawImage | If true, register for decompressed RGB images. If false callback is to receive the compressed video source data. |
[in] | add | If true, callback is added, if false, it is removed. |
Definition at line 339 of file videosubscriber.cpp.
virtual bool JAUS::VideoSubscriber::ReleaseControl | ( | ) | [inline, virtual] |
Method called whenever control of the parent component has been released.
Reimplemented from JAUS::Management::Child.
Definition at line 135 of file videosubscriber.h.
virtual bool JAUS::VideoSubscriber::Reset | ( | ) | [inline, virtual] |
Implements JAUS::Management::Child.
Definition at line 127 of file videosubscriber.h.
virtual bool JAUS::VideoSubscriber::Resume | ( | ) | [inline, virtual] |
Implements JAUS::Management::Child.
Definition at line 125 of file videosubscriber.h.
virtual bool JAUS::VideoSubscriber::SetEmergency | ( | ) | [inline, virtual] |
Reimplemented from JAUS::Management::Child.
Definition at line 131 of file videosubscriber.h.
void VideoSubscriber::Shutdown | ( | ) | [virtual] |
Method called on Shutdown.
Reimplemented from JAUS::Service.
Definition at line 87 of file videosubscriber.cpp.
virtual bool JAUS::VideoSubscriber::Standby | ( | ) | [inline, virtual] |
Implements JAUS::Management::Child.
Definition at line 129 of file videosubscriber.h.
const std::string VideoSubscriber::Name = "urn:jaus:jss:jpp:extras:VideoSubscriber" [static] |
String name of the Service.
Definition at line 87 of file videosubscriber.h.