Tango Core Classes Reference
9.3.4
|
This class is a class representing a pipe in the TANGO device server pattern. More...
#include "tango.h"
Public Member Functions | |
Constructors | |
Miscellaneous constructors | |
Pipe () | |
Constructs a newly allocated Pipe object. More... | |
Pipe (const string &name, const Tango::DispLevel level, const PipeWriteType pwt=PIPE_READ) | |
Constructs a newly allocated Pipe object from its name and its display level. More... | |
Destructor | |
Only one destructor is defined for this class | |
virtual | ~Pipe () |
The object desctructor. | |
Get/Set object members. | |
These methods allows the external world to get/set Pipe instance data members | |
string & | get_name () |
Return the pipe name. More... | |
void | set_name (string &new_name) |
Set the pipe name. More... | |
void | set_default_properties (UserDefaultPipeProp &prop) |
Set default attribute properties. More... | |
string & | get_lower_name () |
Return the pipe name in lower case letters. More... | |
const string & | get_root_blob_name () |
Return the root data blob name. More... | |
void | set_root_blob_name (const string &name) |
Set the root data blob name. More... | |
string & | get_desc () |
Return the pipe description. More... | |
string & | get_label () |
Return the pipe label. More... | |
Tango::DispLevel | get_disp_level () |
Return the pipe display level. More... | |
Tango::PipeWriteType | get_writable () |
Get the pipe writable type (RO/RW). More... | |
void | set_pipe_serial_model (PipeSerialModel ser_model) |
Set pipe serialization model. More... | |
PipeSerialModel | get_pipe_serial_model () |
Get pipe serialization model. More... | |
void | set_user_pipe_mutex (omni_mutex *mut_ptr) |
Set pipe user mutex. More... | |
Inserting data into a DevicePipe | |
Pipe & | 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... | |
size_t | get_data_elt_nb () |
Get blob data element number. 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... | |
Class data members | |
string | name |
The pipe name. | |
string | lower_name |
The pipe name in lower case. | |
string | desc |
The pipe description. | |
string | label |
The pipe label. | |
Tango::DispLevel | disp_level |
The pipe display level. | |
Tango::PipeWriteType | writable |
The pipe R/W type. | |
DevicePipeBlob | the_blob |
This class is a class representing a pipe in the TANGO device server pattern.
It is an abstract class. It is the root class for all pipe related classes.
$Author$ $Revision$
|
inline |
Constructs a newly allocated Pipe object.
The default constructor
Tango::Pipe::Pipe | ( | const string & | name, |
const Tango::DispLevel | level, | ||
const PipeWriteType | pwt = PIPE_READ |
||
) |
Constructs a newly allocated Pipe object from its name and its display level.
name | The pipe name |
level | The pipe display level |
pwt | The pipe R/W type (default to READ) |
|
inline |
Get exception flag.
Returns the whole exception flags. The following is an example of how to use these exceptions related methods
References DevicePipeBlob::exceptions().
|
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 Pipe object. The following flags are supported :
[in] | fl | The exception flag |
References DevicePipeBlob::exceptions().
|
inline |
Get blob data element number.
Get the blob data element number
References DevicePipeBlob::get_data_elt_nb().
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
Get pipe serialization model.
Get the pipe serialization model
|
inline |
|
inline |
|
inline |
Check insertion/extraction success.
Allow the user to check if insertion/extraction into/from Pipe instance was successfull. This method has to be used when exceptions are disabled.
References DevicePipeBlob::has_failed().
Pipe& Tango::Pipe::operator<< | ( | short & | datum | ) |
Insert data into a device pipe.
Inserting data into a Pipe 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 Pipe object
[in] | datum | The data to be inserted into the Pipe object |
WrongData | if requested |
|
inline |
Reset one exception flag.
Resets one exception flag
[in] | fl | The exception flag |
References DevicePipeBlob::reset_exceptions().
|
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 |
References DevicePipeBlob::set_data_elt_names().
|
inline |
Set blob data element number.
Set the blob data element number
[in] | nb | The blob data element number |
References DevicePipeBlob::set_data_elt_nb().
void Tango::Pipe::set_default_properties | ( | UserDefaultPipeProp & | prop | ) |
Set default attribute properties.
prop | The user default property class |
|
inline |
Set one exception flag.
Sets one exception flag. See DevicePipeBlob::exceptions() for a usage example.
[in] | fl | The exception flag |
References DevicePipeBlob::set_exceptions().
|
inline |
void Tango::Pipe::set_pipe_serial_model | ( | PipeSerialModel | ser_model | ) |
Set pipe serialization model.
This method allows the user to choose the pipe serialization model.
[in] | ser_model | The new serialisation model. The serialization model must be one of PIPE_BY_KERNEL, PIPE_BY_USER or PIPE_NO_SYNC |
|
inline |
Set the root data blob name.
[in] | name | The root data blob name |
References name, and DevicePipeBlob::set_name().
|
inline |
Set pipe user mutex.
This method allows the user to give to the pipe object the pointer to the omni_mutex used to protect its buffer. The mutex has to be locked when passed to this method. The Tango kernel will unlock it when the data will be transferred to the client.
[in] | mut_ptr | The user mutex pointer |
|
inline |
Get instance insertion/extraction state.
Allow the user to find out what was the reason of insertion/extraction into/from Pipe 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
References DevicePipeBlob::state().