15#ifndef __igtlSensorMessage_h
16#define __igtlSensorMessage_h
68 int SetValue(
unsigned int i, igtlFloat64 value);
virtual int UnpackContent()
Unpacks (deserialize) the content. Must be implemented in all child classes.
int SetUnit(igtl::Unit *unit)
Sets the unit for the sensor values Returns 1 if success.
SmartPointer< Self > Pointer
int SetValue(igtlFloat64 *data)
Sets sensor values from an array of 64-bit floating data. Returns 1 if success.
igtlFloat64 GetValue(unsigned int i)
Gets the value of the i-th sensor.
igtlUnit m_Unit
Unit (generated by igtl::Unit::Pack()).
virtual int CalculateContentBufferSize()
Gets the size of the serialized content.
virtual int PackContent()
Packs (serialize) the content. Must be implemented in all child classes.
SmartPointer< const Self > ConstPointer
int SetUnit(igtlUnit unit)
Sets the unit for the sensor values. Returns 1 if success.
igtlTypeMacro(igtl::SensorMessage, igtl::MessageBase)
igtlUint8 m_Status
Sensor status (Reserved).
unsigned int GetLength()
Gets the length of the array.
igtlUnit GetUnit()
Gets the unit as 64-bit unit field defined in igtlUnit.h.
std::vector< igtlFloat64 > m_Array
The array of sensor values.
int SetValue(unsigned int i, igtlFloat64 value)
Sets the value for the i-th sensor. Returns 1 if success.
igtlUint8 m_Length
Length of sensor array.
igtlNewMacro(igtl::SensorMessage)
int GetUnit(igtl::Unit *unit)
Gets the unit as igtl::Unit class.
int SetLength(unsigned int n)
Sets the length of the array. Returns the resulted length.
Implements transparent reference counting.
The "igtl" namespace contains all OpenIGTLink classes. There are several nested namespaces within the...