libFAUDES

Sections

Index

faudes::AttributeSignalSensor Class Reference

#include <iop_sdevice.h>

Inherits faudes::AttributeVoid.

List of all members.


Detailed Description

Configuration of a signal based sensor mapping.

A sensor mapping consists of a list of abstract bitaddresses with an edge polarity each. When on one of respecive physical input lines an edge with matching priority is sensed, the logical event is triggered.

Definition at line 127 of file iop_sdevice.h.


Public Member Functions

virtual AttributeSignalSensorNew (void) const
 Construct on heap.
virtual AttributeSignalSensorCopy (void) const
 Construct on heap.
virtual const
AttributeSignalSensor
Cast (const Type *pOther) const
 Cast other object to this type.
virtual AttributeSignalSensorAssign (const Type &rSrc)
 Assign configuration data from other object.
virtual bool Equal (const Type &rOther) const
 Test equality of configuration data.
virtual AttributeSignalSensoroperator= (const AttributeSignalSensor &rSrc)
virtual bool operator== (const AttributeSignalSensor &rOther) const
virtual bool operator!= (const AttributeSignalSensor &rOther) const
 AttributeSignalSensor (void)
 Default constructor (no triggers).
 AttributeSignalSensor (const AttributeSignalSensor &rOtherAttr)
 Copy constructor.
virtual bool IsDefault (void) const
 Test for default value (never).
virtual void Clear (void)
 Clear.

Public Attributes

std::vector< TriggermTriggers
 List of triggers.

Protected Member Functions

virtual AttributeSignalSensorDoAssign (const AttributeSignalSensor &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.

Classes

struct  Trigger
 Typedef for a single sensor trigger. More...

Constructor & Destructor Documentation

faudes::AttributeSignalSensor::AttributeSignalSensor ( void   )  [inline]

Default constructor (no triggers).

Definition at line 134 of file iop_sdevice.h.

faudes::AttributeSignalSensor::AttributeSignalSensor ( const AttributeSignalSensor rOtherAttr  )  [inline]

Copy constructor.

Definition at line 137 of file iop_sdevice.h.


Member Function Documentation

AttributeSignalSensor * faudes::AttributeSignalSensor::New ( void   )  const [virtual]

Construct on heap.

Technically not a constructor, this function creates an object with the same type Type. New() is defined as a virtual function and derived classes are meant to re-implement with the appropiate constructor. This can be done via the provided macros FAUDES_TYPE_DECLARATION and FAUDES_TYPE_IMPLEMENTATION. As with new, it is the callers reponsabilty to delete the object when no longer needed.

Returns:
Pointer to new Type object

Reimplemented from faudes::AttributeVoid.

Definition at line 130 of file iop_sdevice.cpp.

AttributeSignalSensor * faudes::AttributeSignalSensor::Copy ( void   )  const [virtual]

Construct on heap.

Technically not a constructor, this function creates an object with the same type Type and the same configuration. Copy() is defined as a virtual function and derived classes are meant to re-implement with the appropiate copy constructor. This can be done via the provided macros FAUDES_TYPE_DECLARATION and FAUDES_TYPE_IMPLEMENTATION. As with new, it is the callers reponsabilty to delete the object when no longer needed.

Returns:
Pointer to new Type object

Reimplemented from faudes::AttributeVoid.

Definition at line 130 of file iop_sdevice.cpp.

const AttributeSignalSensor * faudes::AttributeSignalSensor::Cast ( const Type pOther  )  const [virtual]

Cast other object to this type.

Enables the run-time interface to test whether pObject is derived from this object. This feature is used e.g. in the faudes container classes to test attributes. Derived classes must reimplement this function using the appropriate dynamic cast.

Re-implementation can be done via the convenience macros FAUDES_TYPE_DECLARATION and FAUDES_TYPE_IMPLEMENTATION.

Returns:
Typed pointer object

Reimplemented from faudes::AttributeVoid.

Definition at line 130 of file iop_sdevice.cpp.

AttributeSignalSensor & faudes::AttributeSignalSensor::Assign ( const Type rSrc  )  [virtual]

Assign configuration data from other object.

Derived classes should reimplement this method to first try to cast the source to the respective class. If successful, the protected function DoAssign is invoked to perform the actual assignment. If the cast fails, the Assign method of the parent class is called. Thus, faudes objects are up- and downcatsted for assignment, maintaining as much of the source data as digestable by the destination object. On the downside, there is no sensible typechecking at compile-time.

Re-implementation can be done via the convenience macros FAUDES_TYPE_DECLARATION and FAUDES_TYPE_IMPLEMENTATION.

Parameters:
rSrc Source to copy from
Returns:
Reference to this object.

Reimplemented from faudes::AttributeVoid.

Definition at line 130 of file iop_sdevice.cpp.

bool faudes::AttributeSignalSensor::Equal ( const Type rOther  )  const [virtual]

Test equality of configuration data.

Derived classes should reimplement this method to return true if both actual types and configuration data match. The object name is not consired in the test.

This method calls the virtual method DoEqual(). Re-implementation can be done via the convenience macros FAUDES_TYPE_DECLARATION and FAUDES_TYPE_IMPLEMENTATION.

Parameters:
rOther Other objevt to compare with.
Returns:
True on match.

Reimplemented from faudes::AttributeVoid.

Definition at line 130 of file iop_sdevice.cpp.

AttributeSignalSensor & faudes::AttributeSignalSensor::operator= ( const AttributeSignalSensor rSrc  )  [virtual]

Definition at line 130 of file iop_sdevice.cpp.

bool faudes::AttributeSignalSensor::operator== ( const AttributeSignalSensor rOther  )  const [virtual]

Definition at line 130 of file iop_sdevice.cpp.

bool faudes::AttributeSignalSensor::operator!= ( const AttributeSignalSensor rOther  )  const [virtual]

Definition at line 130 of file iop_sdevice.cpp.

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

Test for default value (never).

Reimplemented from faudes::AttributeVoid.

Definition at line 141 of file iop_sdevice.h.

virtual void faudes::AttributeSignalSensor::Clear ( void   )  [inline, virtual]

Clear.

Reimplemented from faudes::AttributeVoid.

Definition at line 144 of file iop_sdevice.h.

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

Copy method.

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

Definition at line 134 of file iop_sdevice.cpp.

void faudes::AttributeSignalSensor::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 mapping, 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, we use the hardcoded section "Sensor" for sensor attributes. 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 168 of file iop_sdevice.cpp.

void faudes::AttributeSignalSensor::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 the sensor mapping data.The label argument is ignored, we use the hardcoded section "Sensor". 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 142 of file iop_sdevice.cpp.


Member Data Documentation

List of triggers.

Definition at line 154 of file iop_sdevice.h.


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

libFAUDES 2.14g --- 2009-12-3 --- c++ source docu by doxygen 1.5.6