14 uint32_t CIMUEvent::s_IdCounter = 0;
15 pthread_mutex_t CIMUEvent::s_IdCounterMutex = PTHREAD_MUTEX_INITIALIZER;
19 m_TimeStamp(TimeStamp), m_EventType(
EventType), m_pIMUDevice(pIMUDevice), m_IMUState(EventState)
24 m_Id(CreatId()), m_TimeStamp(TimeStamp), m_EventType(
EventType), m_pIMUDevice(pIMUDevice), m_IMUState(pIMUDevice->GetIMUState())
29 m_Id(CreatId()), m_TimeStamp(
CTimeStamp::GetCurrentTimeStamp()), m_EventType(
EventType), m_pIMUDevice(pIMUDevice), m_IMUState(pIMUDevice->GetIMUState())
34 m_Id(CreatId()), m_TimeStamp(Event.m_TimeStamp), m_EventType(Event.m_EventType), m_pIMUDevice(Event.m_pIMUDevice), m_IMUState(Event.m_IMUState)
39 m_Id(CreatId()), m_TimeStamp(
CTimeStamp::s_Zero), m_EventType(
EventType(0x0)), m_pIMUDevice(nullptr), m_IMUState()
46 uint32_t CIMUEvent::CreatId()
48 pthread_mutex_lock(&s_IdCounterMutex);
49 uint32_t Id = CIMUEvent::s_IdCounter++;
50 pthread_mutex_unlock(&s_IdCounterMutex);