Tango Core Classes Reference
9.3.3
|
Fundamental type for sending/receiving data from device pipes. More...
#include "tango.h"
Public Member Functions | |
Constructors | |
DevicePipe () | |
Create a DevicePipe object. More... | |
DevicePipe (const string &pipe_name) | |
Create a DevicePipe object with name. More... | |
DevicePipe (const string &pipe_name, const string &root_blob_name) | |
Create a DevicePipe object with name and root blob name. More... | |
Get/Set methods | |
void | set_name (const string &pipe_name) |
Set pipe name. More... | |
const string & | get_name () |
Get pipe name. More... | |
void | set_root_blob_name (const string &root_blob_name) |
Set root blob name. More... | |
const string & | get_root_blob_name () |
Get root blob name. More... | |
Inserting data into a DevicePipe | |
DevicePipe & | operator<< (short &datum) |
Insert data into a device pipe. More... | |
void | set_data_elt_nb (size_t nb) |
Set blob data element number. More... | |
void | set_data_elt_names (vector< string > &names) |
Set blob data element number and names. More... | |
Extracting data from a DevicePipe | |
DevicePipe & | operator>> (short &datum) |
Extract data from a device pipe. More... | |
size_t | get_data_elt_nb () |
Get root blob data element number. More... | |
vector< string > | get_data_elt_names () |
Get root blob data elements name. More... | |
string | get_data_elt_name (size_t ind) |
Get root blob data element name. More... | |
int | get_data_elt_type (size_t ind) |
Get root blob data element value type. More... | |
Exception and error related methods methods | |
void | exceptions (bitset< DevicePipeBlob::numFlags > fl) |
Set exception flag. More... | |
bitset< DevicePipeBlob::numFlags > | exceptions () |
Get exception flag. More... | |
void | reset_exceptions (DevicePipeBlob::except_flags fl) |
Reset one exception flag. More... | |
void | set_exceptions (DevicePipeBlob::except_flags fl) |
Set one exception flag. More... | |
bool | has_failed () |
Check insertion/extraction success. More... | |
bitset< DevicePipeBlob::numFlags > | state () |
Get instance insertion/extraction state. More... | |
Friends | |
ostream & | operator<< (ostream &str, DevicePipe &dd) |
Print a DevicePipe instance. More... | |
Fundamental type for sending/receiving data from device pipes.
This is the fundamental type for sending/receiving data to/from device pipe.
$Author$ $Revision$
Tango::DevicePipe::DevicePipe | ( | ) |
Create a DevicePipe object.
Default constructor. The instance is empty
Tango::DevicePipe::DevicePipe | ( | const string & | pipe_name | ) |
Create a DevicePipe object with name.
Create one instance of the DevicePipe class and set its name
[in] | pipe_name | The pipe name |
Tango::DevicePipe::DevicePipe | ( | const string & | pipe_name, |
const string & | root_blob_name | ||
) |
Create a DevicePipe object with name and root blob name.
Create one instance of the DevicePipe class and set its name and its root blob name
[in] | pipe_name | The pipe name |
[in] | root_blob_name | The root blob name |
|
inline |
Get exception flag.
Returns the whole exception flags. The following is an example of how to use these exceptions related methods
|
inline |
Set exception flag.
It's a method which allows the user to switch on/off exception throwing when trying to insert/extract data from a DevicePipe object. The following flags are supported :
[in] | fl | The exception flag |
|
inline |
Get root blob data element name.
Get root blob data element name for a single data element
[in] | ind | The data element index within the root blob |
|
inline |
Get root blob data elements name.
Get the root blob data elements name
|
inline |
Get root blob data element number.
Get the root blob data element number
|
inline |
Get root blob data element value type.
Get root blob data element value type for a single data element
[in] | ind | The data element index within the root blob |
|
inline |
Get pipe name.
Set the device pipe name
|
inline |
Get root blob name.
Get the root blob name
|
inline |
Check insertion/extraction success.
Allow the user to check if insertion/extraction into/from DevicePipe instance was successfull. This method has to be used when exceptions are disabled.
DevicePipe& Tango::DevicePipe::operator<< | ( | short & | datum | ) |
Insert data into a device pipe.
Inserting data into a DevicePipe instance is simlar to inserting data into a DevicePipeBlob class instance. See doc of DevicePipeBlob class insertion methods (DevicePipeBlob::operator<<) to get a complete documentation on how to insert data into a DevicePipe
[in] | datum | The data to be inserted into the DevicePipe |
WrongData | if requested |
DevicePipe& Tango::DevicePipe::operator>> | ( | short & | datum | ) |
Extract data from a device pipe.
Extracting data from a DevicePipe instance is simlar to extracting data from a DevicePipeBlob class instance. See doc of DevicePipeBlob class extraction methods (DevicePipeBlob::operator>>) to get a complete documentation on how to extract data from a DevicePipe
[in] | datum | The pipe data |
WrongData | if requested |
|
inline |
Reset one exception flag.
Resets one exception flag
[in] | fl | The exception flag |
|
inline |
Set blob data element number and names.
Set the blob data element number and names. The data element number is the number of names in the input parameter.
[in] | names | The blob data element names |
|
inline |
Set blob data element number.
Set the blob data element number
[in] | nb | The blob data element number |
|
inline |
Set one exception flag.
Sets one exception flag. See DevicePipe::exceptions() for a usage example.
[in] | fl | The exception flag |
|
inline |
Set pipe name.
Set the device pipe name
[in] | pipe_name | The pipe name |
|
inline |
Set root blob name.
Set the root blob name
[in] | root_blob_name | The root blob name |
|
inline |
Get instance insertion/extraction state.
Allow the user to find out what was the reason of insertion/extraction into/from DevicePipe failure. This method has to be used when exceptions are disabled. Here is an example of how methods has_failed() and state() could be used
|
friend |
Print a DevicePipe instance.
Is an utility function to easily print the contents of a DevicePipe object. This function knows all types which could be inserted in a DevicePipe object and print them accordingly. A special string is printed if the DevicePipe object is empty
[in] | str | The printing stream |
[in] | dd | The instance to be printed |