Nol.A SDK Library  24.11.0
For IoT System Software Development
Classes | Public Types | Public Member Functions | List of all members
DW1000Chip Class Reference

Decawave DW1000 Radio Transceiver. More...

#include <DW1000Chip.hpp>

Inheritance diagram for DW1000Chip:
PacketRadioChip

Classes

struct  Config_t
 

Public Types

enum  Prf_t { PRF_16M = 1 , PRF_64M = 2 }
 Constants for specifying the (Nominal) mean Pulse Repetition Frequency. More...
 
enum  Plen_t {
  PLEN_4096 = 0x0C , PLEN_2048 = 0x28 , PLEN_1536 = 0x18 , PLEN_1024 = 0x08 ,
  PLEN_512 = 0x34 , PLEN_256 = 0x24 , PLEN_128 = 0x14 , PLEN_64 = 0x04
}
 
enum  Br_t { BR_110K = 0 , BR_850K = 1 , BR_6M8 = 2 }
 Constants for selecting the bit rate for data TX (and RX) More...
 
enum  Pac_t { PAC8 = 0 , PAC16 = 1 , PAC32 = 2 , PAC64 = 3 }
 Constants for specifying Preamble Acquisition Chunk (PAC) Size in symbols. More...
 
enum  PhrMode_t { PHRMODE_STD = 0x0 , PHRMODE_EXT = 0x3 }
 

Public Member Functions

 DW1000Chip (SPI &, SPI::Mode_t mode, int8_t pinIrq, int8_t pinRstN, int8_t pinCsN, int8_t pinWakeup=-1)
 
error_t begin (bool loaduCode, Config_t *params)
 장치를 시작합니다. More...
 
error_t begin (Config_t *params)
 Micro code 적재와 함께 장치를 시작합니다. More...
 
error_t begin () override
 Micro code 적재 및 디폴트 DW1000Chip::Config_t 로 장치를 시작합니다.
 
virtual error_t readFrame (RadioPacket *frame) override
 수신 버퍼에서 프레임을 읽습니다. More...
 
virtual bool bufferIsEmpty () override
 
virtual void flushBuffer () override
 
virtual void sleep () override
 
virtual void wakeup () override
 
virtual error_t transmit (RadioPacket *frame) override
 
virtual bool cca () override
 채널이 혼잡한지 아닌지 검사합니다. More...
 
virtual int8_t getTxPower () override
 현재 설정된 송신 출력을 반환합니다. More...
 
virtual void setTxPower (int8_t dBm) override
 송신 출력을 설정합니다. More...
 
virtual void setChannel (uint32_t channel) override
 채널을 설정합니다.
 
virtual uint32_t getChannel () override
 현재 설정된 채널을 반환합니다.
 
virtual int64_t getDeviceTimestamp () override
 장치 내부의 timestamp 값을 읽습니다. More...
 
void reset ()
 
void configure (Config_t &)
 
void setrxantennadelay (uint16_t rxDelay)
 
void settxantennadelay (uint16_t txDelay)
 
void setrxaftertxdelay (uint32_t rxDelayTime)
 
void setrxtimeout (uint16_t time)
 
void handleInterrupt (GPIOInterruptInfo_t &)
 
- Public Member Functions inherited from PacketRadioChip
void setCcaThreshold (int16_t dBthreshold)
 

Additional Inherited Members

- Public Attributes inherited from PacketRadioChip
void(* onRxStarted )(void *, GPIOInterruptInfo_t *)
 수신이 시작될 때 호출될 콜백함수 포인터 More...
 
void * ctxOnRxStarted
 onRxStarted 가 호출될 때 함께 전달될 context
 
void(* onRxDone )(void *, GPIOInterruptInfo_t *)
 수신이 완료될 때 호출될 콜백함수 포인터 More...
 
void * ctxOnRxDone
 onRxDone 이 호출될 때 함께 전달될 context
 
void(* onTxDone )(void *, bool, GPIOInterruptInfo_t *)
 transmit() 후, 송신이 완료될 때 호출될 콜백함수 포인터 More...
 
