Parameters of various types. More...
#include <sockets.h>
Public Member Functions | |
| operator T () const | |
| Get the parameter value. | |
| T * | GetPointer () |
| Get a pointer to the payload data. | |
| const T & | operator= (const T value) |
| Assignment. | |
| const T & | operator+= (const T value) |
| Assignment by addition. | |
| const T & | operator-= (const T value) |
| Assignment by subtraction. | |
| const T & | operator*= (const T value) |
| Assignment by multiplication. | |
| const T & | operator/= (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. | |
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:
| 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 >.
| T* ParameterT< T >::GetPointer | ( | ) | [inline] |
Get a pointer to the payload data.
Returns a pointer to the underlying data type.
Reimplemented from SocketT< T >.
| virtual const char* ParameterT< T >::GetType | ( | ) | [virtual] |
Get the class type name.
For example Socket8 would return "Socket8"
Reimplemented from SocketT< T >.
| virtual bool ParameterT< T >::IsParameter | ( | ) | [inline, virtual] |
Returns true if this is a parameter.
Reimplemented from Socket.
| ParameterT< T >::operator T | ( | ) | const [inline] |
Get the parameter value.
Reimplemented from SocketT< T >.
| const T& ParameterT< T >::operator*= | ( | const T | value | ) | [inline] |
Assignment by multiplication.
Reimplemented from SocketT< T >.
| const T& ParameterT< T >::operator+= | ( | const T | value | ) | [inline] |
Assignment by addition.
Reimplemented from SocketT< T >.
| const T& ParameterT< T >::operator-= | ( | const T | value | ) | [inline] |
Assignment by subtraction.
Reimplemented from SocketT< T >.
| const T& ParameterT< T >::operator/= | ( | const T | value | ) | [inline] |
Assignment by division.
Reimplemented from SocketT< T >.
| const T& ParameterT< T >::operator= | ( | const T | value | ) | [inline] |
Assignment.
Reimplemented from SocketT< 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.
| virtual void ParameterT< T >::Print | ( | class Print & | dest | ) | [virtual] |
Print the contents of the socket to the given print destination.
Reimplemented from SocketT< T >.
1.7.0