Nol.A SDK Library 26.11.2
For IoT System Software Development
Loading...
Searching...
No Matches
LoRaRadioChip Class Referenceabstract

LoRaRadioChip Class. More...

#include <LoRaRadioChip.hpp>

Inheritance diagram for LoRaRadioChip:
PacketRadioChip LBTRadio LMac SX126xChip SX127xChip SX1272Chip SX1276Chip SystemFeatherM0::RFM9x SystemPLM100S::SX1276

Public Types

enum  State_t { RF_IDLE = 0 , RF_RX_RUNNING = 1 , RF_TX_RUNNING = 2 , RF_CAD = 3 }

Public Member Functions

virtual State_t getStatus ()=0
virtual bool supportsLoRaSpreadingFactor (Radio::LoRaSF_t sf) const =0
 Returns whether this driver supports the given LoRa spreading factor.
virtual void setRadio (Radio::LoRaSF_t sf, Radio::LoRaBW_t bw, Radio::LoRaCR_t cr, bool crcOn=true, bool iqInverted=false, uint16_t symbTimeout=0, uint16_t preambleLen=8, uint8_t payloadLen=0, bool freqHopOn=false, uint8_t hopPeriod=0)
virtual void setRadio (uint32_t datarate, uint32_t bandwidth, uint32_t bandwidthAfc, uint32_t fDev, bool crcOn=true, uint16_t symbTimeout=0, uint16_t preambleLen=5, uint8_t payloadLen=0)
uint32_t getTimeOnAir (uint8_t payloadLen)
virtual void setTxPower (int8_t dBm) override
 송신 출력을 설정합니다.
virtual int8_t getTxPower () override
 현재 설정된 송신 출력을 반환합니다.
virtual int16_t getRssi ()=0
 RSSI를 dB 단위로 읽습니다.
virtual bool cca () override
 채널이 혼잡한지 아닌지 검사합니다.
virtual void doCAD ()=0
 CAD (Carrier Activity Detection) 검사를 수행합니다. (LoRa 전용).
virtual void setStandby ()=0
virtual void setPublicNetwork (bool enable)=0
 Syncword를 설정합니다.
virtual void transmitCW ()=0
 Continuous Wave (CW) 신호를 송출합니다. (LoRa 전용).
virtual error_t transmit (RadioPacket *) override
virtual void setFreqOffset (int32_t offsetHz)
 중심 주파수 오차를 제거하기 위한 offset을 설정합니다.
virtual int32_t getFreqOffset ()
 중심 주파수 오차를 제거하기 위한 offset을 가져옵니다.
Public Member Functions inherited from PacketRadioChip
virtual error_t begin ()=0
virtual error_t readFrame (RadioPacket *frame)=0
 수신 버퍼에서 프레임을 읽습니다.
virtual bool bufferIsEmpty ()=0
virtual void flushBuffer ()=0
virtual void sleep ()=0
virtual void wakeup ()=0
void setCcaThreshold (int16_t dBthreshold)
virtual void setChannel (uint32_t channel)=0
 채널을 설정합니다.
virtual uint32_t getChannel ()=0
 현재 설정된 채널을 반환합니다.
virtual int64_t getDeviceTimestamp ()
 장치 내부의 timestamp 값을 읽습니다.

Static Public Member Functions

static uint32_t TimeOnAir (Radio::LoRaSF_t, Radio::LoRaBW_t, Radio::LoRaCR_t, uint16_t preambleLen, bool fixLen, uint8_t payloadLen, bool crcOn)
static uint32_t TimeOnAir (uint32_t datarate, uint32_t bandwidth, uint16_t preambleLen, bool fixLen, uint8_t payloadLen, bool crcOn)

Public Attributes

void(* onCADCompleted )(void *ctx, bool) = nullptr
 LoRa CAD (Carrier Activity Detection) 검사가 완료되면 호출될 콜백함수 포인터
void * ctxOnCADCompleted
 onCADCompleted 가 호출될 때 함께 전달될 context
int8_t antennaGain = 0
 Antenna gain을 고려한 송신 출력(EIRP)을 사용하기 위한 antenna gain (단위: dBi).
void(* onRxTimeout )(void *, GPIOInterruptInfo_t *) = nullptr
void * ctxOnRxTimeout
Public Attributes inherited from PacketRadioChip
void(* onRxStarted )(void *, GPIOInterruptInfo_t *)
 수신이 시작될 때 호출될 콜백함수 포인터
void * ctxOnRxStarted
 onRxStarted 가 호출될 때 함께 전달될 context
void(* onRxDone )(void *, GPIOInterruptInfo_t *)
 수신이 완료될 때 호출될 콜백함수 포인터
void * ctxOnRxDone
 onRxDone 이 호출될 때 함께 전달될 context
void(* onTxDone )(void *, bool, GPIOInterruptInfo_t *)
 transmit() 후, 송신이 완료될 때 호출될 콜백함수 포인터
void * ctxOnTxDone
 onTxDone 이 호출될 때 함께 전달될 context
void(* onChannelBusy )(void *, GPIOInterruptInfo_t *)
 cca() 시 채널이 혼잡할 때 호출될 콜백함수 포인터
void * ctxOnChannelBusy
 onChannelBusy 가 호출될 때 함께 전달될 context
int16_t dBccaThreshold = -65
 cca() 시 채널이 혼잡하다고 판단하기 위한 에너지 레벨을 설정합니다. (단위: dB, 기본값: -65)

