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.
134 lines
5.6 KiB
134 lines
5.6 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 333
|
|
#define LGS_ALERT_SLEEP_TIME 10
|
|
#define LGS_DEFAULT_TO_COUNTER 10
|
|
#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_SERIAL_NUM 6
|
|
#define ANODE_WM_2D_WAIT_SERIAL_NUM 7
|
|
#define ANODE_WM_2D_GET_VERSION 8
|
|
#define ANODE_WM_2D_WAIT_VERSION 9
|
|
#define ANODE_WM_2D_GET_DETECTION_PROFILE 10
|
|
#define ANODE_WM_2D_WAIT_DETECTION_PROFILE 11
|
|
#define ANODE_WM_2D_GET_MASTER_PARAM 12
|
|
#define ANODE_WM_2D_WAIT_MASTER_PARAM 13
|
|
#define ANODE_WM_2D_GET_SLAVE_PARAM 14
|
|
#define ANODE_WM_2D_WAIT_SLAVE_PARAM 15
|
|
|
|
#define ANODE_WM_2D_SET_BORDER_MODE 16
|
|
#define ANODE_WM_2D_WAIT_BORDER_MODE 17
|
|
#define ANODE_WM_2D_GET_FAST_DRAW 18
|
|
#define ANODE_WM_2D_WAIT_FAST_DRAW 19
|
|
#define ANODE_WM_2D_SET_DETECTION_MODE 20
|
|
#define ANODE_WM_2D_WAIT_DETECTION_MODE 21
|
|
#define ANODE_WM_2D_SET_FILESYSTEM_MODE 22
|
|
#define ANODE_WM_2D_WAIT_FILESYSTEM_MODE 23
|
|
#define ANODE_WM_2D_FS_TRANSFER_MODE 24
|
|
|
|
#define ANODE_WM_2D_ISSUE_FULL_RESET 64
|
|
#define ANODE_WM_2D_WAIT_FULL_RESET 65
|
|
|
|
#define ANODE_WM_2D_PING 128
|
|
#define ANODE_WM_2D_PONG 129
|
|
|
|
#define ANODE_WM_2D_SLEEP_AND_RECONNECT 130
|
|
|
|
#define ANODE_2D_MAX_DRAW_ANGLES 6000
|
|
|
|
#define ARGUS_LRF_PCMD_FULL_RESET 1
|
|
#define ARGUS_LRF_PCMD_RESET 2
|
|
#define ARGUS_LRF_PCMD_DRAW 3
|
|
#define ARGUS_LRF_PCMD_GET_PROFILE 3
|
|
|
|
#define ARGUS_LRF_PCMD_SET_MASK_1 60
|
|
#define ARGUS_LRF_PCMD_SET_MASK_2 61
|
|
#define ARGUS_LRF_PCMD_SET_MASK_3 62
|
|
#define ARGUS_LRF_PCMD_SET_MASK_4 63
|
|
#define ARGUS_LRF_PCMD_SET_MASK_5 64
|
|
|
|
#define ARGUS_LRF_PCMD_MASK_1_ON 65
|
|
#define ARGUS_LRF_PCMD_MASK_2_ON 66
|
|
#define ARGUS_LRF_PCMD_MASK_3_ON 67
|
|
#define ARGUS_LRF_PCMD_MASK_4_ON 68
|
|
#define ARGUS_LRF_PCMD_MASK_5_ON 69
|
|
|
|
#define ARGUS_LRF_PCMD_MASK_1_OFF 70
|
|
#define ARGUS_LRF_PCMD_MASK_2_OFF 71
|
|
#define ARGUS_LRF_PCMD_MASK_3_OFF 72
|
|
#define ARGUS_LRF_PCMD_MASK_4_OFF 73
|
|
#define ARGUS_LRF_PCMD_MASK_5_OFF 74
|
|
|
|
#define ARGUS_LRF_PCMD_SET_DP_0 100
|
|
#define ARGUS_LRF_PCMD_SET_DP_1 101
|
|
#define ARGUS_LRF_PCMD_SET_DP_2 102
|
|
#define ARGUS_LRF_PCMD_SET_DP_3 103
|
|
#define ARGUS_LRF_PCMD_UPLOAD_FILE 120
|
|
|
|
#define ARGUS_LRF_PCMD_UPDATE_ALL 255
|
|
|
|
|
|
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;
|
|
uint16_t m_bTimeOutCounter;
|
|
uint8_t m_bInitialFlips;
|
|
uint16_t m_nCurrentAngle;
|
|
uint8_t m_bDrawType;
|
|
uint32_t m_vDrawRanges[ANODE_2D_MAX_DRAW_ANGLES];
|
|
bool m_bSerialStringValid;
|
|
bool m_bVersionStringValid;
|
|
char m_tSN[65];
|
|
char m_tSV[129];
|
|
char m_sCurrentFile[MAX_PATH];
|
|
uint32_t m_nUploadID;
|
|
uint8_t m_nActiveDetectionProfile;
|
|
|
|
TARGET_DATA * prepareTargetData( uint16_t AZ, uint16_t RANGE, uint32_t WIDTH );
|
|
void saveRawDrawData( uint16_t alngles );
|
|
uint8_t getWM( void );
|
|
void setWM( uint8_t MD );
|
|
void cleanupDeviceStructures();
|
|
CSTR generateSettingFile();
|
|
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
|