RTXI  2.1
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
IO::Block Class Reference

#include <io.h>

Inheritance diagram for IO::Block:
Settings::ObjectDAQ::DeviceWorkspace::InstanceAnalogyDeviceDefaultGUIModelPerformanceMeasurement::Panel

Classes

struct  input_t
 
struct  link_t
 
struct  output_t
 

Public Member Functions

 Block (std::string name, channel_t *channels, size_t size)
 
virtual ~Block (void)
 
std::string getName (void) const
 
virtual size_t getCount (flags_t type) const
 
virtual std::string getName (flags_t type, size_t index) const
 
virtual std::string getDescription (flags_t type, size_t index) const
 
virtual double getValue (flags_t type, size_t index) const
 
double input (size_t index) const
 
double output (size_t index) const
 
- Public Member Functions inherited from Settings::Object
 Object (void)
 
virtual ~Object (void)
 
ID getID (void) const
 
State save (void) const
 
void load (const State &)
 
void deferred (const State &)
 

Protected Member Functions

double & output (size_t index)
 
- Protected Member Functions inherited from Settings::Object
virtual void doLoad (const State &)
 
virtual void doDeferred (const State &)
 
virtual void doSave (State &) const
 

Static Private Member Functions

static void connect (Block *, size_t, Block *, size_t)
 
static void disconnect (Block *, size_t, Block *, size_t)
 

Private Attributes

std::string name
 
std::vector< struct input_tinputs
 
std::vector< struct output_toutputs
 

Static Private Attributes

static Mutex mutex = Mutex(Mutex::RECURSIVE)
 
static double yogi = 0.0
 

Friends

class Connector
 

Additional Inherited Members

- Public Types inherited from Settings::Object
typedef unsigned long ID
 
- Static Public Attributes inherited from Settings::Object
static const ID INVALID = 0
 

Detailed Description

An object that provides an interface for transparently manipulating external data.

See also
Settings::Object

Definition at line 187 of file io.h.

Constructor & Destructor Documentation

IO::Block::Block(std::string name,
IO::channel_tchannel,
size_t size 
)

The constructor needs to be provided with a specification of the channels that will be embedded in this block in the channels parameter. Fields that are not of type INPUT or OUTPUT will be safely ignored. Size should be the number of total fields in the channels parameter, regardless of type.

Parameters
nameThe name of the block.
channelsThe channel specification for this block.
sizeThe number of channels in the specification.
See also
IO::channel_t

Definition at line 30 of file io.cpp.

IO::Block::~Block(void )
virtual

Definition at line 66 of file io.cpp.

Member Function Documentation

void IO::Block::connect(IO::Blocksrc,
size_t src_num,
IO::Blockdest,
size_t dest_num 
)
staticprivate

Definition at line 151 of file io.cpp.

void IO::Block::disconnect(IO::Blocksrc,
size_t src_num,
IO::Blockdest,
size_t dest_num 
)
staticprivate

Definition at line 205 of file io.cpp.

size_t IO::Block::getCount(IO::flags_t type)const
virtual

Get the number of channels of the specified type.

Parameters
typeThe type of the channels to be counted.
Returns
The number of channels of the specified type.

Reimplemented in Workspace::Instance.

Definition at line 82 of file io.cpp.

std::string IO::Block::getDescription(IO::flags_t type,
size_t index 
)const
virtual

Get the description of the specified channel.

Parameters
typeThe channel's type.
indexThe channel's index.
Returns
The description of the channel.

Reimplemented in Workspace::Instance.

Definition at line 100 of file io.cpp.

std::string IO::Block::getName(void )const
inline

Get the name of the block.

Returns
Tbe name of the block.

Definition at line 214 of file io.h.

std::string IO::Block::getName(IO::flags_t type,
size_t index 
)const
virtual

Get the name of the specified channel.

Parameters
typeThe channel's type.
indexThe channel's index.
Returns
The name of the channel.

Reimplemented in Workspace::Instance.

Definition at line 91 of file io.cpp.

double IO::Block::getValue(IO::flags_t type,
size_t index 
)const
virtual

Get the value of the specified channel.

Parameters
typeThe channel's type.
indexThe channel's index.
Returns
The value of the channel.

Reimplemented in Workspace::Instance.

Definition at line 109 of file io.cpp.

double IO::Block::input(size_t index)const

Get the value of the specified input channel.

Parameters
indexThe input channel's index.
Returns
The value of the specified input channel.

Definition at line 118 of file io.cpp.

double IO::Block::output(size_t index)const

Get the value of the specified output channel.

Parameters
indexThe output channel's index.
Returns
The value of the specified output channel.
See also
IO::Block::output()

Definition at line 129 of file io.cpp.

double & IO::Block::output(size_t index)
protected

Get a reference to the value of the specified output channel. This method can be used to set the value of specified output.

Parameters
indexThe output channel's index.
Returns
A reference to the value of the specified output channel.
See also
IO::Block::output()

Definition at line 138 of file io.cpp.

Friends And Related Function Documentation

friend class Connector
friend

Definition at line 190 of file io.h.

Member Data Documentation

std::vector<struct input_t> IO::Block::inputs
private

Definition at line 326 of file io.h.

Mutex IO::Block::mutex = Mutex(Mutex::RECURSIVE)
staticprivate

Definition at line 283 of file io.h.

std::string IO::Block::name
private

Definition at line 325 of file io.h.

std::vector<struct output_t> IO::Block::outputs
private

Definition at line 327 of file io.h.

double IO::Block::yogi = 0.0
staticprivate

Definition at line 302 of file io.h.


The documentation for this class was generated from the following files: