|
PdCom
4.2
Process data communication client
|
#include <Variable.h>
Classes | |
| class | Subscription |
| Subscription class. More... | |
Public Types | |
| enum | Type { boolean_T = 0, uint8_T, int8_T, uint16_T, int16_T, uint32_T, int32_T, uint64_T, int64_T, double_T, single_T } |
| Variable's type. | |
Public Member Functions | |
| Variable (Type type, double sampleTime, size_t task, bool writeable, const std::string &alias, size_t ndim, const size_t *dims) | |
| Constructor. | |
| virtual std::string | name () const =0 |
| Short name without leading path. | |
| virtual std::string | path () const =0 |
| complete path, including name() | |
| bool | isScalar () const |
| Scalar test. | |
| size_t | isVector () const |
| Test for a vector. More... | |
| bool | setStringValue (const std::string &value) const |
| Set a parameter's value. More... | |
| template<typename T > | |
| bool | setValue (const T *val, size_t offset, size_t nelem) const |
| Set a parameter's value. More... | |
| bool | read (std::istream &is) const |
| Set a parameter's value. More... | |
Public Attributes | |
| const Type | type |
| Data type. | |
| const char *const | ctype |
| c-type string One of: More... | |
| const double | sampleTime |
| sample time of variable; 0 for parameters | |
| const size_t | task |
| Task id of signals. More... | |
| const bool | writeable |
| Can be written to, for parameters. | |
| const std::string | alias |
| Optional alias. | |
| const size_t | nelem |
| Number of elements. | |
| const std::vector< size_t > | dim |
| Dimension array. | |
| const size_t | typeWidth |
| sizeof(datatype) | |
| const size_t | bytes |
| memory required to store everything | |
| size_t PdCom::Variable::isVector | ( | ) | const |
Test for a vector.
A scalar is also a vector with one element
| bool PdCom::Variable::read | ( | std::istream & | is | ) | const |
Set a parameter's value.
| is | a std::istream value. Elements must be delimited by any non-numeric character. |
| bool PdCom::Variable::setStringValue | ( | const std::string & | value | ) | const |
| bool PdCom::Variable::setValue | ( | const T * | val, |
| size_t | offset, | ||
| size_t | nelem | ||
| ) | const |
Set a parameter's value.
| val | value buffer to read from. Must have at lease nelem elements |
| offset | Starting index |
| nelem | number of elements to write |
| const char* const PdCom::Variable::ctype |
c-type string One of:
| const size_t PdCom::Variable::task |
Task id of signals.
Note that signals of the same task may have different sample times, indicating that the signal is subrated within the task
1.8.14