Demo HCI Implementation for WiMOD-LR Devices  V1.3.1
WiMOD_SAP_HWTest.h
1 //------------------------------------------------------------------------------
31 //------------------------------------------------------------------------------
32 
33 
34 /*
35  * THIS IS AN EXAMPLE IMPLEMENTATION ACCORDING THE THE HCI SPEC: V1.8
36  * FOR FIRMWARE: LR-BASE
37  *
38  * SEE FILE: WiMOD_LR_Base_HCI_Spec_V1_8.pdf for detailed information
39  */
40 
41 #if 0 /* This should not part of the normal production code */
42 
43 #ifndef ARDUINO_SAP_WIMOD_SAP_HWTEST_H_
44 #define ARDUINO_SAP_WIMOD_SAP_HWTEST_H_
45 
46 #include "WiMOD_SAP_HWTest_IDs.h"
47 #include "../HCI/WiMODLRHCI.h"
48 
49 /*
50  * C++11 supports a better way for function pointers / function objects
51  * But C++11 mode is not supported by all platforms.
52  */
53 #ifdef WIMOD_USE_CPP11
54 #include <functional>
55 #endif
56 //------------------------------------------------------------------------------
57 //
58 // Section defines
59 //
60 //------------------------------------------------------------------------------
62 #define WiMOD_DEVMGMT_MSG_SIZE (100)
63 
64 
65 //-----------------------------------------------------------------------------
66 //
67 // types for callback functions
68 //
69 //-----------------------------------------------------------------------------
70 
71 // C++11 check
72 #ifdef WIMOD_USE_CPP11
73  /* C++11 function callback definitions */
74 
76  typedef std::function<void (void)> TDevMgmtPowerUpCallback;
77 
78 #else
79  /* pre C++11 function callback definitions */
80 
82  typedef void (*TDevMgmtPowerUpCallback)(void);
83 
84 #endif
85 
86 //------------------------------------------------------------------------------
87 //
88 // Section class
89 //
90 //------------------------------------------------------------------------------
91 
95 class WiMOD_SAP_HWTest {
96 public:
97  WiMOD_SAP_HWTest(TWiMODLRHCI* hci, UINT8* buffer, UINT16 bufferSize);
98  ~WiMOD_SAP_HWTest(void);
99 
100  TWiMDLRResultCodes StartRadioTest(const TWiMODLR_HWTestParameter* testParams, UINT8* statusRsp);
101  TWiMDLRResultCodes StopRadioTest(UINT8* statusRsp);
102 
103 protected:
104 private:
106  UINT8* txPayload;
107  UINT16 txyPayloadSize;
108 
109  TWiMODLRHCI* HciParser;
111 
112 };
113 
114 #endif
115 
116 #endif /* ARDUINO_SAP_WIMOD_SAP_HWTEST_H_ */
TWiMDLRResultCodes
Result codes for the local serial communication itself.
Definition: WiMODLRHCI.h:149
Internal helper class for processing SLIP frames.
Definition: WiMODLRHCI.h:229
Supporting IDs and definitions for the hardware test ServiceAccessPoint.
void(* TDevMgmtPowerUpCallback)(void)
Definition: WiMOD_SAP_DEVMGMT.h:93