Visual Servoing Platform
version 3.4.0
|
#include <vpRequest.h>
Public Member Functions | |
vpRequest () | |
virtual | ~vpRequest () |
void | addParameter (char *params) |
void | addParameter (std::string ¶ms) |
void | addParameter (std::vector< std::string > &listOfparams) |
template<typename T > | |
void | addParameterObject (T *params, const int &sizeOfObject=sizeof(T)) |
virtual void | decode ()=0 |
void | clear () |
virtual void | encode ()=0 |
std::string & | operator[] (const unsigned int &i) |
const std::string & | operator[] (const unsigned int &i) const |
std::string | getId () |
void | setId (const char *id) |
unsigned int | size () |
Protected Attributes | |
std::string | request_id |
std::vector< std::string > | listOfParams |
This the request that will transit on the network.
Exemple request decoding an image on a specific form. First parameter : Height of the image. Second parameter : Width of the image. Thirs parameter : Bitmap of the image (not compress).
Here is the header of the vpRequestImage class.
Here is the definition of the vpRequestImage class.
Definition at line 131 of file vpRequest.h.
vpRequest::vpRequest | ( | ) |
Definition at line 41 of file vpRequest.cpp.
|
virtual |
Definition at line 43 of file vpRequest.cpp.
void vpRequest::addParameter | ( | char * | params | ) |
Add a message as parameter of the request.
params | : Array of characters representing the message to add. |
Definition at line 52 of file vpRequest.cpp.
References listOfParams.
void vpRequest::addParameter | ( | std::string & | params | ) |
Add a message as parameter of the request.
params | : std::string representing the message to add. |
Definition at line 65 of file vpRequest.cpp.
References listOfParams.
void vpRequest::addParameter | ( | std::vector< std::string > & | listOfparams | ) |
Add messages as parameters of the request. Each message corresponds to one parameter.
listOfparams | : Array of std::string representing the messages to add. |
Definition at line 75 of file vpRequest.cpp.
void vpRequest::addParameterObject | ( | T * | params, |
const int & | sizeOfObject = sizeof(T) |
||
) |
Add an object as parameter of the request.
params | : Object to add. |
sizeOfObject | : Size of the object. |
Definition at line 221 of file vpRequest.h.
|
inline |
Clear the parameters of the request.
Definition at line 156 of file vpRequest.h.
|
pure virtual |
Decode the parameters of the request (Funtion that has to be redifined).
|
pure virtual |
Encode the parameters of the request (Funtion that has to be redifined).
Referenced by vpNetwork::sendAndEncodeRequest(), and vpNetwork::sendAndEncodeRequestTo().
|
inline |
Get the ID of the request.
Definition at line 186 of file vpRequest.h.
Referenced by vpNetwork::addDecodingRequest(), and vpNetwork::sendRequestTo().
|
inline |
Accessor on the parameters.
Definition at line 170 of file vpRequest.h.
|
inline |
Accessor on the parameters (const).
Definition at line 177 of file vpRequest.h.
|
inline |
Change the ID of the request.
id | : new ID. |
Definition at line 195 of file vpRequest.h.
|
inline |
Get the number of parameters.
Definition at line 202 of file vpRequest.h.
Referenced by vpNetwork::sendRequestTo().
|
protected |
Definition at line 135 of file vpRequest.h.
Referenced by addParameter().
|
protected |
Definition at line 134 of file vpRequest.h.