Public Member Functions

ParameterT< T > Class Template Reference

Parameters of various types. More...

#include <sockets.h>

Inheritance diagram for ParameterT< T >:
SocketT< T > Socket

List of all members.

Public Member Functions

 operator T () const
 Get the parameter value.
TGetPointer ()
 Get a pointer to the payload data.
const Toperator= (const T value)
 Assignment.
const Toperator+= (const T value)
 Assignment by addition.
const Toperator-= (const T value)
 Assignment by subtraction.
const Toperator*= (const T value)
 Assignment by multiplication.
const Toperator/= (const T value)
 Assignment by division.
virtual const char * GetType ()
 Get the class type name.
virtual void Print (class Print &dest)
 Print the contents of the socket to the given print destination.
virtual void * GetPayload (int &size)
 Get the underlying data as raw memory.
virtual bool IsParameter ()
 Returns true if this is a parameter.
virtual bool Parse (const char *string)
 Parse a string value.

Detailed Description

template<class T>
class ParameterT< T >

Parameters of various types.

Parameters are like non-volatile sockets. They are stored in EEPROM They can be read by other modules. Writing to them is a special case and has to be done via ModuleManager. Have look at the serial module for an example.

Currently defined are:


Member Function Documentation

template<class T >
virtual void* ParameterT< T >::GetPayload ( int &  size  )  [virtual]

Get the underlying data as raw memory.

Returns a pointer to the data and sets size to the size of the data

Reimplemented from SocketT< T >.

template<class T >
T* ParameterT< T >::GetPointer (  )  [inline]

Get a pointer to the payload data.

Returns a pointer to the underlying data type.

Reimplemented from SocketT< T >.

template<class T >
virtual const char* ParameterT< T >::GetType (  )  [virtual]

Get the class type name.

For example Socket8 would return "Socket8"

Reimplemented from SocketT< T >.

template<class T >
virtual bool ParameterT< T >::IsParameter (  )  [inline, virtual]

Returns true if this is a parameter.

Reimplemented from Socket.

template<class T >
ParameterT< T >::operator T (  )  const [inline]

Get the parameter value.

Reimplemented from SocketT< T >.

template<class T >
const T& ParameterT< T >::operator*= ( const T  value  )  [inline]

Assignment by multiplication.

Reimplemented from SocketT< T >.

template<class T >
const T& ParameterT< T >::operator+= ( const T  value  )  [inline]

Assignment by addition.

Reimplemented from SocketT< T >.

template<class T >
const T& ParameterT< T >::operator-= ( const T  value  )  [inline]

Assignment by subtraction.

Reimplemented from SocketT< T >.

template<class T >
const T& ParameterT< T >::operator/= ( const T  value  )  [inline]

Assignment by division.

Reimplemented from SocketT< T >.

template<class T >
const T& ParameterT< T >::operator= ( const T  value  )  [inline]

Assignment.

Reimplemented from SocketT< T >.

template<class T >
virtual bool ParameterT< T >::Parse ( const char *  string  )  [inline, virtual]

Parse a string value.

The string value is converted to the parameters's data type.

For instance a ParameterF would change it's value to the value string.

Reimplemented from Socket.

template<class T >
virtual void ParameterT< T >::Print ( class Print &  dest  )  [virtual]

Print the contents of the socket to the given print destination.

Reimplemented from SocketT< T >.


The documentation for this class was generated from the following file:
 All Classes Namespaces Files Functions Variables Enumerations Enumerator Defines