|
LoRaMAC
4.4.5
Documentation of the API
|
Go to the documentation of this file.
37 #ifndef __LORAMACCLASSB_H__
38 #define __LORAMACCLASSB_H__
51 typedef enum eBeaconState
104 typedef enum ePingSlotState
127 typedef struct sPingSlotContext
153 typedef struct sBeaconContext
222 TimerTime_t TimeStamp;
228 typedef struct sLoRaMacClassBCallback
235 float ( *GetTemperatureLevel )( void );
242 void ( *MacProcessNotify )( void );
248 typedef struct sLoRaMacClassBParams
533 void LoRaMacClassBProcess(
void );
539 #endif // __LORAMACCLASSB_H__
bool LoRaMacClassBIsBeaconModeActive(void)
Verifies if the beacon mode active bit is set.
void LoRaMacClassBSetBeaconState(BeaconState_t beaconState)
Set the state of the beacon state machine.
uint8_t BeaconDelaySet
Definition: LoRaMacClassB.h:168
bool LoRaMacClassBIsAcquisitionPending(void)
Verifies if the acquisition pending bit is set.
Definition: LoRaMacClassB.h:153
void LoRaMacClassBResumeBeaconing(void)
Resumes the beacon and ping slot operation.
SysTime_t NextBeaconRx
Definition: LoRaMacClassB.h:198
LoRaMacStatus_t
Definition: LoRaMac.h:2153
TimerTime_t NextBeaconRxAdjusted
Definition: LoRaMacClassB.h:204
void LoRaMacClassBInit(LoRaMacClassBParams_t *classBParams, LoRaMacClassBCallback_t *callbacks, LoRaMacClassBNvmEvent classBNvmCtxChanged)
Initialize LoRaWAN Class B.
void LoRaMacClassBDeviceTimeAns(void)
This function handles the ClassB DEVICE_TIME_ANS.
Definition: LoRaMacClassB.h:248
DeviceClass_t
Definition: LoRaMacTypes.h:68
MulticastCtx_t * NextMulticastChannel
Definition: LoRaMacClassB.h:146
Definition: LoRaMac.h:586
Definition: LoRaMacClassB.h:155
LoRa MAC layer internal types definition. Please do not include in application sources.
Definition: LoRaMac.h:1197
void LoRaMacClassBSetPingSlotInfo(uint8_t periodicity)
Sets the periodicity of the ping slots.
LoRaMacStatus_t LoRaMacClassBSwitchClass(DeviceClass_t nextClass)
Switches the device class.
SysTime_t LastBeaconRx
Definition: LoRaMacClassB.h:194
Definition: LoRaMacClassB.h:81
SysTime_t BeaconTime
Definition: LoRaMacClassB.h:190
Definition: LoRaMacClassB.h:109
void LoRaMacClassBStopRxSlots(void)
Stops the timers for the RX slots. This includes the timers for ping and multicast slots.
bool LoRaMacClassBIsMulticastExpected(void)
The function validates, if the node expects a multicast slot at the current time.
Definition: LoRaMacClassB.h:56
LoRaMacParams_t * LoRaMacParams
Definition: LoRaMacClassB.h:277
LoRaMacStatus_t LoRaMacClassBMibGetRequestConfirm(MibRequestConfirm_t *mibGet)
LoRaMAC ClassB MIB-Get.
void LoRaMacClassBBeaconTimingAns(uint16_t beaconTimingDelay, uint8_t beaconTimingChannel, TimerTime_t lastRxDone)
This function handles the BEACON_TIMING_ANS.
TimerTime_t BeaconWindowMovement
Definition: LoRaMacClassB.h:213
uint8_t BeaconChannelSet
Definition: LoRaMacClassB.h:172
LoRaMacRegion_t
Definition: LoRaMac.h:2268
Definition: LoRaMacClassB.h:127
Definition: LoRaMacClassB.h:117
bool LoRaMacClassBIsBeaconExpected(void)
The function validates, if the node expects a beacon at the current time.
void LoRaMacClassBPingSlotTimerEvent(void *context)
State machine of the Class B for ping slots.
Definition: LoRaMacClassB.h:121
uint8_t AcquisitionPending
Definition: LoRaMacClassB.h:176
TimerTime_t LoRaMacClassBIsUplinkCollision(TimerTime_t txTimeOnAir)
Queries the ping slot window time.
bool LoRaMacClassBRxBeacon(uint8_t *payload, uint16_t size)
Receives and decodes the beacon frame.
LoRaMacFlags_t * LoRaMacFlags
Definition: LoRaMacClassB.h:265
Definition: LoRaMac.h:2121
void(* LoRaMacClassBNvmEvent)(void)
Definition: LoRaMacClassB.h:288
void LoRaMacClassBMulticastSlotTimerEvent(void *context)
State machine of the Class B for multicast slots.
uint32_t PingSlotWindow
Definition: LoRaMacClassB.h:133
Definition: LoRaMacTypes.h:398
McpsIndication_t * McpsIndication
Definition: LoRaMacClassB.h:257
MlmeIndication_t * MlmeIndication
Definition: LoRaMacClassB.h:253
uint8_t LoRaMacClassBPingSlotChannelReq(uint8_t datarate, uint32_t frequency)
This function handles the PING_SLOT_CHANNEL_REQ.
Definition: LoRaMacClassB.h:98
Definition: LoRaMac.h:1156
Definition: LoRaMacClassB.h:86
void LoRaMacClassBPingSlotInfoAns(void)
This function handles the PING_SLOT_FREQ_ANS.
bool LoRaMacClassBIsPingExpected(void)
The function validates, if the node expects a ping slot at the current time.
MlmeConfirm_t * MlmeConfirm
Definition: LoRaMacClassB.h:261
Definition: LoRaMacClassB.h:94
LoRaMacRegion_t * LoRaMacRegion
Definition: LoRaMacClassB.h:273
TimerTime_t BeaconTimingDelay
Definition: LoRaMacClassB.h:221
void * LoRaMacClassBGetNvmCtx(size_t *classBNvmCtxSize)
Definition: LoRaMacClassB.h:60
Definition: LoRaMacClassB.h:73
MulticastCtx_t * MulticastChannels
Definition: LoRaMacClassB.h:281
Definition: LoRaMacClassB.h:64
LoRaMacStatus_t LoRaMacMibClassBSetRequestConfirm(MibRequestConfirm_t *mibSet)
LoRaMAC Class B MIB-Set.
void LoRaMacClassBBeaconTimerEvent(void *context)
State machine of the Class B for beaconing.
uint8_t BeaconAcquired
Definition: LoRaMacClassB.h:164
uint16_t PingOffset
Definition: LoRaMacClassB.h:137
bool LoRaMacClassBRestoreNvmCtx(void *classBNvmCtx)
void LoRaMacClassBHaltBeaconing(void)
Stops the beacon and ping slot operation.
Definition: LoRaMacClassB.h:228
bool LoRaMacClassBBeaconFreqReq(uint32_t frequency)
This function handles the BEACON_FREQ_REQ.
uint8_t BeaconMode
Definition: LoRaMacClassB.h:160
uint8_t BeaconTimingChannel
Definition: LoRaMacClassB.h:217
Definition: LoRaMacClassB.h:113
PingSlotState_t
Definition: LoRaMacClassB.h:104
uint32_t * LoRaMacDevAddr
Definition: LoRaMacClassB.h:269
void LoRaMacClassBSetPingSlotState(PingSlotState_t pingSlotState)
Set the state of the ping slot state machine.
void LoRaMacClassBSetMulticastPeriodicity(MulticastCtx_t *multicastChannel)
Starts the timers for the RX slots. This includes the timers for ping and multicast slots.
Definition: LoRaMac.h:357
Definition: LoRaMacClassB.h:90
BeaconState_t
Definition: LoRaMacClassB.h:51
uint16_t SymbolTimeout
Definition: LoRaMacClassB.h:142
Definition: LoRaMacClassB.h:77
Definition: LoRaMac.h:853
void LoRaMacClassBSetMulticastSlotState(PingSlotState_t multicastSlotState)
Set the state of the multicast slot state machine.
bool LoRaMacClassBIsAcquisitionInProgress(void)
Verifies if an acquisition procedure is in progress.
Definition: LoRaMacClassB.h:68
float Temperature
Definition: LoRaMacClassB.h:186
void LoRaMacClassBStartRxSlots(void)
Starts the timers for the RX slots. This includes the timers for ping and multicast slots.
uint8_t ResumeBeaconing
Definition: LoRaMacClassB.h:180