void * ctxOnTxDone
 onTxDone 이 호출될 때 함께 전달될 context
 
void(* onChannelBusy )(void *, GPIOInterruptInfo_t *)
 cca() 시 채널이 혼잡할 때 호출될 콜백함수 포인터 More...
 
void * ctxOnChannelBusy
 onChannelBusy 가 호출될 때 함께 전달될 context
 
int16_t dBccaThreshold = -65
 cca() 시 채널이 혼잡하다고 판단하기 위한 에너지 레벨을 설정합니다. (단위: dB, 기본값: -65)
 

Detailed Description

Decawave DW1000 Radio Transceiver.

Member Enumeration Documentation

◆ Br_t

Constants for selecting the bit rate for data TX (and RX)

These are defined for write (with just a shift) the TX_FCTRL register.

Enumerator
BR_110K 

UWB bit rate 110 kbits/s.

BR_850K 

UWB bit rate 850 kbits/s.

BR_6M8 

UWB bit rate 6.8 Mbits/s.

106  {
107  BR_110K = 0,
108  BR_850K = 1,
109  BR_6M8 = 2,
110  } Br_t;
Br_t
Constants for selecting the bit rate for data TX (and RX)
Definition: DW1000Chip.hpp:106
@ BR_110K
UWB bit rate 110 kbits/s.
Definition: DW1000Chip.hpp:107
@ BR_6M8
UWB bit rate 6.8 Mbits/s.
Definition: DW1000Chip.hpp:109
@ BR_850K
UWB bit rate 850 kbits/s.
Definition: DW1000Chip.hpp:108

◆ Pac_t

Constants for specifying Preamble Acquisition Chunk (PAC) Size in symbols.

Enumerator
PAC8 

