libFAUDES

Sections

Index

faudes::AttributeDeviceEvent Class Reference

Attribute for the configuration of a sensor or actuator mapping. More...

#include <iop_vdevice.h>

List of all members.

Public Member Functions

 AttributeDeviceEvent (void)
 Default constructor (no attributes, aka undefined).
 AttributeDeviceEvent (const AttributeDeviceEvent &rOtherAttr)
 Copy constructor.
virtual ~AttributeDeviceEvent (void)
 Destructor.
virtual void Clear (void)
 Clear.
virtual bool IsDefault (void) const
 Test for default value (undefined).
bool IsActuator (void) const
 Does this attribute define an actuator mapping?
bool IsSensor (void) const
 Does this attribute define a sensor mapping?
void DefaultActuator (void)
 Set to default actuator attribute.
void DefaultSensor (void)
 Set to default sensor attribute.
virtual void Actuator (const AttributeVoid &rActuatorAttribute)
 Set actuator attribute.
virtual void Sensor (const AttributeVoid &rSensorAttribute)
 Set sensor attribute.
const AttributeVoidActuatorp (void) const
 Get actuator mapping (return 0 if its not an actuator).
const AttributeVoidSensorp (void) const
 Get sensor mapping (return 0 if its not a sensor).

Protected Member Functions

virtual AttributeDeviceEventDoAssign (const AttributeDeviceEvent &rSrcAttr)
 Copy method.
virtual void DoRead (TokenReader &rTr, const std::string &rLabel="", const Type *pContext=0)
 Reads the attribute from TokenReader, see AttributeVoid for public wrappers.
virtual void DoWrite (TokenWriter &rTw, const std::string &rLabel="", const Type *pContext=0) const
 Writes the attribute to TokenWriter, see AttributeVoid for public wrappers.

Protected Attributes

AttributeVoidmpActuatorAttribute
 Actuator Attribute (use cast in derived classes).
AttributeVoidmpSensorAttribute
 Sensor Attribute (use cast in derived classes).
AttributeVoidpActuatorPrototype
 Actuator Prototype (set to nontrivial attribute in derived classes).
AttributeVoidpSensorPrototype
 Sensor Prototype (set to nontrivial attribute in derived classes).

Static Protected Attributes

static AttributeVoid sFallbackAttribute = AttributeVoid()
 Fallback attribute type.

Detailed Description

Attribute for the configuration of a sensor or actuator mapping.

The base class for all device event attributes only distinguishes between actuator and sensor events. The actual attribute is of type AttributeVoid. Derived classes are meant to override this type in order to provide the defining data for the actual mapping of physical and logical events.

Definition at line 66 of file iop_vdevice.h.


Constructor & Destructor Documentation

faudes::AttributeDeviceEvent::AttributeDeviceEvent ( void   ) 

Default constructor (no attributes, aka undefined).

Definition at line 47 of file iop_vdevice.cpp.

faudes::AttributeDeviceEvent::AttributeDeviceEvent ( const AttributeDeviceEvent rOtherAttr  ) 

Copy constructor.

Definition at line 58 of file iop_vdevice.cpp.

faudes::AttributeDeviceEvent::~AttributeDeviceEvent ( void   )  [virtual]

Destructor.

Definition at line 70 of file iop_vdevice.cpp.


Member Function Documentation

virtual void faudes::AttributeDeviceEvent::Actuator ( const AttributeVoid rActuatorAttribute  )  [inline, virtual]

Set actuator attribute.

Definition at line 105 of file iop_vdevice.h.

const AttributeVoid* faudes::AttributeDeviceEvent::Actuatorp ( void   )  const [inline]

Get actuator mapping (return 0 if its not an actuator).

Reimplemented in faudes::AttributeSignalEvent, and faudes::AttributeSimplenetEvent.

Definition at line 117 of file iop_vdevice.h.

void faudes::AttributeDeviceEvent::Clear ( void   )  [virtual]

Clear.

Reimplemented from faudes::AttributeVoid.

Reimplemented in faudes::AttributeSignalEvent, and faudes::AttributeSimplenetEvent.

Definition at line 76 of file iop_vdevice.cpp.

void faudes::AttributeDeviceEvent::DefaultActuator ( void   )  [inline]

Set to default actuator attribute.

Definition at line 93 of file iop_vdevice.h.

void faudes::AttributeDeviceEvent::DefaultSensor ( void   )  [inline]

Set to default sensor attribute.

Definition at line 99 of file iop_vdevice.h.

AttributeDeviceEvent & faudes::AttributeDeviceEvent::DoAssign ( const AttributeDeviceEvent rSrcAttr  )  [protected, virtual]

Copy method.

Parameters:
rSrcAttr Source to copy from
Returns:
Ref to this attribute

Definition at line 84 of file iop_vdevice.cpp.

void faudes::AttributeDeviceEvent::DoRead ( TokenReader rTr,
const std::string &  rLabel = "",
const Type pContext = 0 
) [protected, virtual]

Reads the attribute from TokenReader, see AttributeVoid for public wrappers.

If the current token indicates a "Sensor" or "Actuator" section, the method reads that section. Else it does nothing. Exceptions may only be thrown on invalid data within the section. The label argument is ignored. The context argument is ignored.

Parameters:
rTr TokenReader to read from
rLabel Section to read
pContext Read context to provide contextual information
Exceptions:
Exception 
  • IO error (id 1)

Reimplemented from faudes::AttributeVoid.

Definition at line 103 of file iop_vdevice.cpp.

void faudes::AttributeDeviceEvent::DoWrite ( TokenWriter rTw,
const std::string &  rLabel = "",
const Type pContext = 0 
) const [protected, virtual]

Writes the attribute to TokenWriter, see AttributeVoid for public wrappers.

Writes all present device event attributes to include the defining data. The label argument is ignored, we use hardcoded lebels "Sensor" or "Actuator". The context argument is ignored.

Parameters:
rTw TokenWriter to write to
rLabel Section to write
pContext Read context to provide contextual information
Exceptions:
Exception 
  • IO error (id 2)

Reimplemented from faudes::AttributeVoid.

Definition at line 96 of file iop_vdevice.cpp.

bool faudes::AttributeDeviceEvent::IsActuator ( void   )  const [inline]

Does this attribute define an actuator mapping?

Definition at line 87 of file iop_vdevice.h.

virtual bool faudes::AttributeDeviceEvent::IsDefault ( void   )  const [inline, virtual]

Test for default value (undefined).

Reimplemented from faudes::AttributeVoid.

Reimplemented in faudes::AttributeSignalEvent, and faudes::AttributeSimplenetEvent.

Definition at line 84 of file iop_vdevice.h.

bool faudes::AttributeDeviceEvent::IsSensor ( void   )  const [inline]

Does this attribute define a sensor mapping?

Definition at line 90 of file iop_vdevice.h.

virtual void faudes::AttributeDeviceEvent::Sensor ( const AttributeVoid rSensorAttribute  )  [inline, virtual]

Set sensor attribute.

Definition at line 111 of file iop_vdevice.h.

const AttributeVoid* faudes::AttributeDeviceEvent::Sensorp ( void   )  const [inline]

Get sensor mapping (return 0 if its not a sensor).

Reimplemented in faudes::AttributeSignalEvent, and faudes::AttributeSimplenetEvent.

Definition at line 120 of file iop_vdevice.h.


Member Data Documentation

Actuator Attribute (use cast in derived classes).

Definition at line 120 of file iop_vdevice.h.

Sensor Attribute (use cast in derived classes).

Definition at line 129 of file iop_vdevice.h.

Actuator Prototype (set to nontrivial attribute in derived classes).

Definition at line 132 of file iop_vdevice.h.

Sensor Prototype (set to nontrivial attribute in derived classes).

Definition at line 135 of file iop_vdevice.h.

Fallback attribute type.

Definition at line 138 of file iop_vdevice.h.


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

libFAUDES 2.16b --- 2010-9-8 --- c++ source docu by doxygen 1.6.3