#include <ArServerHandlerCameraCollection.h>
This class handles the following requests:
When a camera is added or a parameter changes, the server broadcasts the following packets to each client:
In order to manipulate a particular camera using the request names and other information provided by ArServerHandlerCameraCollection, see ArServerHandlerCamera and ArVideoServer.
Public Member Functions | |
| ArServerHandlerCameraCollection (ArServerBase *server, ArCameraCollection *cameraCollection) | |
| void | getCameraList (ArServerClient *client, ArNetPacket *packet) |
| void | handleCameraCollectionModified () |
| Callback executed when the associated camera collection is modified. | |
| void | setParams (ArServerClient *client, ArNetPacket *packet) |
| virtual | ~ArServerHandlerCameraCollection () |
| Destructor. | |
Protected Attributes | |
| ArCameraCollection * | myCameraCollection |
| The associated camera collection. | |
| ArFunctor * | myCollectionModifiedCB |
| Notification callback when the camera collection has been modified. | |
| ArFunctor2< ArServerClient *, ArNetPacket * > * | myGetCameraListCB |
| Server callback for the get camera list request. | |
| ArServerBase * | myServer |
| The server used to send/receive requests. | |
| ArFunctor2< ArServerClient *, ArNetPacket * > * | mySetParamCB |
| Server callback for the set parameter request. | |
Static Protected Attributes | |
| static const char * | COLLECTION_UPDATED_PACKET_NAME |
| Name of the network packet broadcast when the collection is modified. | |
| static const char * | COMMAND_GROUP |
| Command group for these packets. | |
| static const char * | GET_COLLECTION_PACKET_NAME |
| Name of the network packet to get the camera list. | |
| static const char * | PARAMS_UPDATED_PACKET_NAME |
| Name of the network packet broadcast when a parameter value is modified. | |
| static const char * | SET_PARAMS_PACKET_NAME |
| Name of the network packet to set a particular camera parameter. | |
| ArServerHandlerCameraCollection::ArServerHandlerCameraCollection | ( | ArServerBase * | server, | |
| ArCameraCollection * | cameraCollection | |||
| ) |
| server | the ArServerBase * used to send/receive requests | |
| cameraCollection | the ArCameraCollection * to be transmitted |
| ArServerHandlerCameraCollection::~ArServerHandlerCameraCollection | ( | ) | [virtual] |
Destructor.
| void ArServerHandlerCameraCollection::getCameraList | ( | ArServerClient * | client, | |
| ArNetPacket * | packet | |||
| ) |
| client | the ArServerClient * that is making the request | |
| packet | the ArNetPacket * that contains the request |
| void ArServerHandlerCameraCollection::handleCameraCollectionModified | ( | ) |
Callback executed when the associated camera collection is modified.
| void ArServerHandlerCameraCollection::setParams | ( | ArServerClient * | client, | |
| ArNetPacket * | packet | |||
| ) |
| client | the ArServerClient * that is making the request | |
| packet | the ArNetPacket * that contains the request |
TODO: Add error message? ArNetPacket retPacket; retPacket->strToBuf(""); client->sendPacketTcp(&retPacket);
const char * ArServerHandlerCameraCollection::COLLECTION_UPDATED_PACKET_NAME [static, protected] |
Initial value:
"cameraListUpdated"
const char * ArServerHandlerCameraCollection::COMMAND_GROUP [static, protected] |
Initial value:
"CameraInfo"
const char * ArServerHandlerCameraCollection::GET_COLLECTION_PACKET_NAME [static, protected] |
Initial value:
"getCameraList"
The associated camera collection.
Notification callback when the camera collection has been modified.
ArFunctor2<ArServerClient *, ArNetPacket *>* ArServerHandlerCameraCollection::myGetCameraListCB [protected] |
Server callback for the get camera list request.
ArServerBase* ArServerHandlerCameraCollection::myServer [protected] |
The server used to send/receive requests.
ArFunctor2<ArServerClient *, ArNetPacket *>* ArServerHandlerCameraCollection::mySetParamCB [protected] |
Server callback for the set parameter request.
const char * ArServerHandlerCameraCollection::PARAMS_UPDATED_PACKET_NAME [static, protected] |
Initial value:
"cameraParamUpdated"
const char * ArServerHandlerCameraCollection::SET_PARAMS_PACKET_NAME [static, protected] |
Initial value:
"setCameraParams"
1.4.7