Visual Servoing Platform
version 3.6.1 under development (2024-11-21)
|
#include <visp3/core/vpRequest.h>
Public Member Functions | |
vpRequest () | |
virtual | ~vpRequest () |
void | addParameter (const char *params) |
void | addParameter (const std::string ¶ms) |
void | addParameter (const 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 () const |
void | setId (const char *id) |
unsigned int | size () const |
Protected Attributes | |
std::string | request_id |
std::vector< std::string > | listOfParams |
This the request that will transit on the network.
Example 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 127 of file vpRequest.h.
BEGIN_VISP_NAMESPACE vpRequest::vpRequest | ( | ) |
Definition at line 42 of file vpRequest.cpp.
|
virtual |
Definition at line 44 of file vpRequest.cpp.
void vpRequest::addParameter | ( | const char * | params | ) |
Add a message as parameter of the request.
params | : Array of characters representing the message to add. |
Definition at line 53 of file vpRequest.cpp.
References listOfParams.
void vpRequest::addParameter | ( | const std::string & | params | ) |
Add a message as parameter of the request.
params | : std::string representing the message to add. |
Definition at line 66 of file vpRequest.cpp.
References listOfParams.
void vpRequest::addParameter | ( | const 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 76 of file vpRequest.cpp.
References listOfParams.
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 217 of file vpRequest.h.
References listOfParams.
|
inline |
Clear the parameters of the request.
Definition at line 152 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 182 of file vpRequest.h.
Referenced by vpNetwork::addDecodingRequest(), and vpNetwork::sendRequestTo().
|
inline |
Accessor on the parameters.
Definition at line 166 of file vpRequest.h.
|
inline |
Accessor on the parameters (const).
Definition at line 173 of file vpRequest.h.
|
inline |
Change the ID of the request.
id | : new ID. |
Definition at line 191 of file vpRequest.h.
|
inline |
Get the number of parameters.
Definition at line 198 of file vpRequest.h.
Referenced by vpNetwork::sendRequestTo().
|
protected |
Definition at line 131 of file vpRequest.h.
Referenced by addParameter(), and addParameterObject().
|
protected |
Definition at line 130 of file vpRequest.h.