Main Page
Namespace List
Class Hierarchy
Alphabetical List
Compound List
File List
Namespace Members
Compound Members
File Members
Source
igtlSensorMessage.h
Go to the documentation of this file.
1
/*=========================================================================
2
3
Program: OpenIGTLink Library
4
Module: $HeadURL: http://svn.na-mic.org/NAMICSandBox/trunk/OpenIGTLink2_beta/Source/igtlSensorMessage.h $
5
Language: C++
6
Date: $Date: 2009-12-16 23:58:02 -0500 (Wed, 16 Dec 2009) $
7
Version: $Revision: 5466 $
8
9
Copyright (c) Insight Software Consortium. All rights reserved.
10
11
This software is distributed WITHOUT ANY WARRANTY; without even
12
the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
13
PURPOSE. See the above copyright notices for more information.
14
15
=========================================================================*/
16
17
#ifndef __igtlSensorMessage_h
18
#define __igtlSensorMessage_h
19
20
#include <string>
21
22
#include "
igtlObject.h
"
23
#include "
igtlMath.h
"
24
#include "
igtlMessageBase.h
"
25
#include "
igtlTypes.h
"
26
27
#include "
igtlUnit.h
"
28
29
namespace
igtl
30
{
31
32
class
IGTLCommon_EXPORT
SensorMessage
:
public
MessageBase
33
{
34
public
:
35
typedef
SensorMessage
Self
;
36
typedef
MessageBase
Superclass
;
37
typedef
SmartPointer<Self>
Pointer
;
38
typedef
SmartPointer<const Self>
ConstPointer
;
39
40
igtlTypeMacro
(
igtl::SensorMessage
,
igtl::MessageBase
);
41
igtlNewMacro
(
igtl::SensorMessage
);
42
43
public
:
44
45
int
SetLength(
unsigned
int
n);
46
unsigned
int
GetLength();
47
48
//int SetStatus(int i);
49
int
SetUnit(
igtlUnit
unit);
50
int
SetUnit(
igtl::Unit
* unit);
51
igtlUnit
GetUnit();
52
int
GetUnit(
igtl::Unit
* unit);
53
54
int
SetValue(igtlFloat64 * data);
// Set sensor values from array of 64-bit floating data
55
int
SetValue(
unsigned
int
i, igtlFloat64 value);
// Set i-th sensor value
56
igtlFloat64 GetValue(
unsigned
int
i);
// Get i-th sensor value
57
58
protected
:
59
SensorMessage
();
60
~
SensorMessage
();
61
62
protected
:
63
64
virtual
int
GetBodyPackSize();
65
virtual
int
PackBody();
66
virtual
int
UnpackBody();
67
68
igtlUint8
m_Length
;
// Length of sensor array
69
igtlUint8
m_Status
;
// Sensor status (Reserved)
70
igtlUnit
m_Unit
;
// Unit (generated by igtl::Unit::Pack())
71
72
std::vector<igtlFloat64>
m_Array
;
73
74
};
75
76
77
}
// namespace igtl
78
79
#endif // _igtlSensorMessage_h
80
81
82
Generated at Thu Mar 20 2014 16:32:06 for OpenIGTLink by
1.8.1.2 written by
Dimitri van Heesch
, © 1997-2000