IMUEvent.h
Go to the documentation of this file.
1
/*
2
* IMUEvent.h
3
*
4
* Created on: Mar 16, 2014
5
* Author: Dr.-Ing. David Israel González Aguirre
6
* Mail: david.gonzalez@kit.edu
7
*/
8
9
#pragma once
10
11
#include "
IMUHelpers.h
"
12
#include "
IMUState.h
"
13
14
namespace
IMU
15
{
16
class
CIMUDevice;
17
18
class
CIMUEvent
19
{
20
public
:
21
enum
EventType
22
{
23
eOnIMUStart
= 0X0001,
24
eOnIMUStop
= 0X0002,
25
eOnIMUCycle
= 0X0004,
26
eOnIMUFusedCycle
= 0X0008,
27
eOnIMUIntegratedState
= 0X0010,
28
eOnIMUCustomEvent
= 0X8000
29
};
30
31
CIMUEvent
(
const
timeval& TimeStamp,
32
const
EventType
EventType
,
33
const
CIMUDevice
* pIMUDevice,
34
const
IMUState
& EventState);
35
CIMUEvent
(
const
timeval& TimeStamp,
36
const
EventType
EventType
,
37
const
CIMUDevice
* pIMUDevice);
38
CIMUEvent
(
const
EventType
EventType
,
const
CIMUDevice
* pIMUDevice);
39
CIMUEvent
(
const
CIMUEvent
& Event);
40
CIMUEvent
();
41
42
virtual
~CIMUEvent
();
43
44
inline
uint32_t
45
GetId
()
const
46
{
47
return
m_Id
;
48
}
49
50
inline
EventType
51
GetEventType
()
const
52
{
53
return
m_EventType
;
54
}
55
56
inline
const
CIMUDevice
*
57
GetIMU
()
const
58
{
59
return
m_pIMUDevice
;
60
}
61
62
inline
const
timeval&
63
GetTimeStamp
()
const
64
{
65
return
m_TimeStamp
;
66
}
67
68
protected
:
69
uint32_t
m_Id
;
70
const
timeval
m_TimeStamp
;
71
const
EventType
m_EventType
;
72
const
CIMUDevice
*
m_pIMUDevice
;
73
const
IMUState
m_IMUState
;
74
75
private
:
76
static
uint32_t CreatId();
77
static
uint32_t s_IdCounter;
78
static
pthread_mutex_t s_IdCounterMutex;
79
};
80
}
// namespace IMU
IMU::CIMUEvent::GetId
uint32_t GetId() const
Definition:
IMUEvent.h:45
IMU::CIMUEvent::m_IMUState
const IMUState m_IMUState
Definition:
IMUEvent.h:73
IMU::CIMUEvent::EventType
EventType
Definition:
IMUEvent.h:21
IMU::CIMUEvent::CIMUEvent
CIMUEvent()
Definition:
IMUEvent.cpp:59
IMU::CIMUEvent::eOnIMUStart
@ eOnIMUStart
Definition:
IMUEvent.h:23
IMU::CIMUEvent::m_TimeStamp
const timeval m_TimeStamp
Definition:
IMUEvent.h:70
IMU::CIMUEvent::~CIMUEvent
virtual ~CIMUEvent()
IMU::CIMUEvent::m_pIMUDevice
const CIMUDevice * m_pIMUDevice
Definition:
IMUEvent.h:72
IMU::CIMUEvent
Definition:
IMUEvent.h:18
IMU::CIMUEvent::GetIMU
const CIMUDevice * GetIMU() const
Definition:
IMUEvent.h:57
IMU::CIMUEvent::eOnIMUCustomEvent
@ eOnIMUCustomEvent
Definition:
IMUEvent.h:28
IMU::CIMUEvent::eOnIMUIntegratedState
@ eOnIMUIntegratedState
Definition:
IMUEvent.h:27
IMU::CIMUEvent::eOnIMUStop
@ eOnIMUStop
Definition:
IMUEvent.h:24
IMU::CIMUEvent::GetEventType
EventType GetEventType() const
Definition:
IMUEvent.h:51
IMU::CIMUEvent::m_Id
uint32_t m_Id
Definition:
IMUEvent.h:69
IMU::CIMUDevice
This class contains the the devices module and the thread for read the measurements.
Definition:
IMUDevice.h:41
IMU::IMUState
Definition:
IMUState.h:15
IMU
Definition:
IIMUEventDispatcher.cpp:13
IMUHelpers.h
IMU::CIMUEvent::m_EventType
const EventType m_EventType
Definition:
IMUEvent.h:71
IMUState.h
IMU::CIMUEvent::eOnIMUCycle
@ eOnIMUCycle
Definition:
IMUEvent.h:25
IMU::CIMUEvent::GetTimeStamp
const timeval & GetTimeStamp() const
Definition:
IMUEvent.h:63
IMU::CIMUEvent::eOnIMUFusedCycle
@ eOnIMUFusedCycle
Definition:
IMUEvent.h:26
RobotAPI
drivers
XsensIMU
IMU
IMUEvent.h
Generated on Sat Mar 29 2025 09:17:26 for armarx_documentation by
1.8.17