CHAI SDK
Version 1.3
|
Public Member Functions | |
Value () | |
Default constructor. More... | |
Value (Value const &value) | |
Copy constructor. More... | |
Value (CPNS::uint16 const wRawValue, CPNS::boolean const fBipolarRawValue=false) | |
Constructor for raw value only. More... | |
Value (CPNS::uint16 const wRawValue, CPNS::Enums::DataTypes const dataType, void const *const pValue, CPNS::boolean const fBipolarRawValue=false) | |
Constructor for raw value + typed value. More... | |
CPNS::boolean | operator== (CPNS::Value const &a) const |
Operator ==. More... | |
CPNS::uint16 | GetRawValue () const |
Get raw value. More... | |
CPNS::boolean | IsRawValueBipolar () const |
Tells if the raw value is bipolar. More... | |
CPNS::Enums::DataTypes | GetDataType () const |
Get data type. More... | |
CPNS::uint16 | GetUInt16 () const |
Get Unsigned Int 16 value. More... | |
CPNS::uint32 | GetUInt32 () const |
Get Unsigned Int 32 value. More... | |
CPNS::uint64 | GetUInt64 () const |
Get Unsigned Int 64 value. More... | |
CPNS::int16 | GetInt16 () const |
Get Int 16 value. More... | |
CPNS::int32 | GetInt32 () const |
Get Int 32 value. More... | |
CPNS::int64 | GetInt64 () const |
Get Int 64 value. More... | |
CPNS::float32 | GetFloat32 () const |
Get Float 32 value. More... | |
CPNS::float64 | GetFloat64 () const |
Get Float 64 value. More... | |
CPNS::uint8 * | GetBuffer () const |
Get value buffer. More... | |
void | SetRawValue (CPNS::uint16 const wRawValue, CPNS::boolean const fBipolarRawValue=false) |
Set raw value. More... | |
void | SetValue (CPNS::uint16 const wRawValue, CPNS::Enums::DataTypes const dataType, void const *const pValue, CPNS::boolean const fBipolarRawValue=false) |
Set raw value and typed value. More... | |
CPNS::Enums::Errors | SetUInt16 (CPNS::Enums::DataTypes const dataType, CPNS::uint16 const wValue) |
Set unsigned int 16 typed value. More... | |
CPNS::Enums::Errors | SetUInt32 (CPNS::Enums::DataTypes const dataType, CPNS::uint32 const dwValue) |
Set unsigned int 32 typed value. More... | |
CPNS::Enums::Errors | SetUInt64 (CPNS::Enums::DataTypes const dataType, CPNS::uint64 const qwValue) |
Set unsigned int 64 typed value. More... | |
CPNS::Enums::Errors | SetInt16 (CPNS::Enums::DataTypes const dataType, CPNS::int16 const sValue) |
Set signed int 16 typed value. More... | |
CPNS::Enums::Errors | SetInt32 (CPNS::Enums::DataTypes const dataType, CPNS::int32 const lValue) |
Set signed int 32 typed value. More... | |
CPNS::Enums::Errors | SetInt64 (CPNS::Enums::DataTypes const dataType, CPNS::int64 const qlValue) |
Set signed int 64 typed value. More... | |
CPNS::Enums::Errors | SetFloat32 (CPNS::Enums::DataTypes const dataType, CPNS::float32 const fValue) |
Set float 32 typed value. More... | |
CPNS::Enums::Errors | SetFloat64 (CPNS::Enums::DataTypes const dataType, CPNS::float64 const dValue) |
Set float 64 typed value. More... | |
Value container.
Used to manipulate multi-format data.
CPNS::Value::Value | ( | ) |
Default constructor.
CPNS::Value::Value | ( | Value const & | value | ) |
Copy constructor.
[in] | value | source value |
CPNS::Value::Value | ( | CPNS::uint16 const | wRawValue, |
CPNS::boolean const | fBipolarRawValue = false |
||
) |
Constructor for raw value only.
[in] | wRawValue | Encoded in DT_Knob16 or MKZ16 data type, this is the 16 bits view of the data exposed in the specified data type. |
[in] | fBipolarRawValue | TRUE if the raw value is encoded in MKZ16 (0x0001 = -range, 0x8000 = zero, 0xFFFF = +range) |
CPNS::Value::Value | ( | CPNS::uint16 const | wRawValue, |
CPNS::Enums::DataTypes const | dataType, | ||
void const *const | pValue, | ||
CPNS::boolean const | fBipolarRawValue = false |
||
) |
Constructor for raw value + typed value.
[in] | wRawValue | Encoded in DT_Knob16 or MKZ16 data type, this is the 16 bits view of the data exposed in the specified data type. |
[in] | dataType | Typed value data type |
[in] | pValue | Pointer to the variable containing value. |
[in] | fBipolarRawValue | TRUE if the raw value is encoded in MKZ16 (0x0001 = -range, 0x8000 = zero, 0xFFFF = +range) |
CPNS::uint8* CPNS::Value::GetBuffer | ( | ) | const |
Get value buffer.
CPNS::Enums::DataTypes CPNS::Value::GetDataType | ( | ) | const |
Get data type.
CPNS::float32 CPNS::Value::GetFloat32 | ( | ) | const |
Get Float 32 value.
To be used in case of 32 bits data type.
CPNS::float64 CPNS::Value::GetFloat64 | ( | ) | const |
Get Float 64 value.
To be used in case of 64 bits data type.
CPNS::int16 CPNS::Value::GetInt16 | ( | ) | const |
Get Int 16 value.
To be used in case of 16 bits data type.
CPNS::int32 CPNS::Value::GetInt32 | ( | ) | const |
Get Int 32 value.
To be used in case of 32 bits data type.
CPNS::int64 CPNS::Value::GetInt64 | ( | ) | const |
Get Int 64 value.
To be used in case of 64 bits data type.
CPNS::uint16 CPNS::Value::GetRawValue | ( | ) | const |
Get raw value.
CPNS::uint16 CPNS::Value::GetUInt16 | ( | ) | const |
Get Unsigned Int 16 value.
To be used in case of 16 bits data type.
CPNS::uint32 CPNS::Value::GetUInt32 | ( | ) | const |
Get Unsigned Int 32 value.
To be used in case of 32 bits data type.
CPNS::uint64 CPNS::Value::GetUInt64 | ( | ) | const |
Get Unsigned Int 64 value.
To be used in case of 64 bits data type.
CPNS::boolean CPNS::Value::IsRawValueBipolar | ( | ) | const |
Tells if the raw value is bipolar.
CPNS::boolean CPNS::Value::operator== | ( | CPNS::Value const & | a | ) | const |
Operator ==.
[in] | a | compared value |
CPNS::Enums::Errors CPNS::Value::SetFloat32 | ( | CPNS::Enums::DataTypes const | dataType, |
CPNS::float32 const | fValue | ||
) |
Set float 32 typed value.
[in] | dataType | Typed value data type, high nibble must be DTL_32 |
[in] | fValue | Typed value. |
CPNS::Enums::Errors CPNS::Value::SetFloat64 | ( | CPNS::Enums::DataTypes const | dataType, |
CPNS::float64 const | dValue | ||
) |
Set float 64 typed value.
[in] | dataType | Typed value data type, high nibble must be DTL_64 |
[in] | dValue | Typed value. |
CPNS::Enums::Errors CPNS::Value::SetInt16 | ( | CPNS::Enums::DataTypes const | dataType, |
CPNS::int16 const | sValue | ||
) |
Set signed int 16 typed value.
[in] | dataType | Typed value data type, high nibble must be DTL_16 |
[in] | sValue | Typed value. |
CPNS::Enums::Errors CPNS::Value::SetInt32 | ( | CPNS::Enums::DataTypes const | dataType, |
CPNS::int32 const | lValue | ||
) |
Set signed int 32 typed value.
[in] | dataType | Typed value data type, high nibble must be DTL_32 |
[in] | lValue | Typed value. |
CPNS::Enums::Errors CPNS::Value::SetInt64 | ( | CPNS::Enums::DataTypes const | dataType, |
CPNS::int64 const | qlValue | ||
) |
Set signed int 64 typed value.
[in] | dataType | Typed value data type, high nibble must be DTL_64 |
[in] | qlValue | Typed value. |
void CPNS::Value::SetRawValue | ( | CPNS::uint16 const | wRawValue, |
CPNS::boolean const | fBipolarRawValue = false |
||
) |
Set raw value.
[in] | wRawValue | Encoded in DT_Knob16 or MKZ16 data type, this is the 16 bits view of the data exposed in the specified data type. |
[in] | fBipolarRawValue | TRUE if the raw value is encoded in MKZ16 (0x0001 = -range, 0x8000 = zero, 0xFFFF = +range) |
CPNS::Enums::Errors CPNS::Value::SetUInt16 | ( | CPNS::Enums::DataTypes const | dataType, |
CPNS::uint16 const | wValue | ||
) |
Set unsigned int 16 typed value.
[in] | dataType | Typed value data type, high nibble must be DTL_16 |
[in] | wValue | Typed value. |
CPNS::Enums::Errors CPNS::Value::SetUInt32 | ( | CPNS::Enums::DataTypes const | dataType, |
CPNS::uint32 const | dwValue | ||
) |
Set unsigned int 32 typed value.
[in] | dataType | Typed value data type, high nibble must be DTL_32 |
[in] | dwValue | Typed value. |
CPNS::Enums::Errors CPNS::Value::SetUInt64 | ( | CPNS::Enums::DataTypes const | dataType, |
CPNS::uint64 const | qwValue | ||
) |
Set unsigned int 64 typed value.
[in] | dataType | Typed value data type, high nibble must be DTL_64 |
[in] | qwValue | Typed value. |
void CPNS::Value::SetValue | ( | CPNS::uint16 const | wRawValue, |
CPNS::Enums::DataTypes const | dataType, | ||
void const *const | pValue, | ||
CPNS::boolean const | fBipolarRawValue = false |
||
) |
Set raw value and typed value.
[in] | wRawValue | Encoded in DT_Knob16 or MKZ16 data type, this is the 16 bits view of the data exposed in the specified data type. |
[in] | dataType | Typed value data type |
[in] | pValue | Pointer to the variable containing value. |
[in] | fBipolarRawValue | TRUE if the raw value is encoded in MKZ16 (0x0001 = -range, 0x8000 = zero, 0xFFFF = +range) |