15#ifndef __igtlSensorMessage_h
16#define __igtlSensorMessage_h
68 int SetValue(
unsigned int i, igtlFloat64 value);
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.
virtual int GetBodyPackSize()
Gets the size of the serialized body.
igtlUnit m_Unit
Unit (generated by igtl::Unit::Pack()).
virtual int UnpackBody()
Unpacks (deserialize) the body. Must be implemented in a child class.
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).
virtual int PackBody()
Packs (serialize) the body. Must be implemented in a child class.
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...