VR-Forces 4.8 Class Documentation
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
List of all members | Public Member Functions | Static Public Attributes | Protected Types | Protected Member Functions | Protected Attributes | Friends
makVrv::DtSensor Class Reference

Definition of a sensor. More...

Public Member Functions

 DtSensor ()
 CTOR. More...
 
virtual ~DtSensor ()
 DTOR. More...
 
virtual std::string name () const
 Returns "DtSensor". More...
 
virtual std::string moduleName () const
 Returns the sensor module this sensor is set up for. More...
 
virtual bool attributeExists (const std::string &attributeName)
 Check whether the specified attribute exists in the sensor. More...
 
virtual void getRecord (makArchives::DtSensorRecord &record) const
 Fill in a record from the sensor's state. More...
 
virtual void setFromRecord (const makArchives::DtSensorRecord &record)
 Fill in the sensor's state from a record. More...
 
Get an attribute of the sensor
virtual int attributeInt (const std::string &attributeName) const
 
virtual float attributeFloat (const std::string &attributeName) const
 
virtual bool attributeBool (const std::string &attributeName) const
 
virtual const std::string & attributeString (const std::string &attributeName) const
 

Public Attributes

Emitted when an attribute is changed, gives the attribute name and value
boost::signal< void(const
std::string &, int)> 
signal_attributeChangedInt
 
boost::signal< void(const
std::string &, bool)> 
signal_attributeChangedBool
 
boost::signal< void(const
std::string &, const
std::string &)> 
signal_attributeChangedString
 
boost::signal< void(const
std::string &, float)> 
signal_attributeChangedFloat
 
boost::signal< void(const
DtSensor *)> 
signal_setFromRecord
 

Static Public Attributes

static const std::string theNullSensorName
 Special name used to indicate the "Null" sensor, which has no effect. More...
 

Protected Types

typedef std::map< std::string,
int
AttributeMapInt
 
typedef std::map< std::string,
float > 
AttributeMapFloat
 
typedef std::map< std::string,
bool
AttributeMapBool
 
typedef std::map< std::string,
std::string > 
AttributeMapString
 

Protected Member Functions

virtual void setName (const std::string &name)
 Set the sensor's unique name. More...
 
virtual void setModuleName (const std::string &modName)
 Set the sensor module this sensor is using. More...
 
Set an attribute of the sensor
virtual void setAttribute (const std::string &attributeName, int val)
 
virtual void setAttribute (const std::string &attributeName, bool val)
 
virtual void setAttribute (const std::string &attributeName, float val)
 
virtual void setAttribute (const std::string &attributeName, const std::string &val)
 

Protected Attributes

AttributeMapInt myAttributesInt
 
AttributeMapBool myAttributesBool
 
AttributeMapFloat myAttributesFloat
 
AttributeMapString myAttributesString
 
std::string myName
 
std::string myModuleName
 

Friends

class DtSensorController
 

Detailed Description

Definition of a sensor.

Contains sensor-specific parameters and the name of the sensor module used to realize it

Member Typedef Documentation

typedef std::map<std::string, int> makVrv::DtSensor::AttributeMapInt
protected
typedef std::map<std::string, float> makVrv::DtSensor::AttributeMapFloat
protected
typedef std::map<std::string, bool> makVrv::DtSensor::AttributeMapBool
protected
typedef std::map<std::string, std::string> makVrv::DtSensor::AttributeMapString
protected

Constructor & Destructor Documentation

makVrv::DtSensor::DtSensor ( )

CTOR.

virtual makVrv::DtSensor::~DtSensor ( )
virtual

DTOR.

Member Function Documentation

virtual std::string makVrv::DtSensor::name ( ) const
virtual

Returns "DtSensor".

virtual std::string makVrv::DtSensor::moduleName ( ) const
virtual

Returns the sensor module this sensor is set up for.

virtual bool makVrv::DtSensor::attributeExists ( const std::string &  attributeName)
virtual

Check whether the specified attribute exists in the sensor.

virtual int makVrv::DtSensor::attributeInt ( const std::string &  attributeName) const
virtual
virtual float makVrv::DtSensor::attributeFloat ( const std::string &  attributeName) const
virtual
virtual bool makVrv::DtSensor::attributeBool ( const std::string &  attributeName) const
virtual
virtual const std::string& makVrv::DtSensor::attributeString ( const std::string &  attributeName) const
virtual
virtual void makVrv::DtSensor::getRecord ( makArchives::DtSensorRecord record) const
virtual

Fill in a record from the sensor's state.

virtual void makVrv::DtSensor::setFromRecord ( const makArchives::DtSensorRecord record)
virtual

Fill in the sensor's state from a record.

virtual void makVrv::DtSensor::setName ( const std::string &  name)
protectedvirtual

Set the sensor's unique name.

virtual void makVrv::DtSensor::setModuleName ( const std::string &  modName)
protectedvirtual

Set the sensor module this sensor is using.

virtual void makVrv::DtSensor::setAttribute ( const std::string &  attributeName,
int  val 
)
protectedvirtual
virtual void makVrv::DtSensor::setAttribute ( const std::string &  attributeName,
bool  val 
)
protectedvirtual
virtual void makVrv::DtSensor::setAttribute ( const std::string &  attributeName,
float  val 
)
protectedvirtual
virtual void makVrv::DtSensor::setAttribute ( const std::string &  attributeName,
const std::string &  val 
)
protectedvirtual

Friends And Related Function Documentation

friend class DtSensorController
friend

Member Data Documentation

const std::string makVrv::DtSensor::theNullSensorName
static

Special name used to indicate the "Null" sensor, which has no effect.

boost::signal<void (const std::string&, int)> makVrv::DtSensor::signal_attributeChangedInt
boost::signal<void (const std::string&, bool)> makVrv::DtSensor::signal_attributeChangedBool
boost::signal<void (const std::string&, const std::string&)> makVrv::DtSensor::signal_attributeChangedString
boost::signal<void (const std::string&, float)> makVrv::DtSensor::signal_attributeChangedFloat
boost::signal<void (const DtSensor*)> makVrv::DtSensor::signal_setFromRecord
AttributeMapInt makVrv::DtSensor::myAttributesInt
protected
AttributeMapBool makVrv::DtSensor::myAttributesBool
protected
AttributeMapFloat makVrv::DtSensor::myAttributesFloat
protected
AttributeMapString makVrv::DtSensor::myAttributesString
protected
std::string makVrv::DtSensor::myName
protected
std::string makVrv::DtSensor::myModuleName
protected

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

Document ID: Generated on Thu Aug 27 10:56:05 EDT 2020 from SVN revision 217100
Copyright © 2005-2020 MAK Technologies. All Rights Reserved (www.mak.com)