|
LoRaMAC
4.5.2
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;
233 typedef struct sLoRaMacClassBCallback
240 float ( *GetTemperatureLevel )( void );
247 void ( *MacProcessNotify )( void );
253 typedef struct sLoRaMacClassBParams
544 #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:2269
TimerTime_t NextBeaconRxAdjusted
Definition: LoRaMacClassB.h:204
void LoRaMacClassBDeviceTimeAns(void)
This function handles the ClassB DEVICE_TIME_ANS.
Definition: LoRaMacClassB.h:253
DeviceClass_t
Definition: LoRaMacTypes.h:571
MulticastCtx_t * NextMulticastChannel
Definition: LoRaMacClassB.h:146
Definition: LoRaMac.h:468
Definition: LoRaMacClassB.h:155
LoRa MAC layer internal types definition. Please do not include in application sources.
Definition: LoRaMac.h:1286
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:282
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:513
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.
ActivationType_t * NetworkActivation
Definition: LoRaMacClassB.h:290
LoRaMacFlags_t * LoRaMacFlags
Definition: LoRaMacClassB.h:270
Definition: LoRaMac.h:2237
void(* LoRaMacClassBNvmEvent)(void)
Definition: LoRaMacClassB.h:297
void LoRaMacClassBMulticastSlotTimerEvent(void *context)
State machine of the Class B for multicast slots.
uint32_t PingSlotWindow
Definition: LoRaMacClassB.h:133
Definition: LoRaMacTypes.h:901
McpsIndication_t * McpsIndication
Definition: LoRaMacClassB.h:262
ActivationType_t
Definition: LoRaMac.h:167
MlmeIndication_t * MlmeIndication
Definition: LoRaMacClassB.h:258
void LoRaMacClassBSetFPendingBit(uint32_t address, uint8_t fPendingSet)
Sets the FPending bit status of the related downlink slot.
uint8_t LoRaMacClassBPingSlotChannelReq(uint8_t datarate, uint32_t frequency)
This function handles the PING_SLOT_CHANNEL_REQ.
Definition: LoRaMacClassB.h:98
Definition: LoRaMac.h:1245
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:266
Definition: LoRaMacClassB.h:94
void LoRaMacClassBInit(LoRaMacClassBParams_t *classBParams, LoRaMacClassBCallback_t *callbacks, LoRaMacClassBNvmData_t *nvm)
Initialize LoRaWAN Class B.
LoRaMacRegion_t * LoRaMacRegion
Definition: LoRaMacClassB.h:278
TimerTime_t BeaconTimingDelay
Definition: LoRaMacClassB.h:221
Definition: LoRaMacClassB.h:60
Definition: LoRaMacClassB.h:73
MulticastCtx_t * MulticastChannels
Definition: LoRaMacClassB.h:286
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
void LoRaMacClassBHaltBeaconing(void)
Stops the beacon and ping slot operation.
Definition: LoRaMacClassB.h:233
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
void LoRaMacClassBProcess(void)
Class B process function.
Definition: LoRaMacClassB.h:113
PingSlotState_t
Definition: LoRaMacClassB.h:104
uint32_t * LoRaMacDevAddr
Definition: LoRaMacClassB.h:274
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:240
Definition: LoRaMacClassB.h:90
BeaconState_t
Definition: LoRaMacClassB.h:51
uint16_t SymbolTimeout
Definition: LoRaMacClassB.h:142
Definition: LoRaMacClassB.h:77
Definition: LoRaMac.h:936
SysTime_t BeaconTimePrecision
Definition: LoRaMacClassB.h:227
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
Definition: LoRaMacClassBNvm.h:104