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.
80 lines
3.3 KiB
80 lines
3.3 KiB
#ifndef __OBJECT_NET_NODE_2D_HEADERS__
|
|
#define __OBJECT_NET_NODE_2D_HEADERS__
|
|
|
|
#include "rgooseNode.h"
|
|
|
|
#include "../components/base/basicObject.h"
|
|
#include "../components/base/basicMutex.h"
|
|
#include "../components/base/basicThread.h"
|
|
#include "../components/base/basicLogCollection.h"
|
|
#include "../components/base/basicEventHeap.h"
|
|
#include "../components/base/basicPosition.h"
|
|
#include "../components/object/objectSystemAnchor.h"
|
|
#include "../components/base/basicSettingsProvider.h"
|
|
#include "../alg/lgs/mask.h"
|
|
#include "../data/protocol/protocolLGS2D.h"
|
|
|
|
#define LGS_DEFAULT_SLEEP_TIME 300
|
|
#define LGS_ALERT_SLEEP_TIME 10
|
|
#define LGS_DEFAULT_TO_COUNTER 3
|
|
#define LGS_INITIAL_FLIPS 4
|
|
|
|
#define ANODE_WM_2D_BEFORE_START 0
|
|
#define ANODE_WM_2D_CREATE_PORT 1
|
|
#define ANODE_WM_2D_CONNECT 2
|
|
#define ANODE_WM_2D_WAIT_CONNECT 3
|
|
#define ANODE_WM_2D_SET_INIT_MODE 4
|
|
#define ANODE_WM_2D_WAIT_INIT_MODE 5
|
|
#define ANODE_WM_2D_GET_MASTER_PARAM 6
|
|
#define ANODE_WM_2D_WAIT_MASTER_PARAM 7
|
|
#define ANODE_WM_2D_GET_SLAVE_PARAM 8
|
|
#define ANODE_WM_2D_WAIT_SLAVE_PARAM 9
|
|
#define ANODE_WM_2D_SET_BORDER_MODE 10
|
|
#define ANODE_WM_2D_WAIT_BORDER_MODE 11
|
|
#define ANODE_WM_2D_GET_FAST_DRAW 12
|
|
#define ANODE_WM_2D_WAIT_FAST_DRAW 13
|
|
#define ANODE_WM_2D_SET_DETECTION_MODE 14
|
|
#define ANODE_WM_2D_WAIT_DETECTION_MODE 15
|
|
#define ANODE_WM_2D_SET_FILESYSTEM_MODE 16
|
|
#define ANODE_WM_2D_WAIT_FILESYSTEM_MODE 17
|
|
#define ANODE_WM_2D_FS_TRANSFER_MODE 18
|
|
|
|
#define ANODE_WM_2D_PING 128
|
|
#define ANODE_WM_2D_PONG 129
|
|
|
|
#define ANODE_2D_MAX_DRAW_ANGLES 6000
|
|
|
|
class ARGUS_2DSensor: public argusNetNode, public basicThread, public protocolLGS_2D{
|
|
private:
|
|
basicLogCollection * m_pLog;
|
|
basicEventHeap * m_pEventHeap;
|
|
basicEventClassID m_eSensorClass;
|
|
DBC_LRF_DATA m_sLRF_DATA;
|
|
uint8_t m_bPortType;
|
|
basicTransport * m_pPort;
|
|
uint8_t m_bWM;
|
|
basicMutex m_mWMProtector;
|
|
uint8_t m_bDeviceWM;
|
|
uint32_t m_nSleepTime;
|
|
uint8_t m_bTimeOutCounter;
|
|
uint8_t m_bInitialFlips;
|
|
uint16_t m_nCurrentAngle;
|
|
TARGET_DATA * prepareTargetData( uint16_t AZ, uint16_t RANGE, uint32_t WIDTH );
|
|
uint8_t m_bDrawType;
|
|
uint32_t m_vDrawRanges[ANODE_2D_MAX_DRAW_ANGLES];
|
|
void saveRawDrawData( uint16_t alngles );
|
|
uint8_t getWM( void );
|
|
void setWM( uint8_t MD );
|
|
protected:
|
|
virtual bool packetHandler( protocolPackage *Package );
|
|
virtual void m_fThreadProc( void );
|
|
public:
|
|
explicit ARGUS_2DSensor( uint32_t id );
|
|
~ARGUS_2DSensor();
|
|
virtual bool startService();
|
|
virtual bool stopService();
|
|
virtual bool validate();
|
|
virtual void simulateTarget( void );
|
|
};
|
|
|
|
#endif
|