Protected Member Functions

virtual void ccaTask ()

Static Protected Member Functions

static void CCATask (void *)

Protected Attributes

struct { 
   uint32_t   channel 
   Radio::Modulation_t   modulation 
   int8_t   txPower 
   uint32_t   txTimeout 
   union { 
      struct { 
         uint32_t   drHz 
         uint32_t   bwHz 
         uint32_t   afcBwHz 
         uint32_t   fDevHz 
         uint16_t   symbTimeout 
         bool   addCrc 
         uint16_t   preambleLength 
         uint8_t   fixedPayloadLength 
      }   FSK
      struct { 
         Radio::LoRaSF_t   sf 
         Radio::LoRaCR_t   cr 
         Radio::LoRaBW_t   bw 
         uint16_t   preambleLength 
         uint8_t   fixedPayloadLength 
         bool   iqInverted 
         bool   addCrc 
         uint16_t   symbTimeout 
      }   LoRa
   } 
} defaultSetting
volatile bool inCca = false
bool inChannelBusyHandler = false
int32_t freqOffset

Detailed Description

Member Enumeration Documentation

◆ State_t

Radio driver internal state machine states definition

17 { RF_IDLE = 0,
18 RF_RX_RUNNING = 1,
19 RF_TX_RUNNING = 2,
20 RF_CAD = 3,
21 } State_t;
State_t
Definition LoRaRadioChip.hpp:17

Member Function Documentation

◆ cca()

virtual bool LoRaRadioChip::cca ( )
overridevirtual

채널이 혼잡한지 아닌지 검사합니다.

채널이 혼잡하다고 감지되는 순간, onChannelBusy 가 가리키는 콜백함수가 호출됩니다.

Implements PacketRadioChip.

Reimplemented in LBTRadio, LMac, and SX127xChip.

◆ doCAD()

virtual void LoRaRadioChip::doCAD ( )
pure virtual

CAD (Carrier Activity Detection) 검사를 수행합니다. (LoRa 전용).

Implemented in LBTRadio, LMac, SX126xChip, and SX127xChip.

◆ getFreqOffset()

virtual int32_t LoRaRadioChip::getFreqOffset ( )
virtual

중심 주파수 오차를 제거하기 위한 offset을 가져옵니다.

Reimplemented in LBTRadio, and LMac.

◆ getRssi()

virtual int16_t LoRaRadioChip::getRssi ( )
pure virtual

RSSI를 dB 단위로 읽습니다.

Implemented in LBTRadio, LMac, SX126xChip, SX1272Chip, and SX1276Chip.

◆ getTxPower()

virtual int8_t LoRaRadioChip::getTxPower ( )
overridevirtual

현재 설정된 송신 출력을 반환합니다.

Returns
송신 출력 (단위: dBm)

Implements PacketRadioChip.

Reimplemented in LBTRadio, LMac, and SX127xChip.

◆ setFreqOffset()

virtual void LoRaRadioChip::setFreqOffset ( int32_t offsetHz)
virtual

중심 주파수 오차를 제거하기 위한 offset을 설정합니다.

실제 사용되는 중심 주파수는 setChannel() 로 설정한 주파수에 offset을 더한 값이 됩니다. 기본 offset은 하드웨어마다 다릅니다. 설정된 offset을 구하기 위해서는 getFreqOffset() 을 사용하십시오.

Reimplemented in LBTRadio, and LMac.

◆ setPublicNetwork()

virtual void LoRaRadioChip::setPublicNetwork ( bool enable)
pure virtual

Syncword를 설정합니다.

Parameters
valueenable (true: LoRaWAN, false: non-LoRaWAN)

Implemented in LBTRadio, LMac, SX126xChip, and SX127xChip.

◆ setTxPower()

virtual void LoRaRadioChip::setTxPower ( int8_t dBm)
overridevirtual

송신 출력을 설정합니다.

Parameters
dBm송신 출력 세기 (단위: dBm)

Implements PacketRadioChip.

Reimplemented in LBTRadio, LMac, and SX127xChip.

◆ supportsLoRaSpreadingFactor()

virtual bool LoRaRadioChip::supportsLoRaSpreadingFactor ( Radio::LoRaSF_t sf) const
pure virtual

Returns whether this driver supports the given LoRa spreading factor.

Parameters
sfLoRa spreading factor; unknown values must return false.

Implemented in LBTRadio, LMac, SX126xChip, and SX127xChip.

◆ transmit()

virtual error_t LoRaRadioChip::transmit ( RadioPacket * )
overridevirtual

Implements PacketRadioChip.

Reimplemented in LBTRadio, and LMac.

◆ transmitCW()

virtual void LoRaRadioChip::transmitCW ( )
pure virtual

Continuous Wave (CW) 신호를 송출합니다. (LoRa 전용).

Implemented in LBTRadio, LMac, SX126xChip, and SX127xChip.

Member Data Documentation

◆ onCADCompleted

void(* LoRaRadioChip::onCADCompleted) (void *ctx, bool) = nullptr

LoRa CAD (Carrier Activity Detection) 검사가 완료되면 호출될 콜백함수 포인터

ctxOnCADCompleted, 및 detection 여부를 함께 전달합니다.

Note
인터럽트 핸들러 내에서 호출되므로 콜백함수는 최대한 빨리 종료하십시오.

The documentation for this class was generated from the following file: