gccDppConsole Test C++ SDK  20170920
DPP C++ Console Demonstration
DeviceIO/ParsePacket.h
Go to the documentation of this file.
00001 
00002 #pragma once
00003 
00004 #include <string>
00005 #include "DP5Protocol.h"
00006 using namespace std; 
00007 
00008 typedef enum _CommType {
00009     commNone = 0,
00010     commRS232 = 1,
00011     commUSB = 2,
00012     commSockets = 3
00013 } CommType;
00014 
00015 #define preqProcessNone 0x0
00016 #define preqProcessStatus 0x1
00017 #define preqProcessSpectrum 0x2
00018 #define preqRequestScopeData 0x4
00019 #define preqProcessScopeData 0x8
00020 #define preqProcessTextData 0x10
00021 #define preqProcessScopeDataOverFlow 0x20
00022 #define preqProcessInetSettings 0x40
00023 #define preqProcessDiagData 0x80
00024 #define preqProcessHwDesc 0x100
00025 #define preqProcessCfgRead 0x200
00026 #define preqProcessNetFindRead 0x400
00027 #define preqProcessPaCal 0x800
00028 //...
00029 #define preqProcessSCAData 0x2000
00030 #define preqProcessAck 0x4000
00031 #define preqProcessError 0x8000
00032 
00033 typedef struct _DppStateType {
00034     CommType Interface;
00035     string strPort;
00036     unsigned long ReqProcess;
00037     bool HaveScopeData;
00038     bool ScopeAutoRearm;
00039         bool ScopeOverFlow;
00040 } DppStateType;
00041 
00042 class CParsePacket
00043 {
00044 public:
00045         CParsePacket(void);
00046         ~CParsePacket(void);
00048         DppStateType DppState;
00050         void ParsePacketStatus(unsigned char P[], Packet_In *PIN);
00052         string PID2_TextToString(string strPacketSource, unsigned char PID2);
00054         long ParsePacket(unsigned char P[], Packet_In *PIN);
00055 };
00056