PAC 8 (recommended for RX of preamble length 128 and below.

PAC16 

PAC 16 (recommended for RX of preamble length 256.

PAC32 

PAC 32 (recommended for RX of preamble length 512.

PAC64 

PAC 64 (recommended for RX of preamble length 1024 and up.

115  {
116  PAC8 = 0,
117  PAC16 = 1,
118  PAC32 = 2,
119  PAC64 = 3,
120  } Pac_t;
Pac_t
Constants for specifying Preamble Acquisition Chunk (PAC) Size in symbols.
Definition: DW1000Chip.hpp:115
@ PAC32
PAC 32 (recommended for RX of preamble length 512.
Definition: DW1000Chip.hpp:118
@ PAC64
PAC 64 (recommended for RX of preamble length 1024 and up.
Definition: DW1000Chip.hpp:119
@ PAC8
PAC 8 (recommended for RX of preamble length 128 and below.
Definition: DW1000Chip.hpp:116
@ PAC16
PAC 16 (recommended for RX of preamble length 256.
Definition: DW1000Chip.hpp:117

◆ PhrMode_t

Enumerator
PHRMODE_STD 

standard PHR mode

PHRMODE_EXT 

DW proprietary extended frames PHR mode.

122  {
123  PHRMODE_STD = 0x0,
124  PHRMODE_EXT = 0x3,
125  } PhrMode_t;
PhrMode_t
Definition: DW1000Chip.hpp:122
@ PHRMODE_EXT
DW proprietary extended frames PHR mode.
Definition: DW1000Chip.hpp:124
@ PHRMODE_STD
standard PHR mode
Definition: DW1000Chip.hpp:123

◆ Plen_t

\briefConstants for specifying TX Preamble length in symbols

These are defined to allow them be directly written into byte 2 of the TX_FCTRL register. (i.e. a four bit value destined for bits 20..18 but shifted left by 2 for byte alignment)

Enumerator
PLEN_2048 

Standard preamble length 4096 symbols.

PLEN_1536 

Non-standard preamble length 2048 symbols.

PLEN_1024 

Non-standard preamble length 1536 symbols.

PLEN_512 

Standard preamble length 1024 symbols.

PLEN_256 

Non-standard preamble length 512 symbols.

PLEN_128 

Non-standard preamble length 256 symbols.

PLEN_64 

Non-standard preamble length 128 symbols.

90  {
91  PLEN_4096 = 0x0C,
92  PLEN_2048 = 0x28,
93  PLEN_1536 = 0x18,
94  PLEN_1024 = 0x08,
95  PLEN_512 = 0x34,
96  PLEN_256 = 0x24,
97  PLEN_128 = 0x14,
98  PLEN_64 = 0x04,
99  } Plen_t;
Plen_t
Definition: DW1000Chip.hpp:90
@ PLEN_128
Non-standard preamble length 256 symbols.
Definition: DW1000Chip.hpp:97
@ PLEN_256
Non-standard preamble length 512 symbols.
Definition: DW1000Chip.hpp:96
@ PLEN_1536
Non-standard preamble length 2048 symbols.
Definition: DW1000Chip.hpp:93
@ PLEN_512
Standard preamble length 1024 symbols.
Definition: DW1000Chip.hpp:95
@ PLEN_64
Non-standard preamble length 128 symbols.
Definition: DW1000Chip.hpp:98
@ PLEN_1024
Non-standard preamble length 1536 symbols.
Definition: DW1000Chip.hpp:94
@ PLEN_2048
Standard preamble length 4096 symbols.
Definition: DW1000Chip.hpp:92

◆ Prf_t

Constants for specifying the (Nominal) mean Pulse Repetition Frequency.

These are defined for direct write (with a shift if necessary) to CHAN_CTRL and TX_FCTRL regs.

Enumerator
PRF_16M 

UWB PRF 16 MHz.

PRF_64M 

UWB PRF 64 MHz.

78  {
79  PRF_16M = 1,
80  PRF_64M = 2,
81  } Prf_t;
Prf_t
Constants for specifying the (Nominal) mean Pulse Repetition Frequency.
Definition: DW1000Chip.hpp:78
@ PRF_16M
UWB PRF 16 MHz.
Definition: DW1000Chip.hpp:79
@ PRF_64M
UWB PRF 64 MHz.
Definition: DW1000Chip.hpp:80

Member Function Documentation

◆ begin() [1/2]

error_t DW1000Chip::begin ( bool  loaduCode,
Config_t params 
)

장치를 시작합니다.

Parameters
loaduCodeMicro code 적재 여부
params환경 설정 파라미터

◆ begin() [2/2]

error_t DW1000Chip::begin ( Config_t params)
inline

Micro code 적재와 함께 장치를 시작합니다.

Parameters
params환경 설정 파라미터
153  {
154  return begin(true, params);
155  }
error_t begin() override
Micro code 적재 및 디폴트 DW1000Chip::Config_t 로 장치를 시작합니다.
Definition: DW1000Chip.hpp:161

◆ cca()

virtual bool DW1000Chip::cca ( )
overridevirtual

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

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

Implements PacketRadioChip.

◆ getDeviceTimestamp()

virtual int64_t DW1000Chip::getDeviceTimestamp ( )
overridevirtual

장치 내부의 timestamp 값을 읽습니다.

Timestamped Tx를 지원하거나 Rx timestamp를 지원하는 장치에 한해 내부의 현재 timestamp 값을 읽습니다. 단위는 장치의 종류에 따라 다릅니다. 지원하지 않는 장치거나 읽을 수 없을 때 -1을 반환합니다.

Reimplemented from PacketRadioChip.

◆ getTxPower()

virtual int8_t DW1000Chip::getTxPower ( )
overridevirtual

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

Returns
송신 출력 (단위: dBm)

Implements PacketRadioChip.

◆ readFrame()

virtual error_t DW1000Chip::readFrame ( RadioPacket frame)
overridevirtual

수신 버퍼에서 프레임을 읽습니다.

Returns
  • ERROR_SUCCESS : 성공
  • ERROR_FAIL : 실패 (수신한 프레임이 없음)
  • ERROR_INVALID_ARGS : frame 이 NULL 이거나, frame 내부 버퍼가 충분히 크지 않아서 실패

Implements PacketRadioChip.

◆ setTxPower()

virtual void DW1000Chip::setTxPower ( int8_t  dBm)
overridevirtual

송신 출력을 설정합니다.

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

Implements PacketRadioChip.


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