2.5.6 G3 MAC API
The G3 ADP API functions are defined in the mac_wrapper.h file. This file contains the interface with G3 MAC API. This file is a copy of the embedded, the G3 USI Host interface is the same as the one embedded stack provides.
- Request functions to send
messages or
data:
void MacWrapperMlmeGetRequest(struct TMacWrpGetRequest *pParameters); - Callbacks to manage confirm and indication messages received.
When a confirm or an indication message is received, the corresponding callback is called. The callbacks are initialized when the MAC layer is initialized:
void MacWrapperInitialize(struct TMacWrpNotifications *pNotifications, uint8_t u8Band);
where:
- The first argument is a pointer to a
struct with the callback
functions:
struct TMacWrpNotifications { MacWrpDataConfirm m_MacWrpDataConfirm; MacWrpDataIndication m_MacWrpDataIndication; MacWrpGetConfirm m_MacWrpGetConfirm; MacWrpSetConfirm m_MacWrpSetConfirm; MacWrpResetConfirm m_MacWrpResetConfirm; MacWrpBeaconNotify m_MacWrpBeaconNotifyIndication; MacWrpScanConfirm m_MacWrpScanConfirm; MacWrpStartConfirm m_MacWrpStartConfirm; MacWrpCommStatusIndication m_MacWrpCommStatusIndication; MacWrpSnifferIndication m_MacWrpSnifferIndication; };Each callback must have the appropriate parameters. The definition of the callback format is in the same file (mac_wrapper.h).
If a callback is set to NULL, the corresponding confirm or indication message will not be received by any callback function.
- The second argument is the frequency
band target (uint8_t). Valid values are as follows:
- 0 = CENELEC_A
- 1 = CENELEC_B
- 2 = FCC
- 3 = ARIB
