1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768 |
- #ifndef _DEMO_H_
- #define _DEMO_H_
- #include "types.h"
- #include "dsi_framer_ant.hpp"
- #include "dsi_thread.h"
- #include "dsi_serial_generic.hpp"
- #define CHANNEL_TYPE_MASTER (0)
- #define CHANNEL_TYPE_SLAVE (1)
- #define CHANNEL_TYPE_INVALID (2)
- class Demo {
- public:
- Demo();
- virtual ~Demo();
- BOOL Init(UCHAR ucDeviceNumber_, UCHAR ucChannelType_);
- void Start();
- void Close();
- private:
- BOOL InitANT();
-
- static DSI_THREAD_RETURN RunMessageThread(void *pvParameter_);
-
- void MessageThread();
-
- void ProcessMessage(ANT_MESSAGE stMessage, USHORT usSize_);
-
- void PrintMenu();
- BOOL bBursting;
- BOOL bBroadcasting;
- BOOL bMyDone;
- BOOL bDone;
- UCHAR ucChannelType;
- DSISerialGeneric* pclSerialObject;
- DSIFramerANT* pclMessageObject;
- DSI_THREAD_ID uiDSIThread;
- DSI_CONDITION_VAR condTestDone;
- DSI_MUTEX mutexTestDone;
- BOOL bDisplay;
- UCHAR aucTransmitBuffer[ANT_STANDARD_DATA_PAYLOAD_SIZE];
- };
- #endif
|