You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
58 lines
1.2 KiB
58 lines
1.2 KiB
// SensorDopler.cpp: implementation of the CSensorDopler class.
|
|
//
|
|
//////////////////////////////////////////////////////////////////////
|
|
|
|
#include "stdafx.h"
|
|
#include "SensorDopler.h"
|
|
|
|
//////////////////////////////////////////////////////////////////////
|
|
// Construction/Destruction
|
|
//////////////////////////////////////////////////////////////////////
|
|
|
|
CSensorDopler::CSensorDopler()
|
|
{
|
|
|
|
}
|
|
|
|
CSensorDopler::~CSensorDopler()
|
|
{
|
|
|
|
}
|
|
|
|
void CSensorDopler::ConnectToDevice( CDeviceDopler *pDevice )
|
|
{
|
|
m_pDevice = pDevice;
|
|
pDevice->SetSensorDopler( this );
|
|
}
|
|
|
|
BOOL CSensorDopler::SetDoplerMask( CLgDeviceDopler::DOPLER_MASK_ARRAY* pMask )
|
|
{
|
|
DOPLEREVENT event;
|
|
event.id = DOPLEREVENT::ET_MASK;
|
|
event.mask = *pMask;
|
|
::GetLocalTime( &event.time );
|
|
m_Queue.Push( event );
|
|
return TRUE;
|
|
}
|
|
|
|
void CSensorDopler::CheckState()
|
|
{
|
|
DOPLEREVENT event;
|
|
EVENT e;
|
|
SYSTEMTIME st;
|
|
__int64 time;
|
|
|
|
while( m_Queue.Pop( event ) )
|
|
{
|
|
switch( event.id )
|
|
{
|
|
case DOPLEREVENT::ET_MASK:
|
|
// log info
|
|
LGLOG( LOG_LEVEL_MEDIUM, LOG_TYPE_INFO, this, _T("CSensorDopler::CheckState"), _T("received DOPLEREVENT::ET_MASK") );
|
|
|
|
m_Mask = event.mask;
|
|
|
|
break;
|
|
}
|
|
}
|
|
}
|