Nol.A SDK Library 26.11.2
For IoT System Software Development
Loading...
Searching...
No Matches
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)
 장치를 시작합니다.
error_t begin (Config_t *params)
 Micro code 적재와 함께 장치를 시작합니다.
error_t begin () override
 Micro code 적재 및 디폴트 DW1000Chip::Config_t 로 장치를 시작합니다.
virtual error_t readFrame (RadioPacket *frame) override
 수신 버퍼에서 프레임을 읽습니다.
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
 채널이 혼잡한지 아닌지 검사합니다.
virtual int8_t getTxPower () override
 아무 것도 하지 않습니다. getTxPowerControl() 을 사용하세요.
virtual void setTxPower (int8_t dBm) override
 아무 것도 하지 않습니다. setTxPowerControl() 을 사용하세요.
virtual void setTxPowerControl (bool enableSTP, uint32_t value)
 Tx power 설정을 수행합니다.
virtual uint32_t getTxPowerControl (bool *STPisEnabled)
 Tx power 설정값을 가져옵니다.
virtual void setChannel (uint32_t channel) override
 채널을 설정합니다.
virtual uint32_t getChannel () override
 현재 설정된 채널을 반환합니다.
virtual int64_t getDeviceTimestamp () override
 장치 내부의 timestamp 값을 읽습니다.
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)

Protected Member Functions

error_t startup (bool loaducode=true, Config_t *params=nullptr)

Additional Inherited Members

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)

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

Constructor & Destructor Documentation

◆ ~DW1000Chip()

DW1000Chip::~DW1000Chip ( )
inline
70 {
71 }

Member Function Documentation

◆ begin() [1/3]

error_t DW1000Chip::begin ( )
inlineoverridevirtual

Micro code 적재 및 디폴트 DW1000Chip::Config_t 로 장치를 시작합니다.

Note
DW1000Chip 을 재시작할 때도 호출할 수 있습니다. 이 경우, 디폴트 설정이 아닌 마지막으로 사용한 설정을 다시 사용합니다.

Implements PacketRadioChip.

164 {
165 return begin(true, nullptr);
166 }
error_t begin() override
Micro code 적재 및 디폴트 DW1000Chip::Config_t 로 장치를 시작합니다.
Definition DW1000Chip.hpp:164

◆ begin() [2/3]

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

장치를 시작합니다.

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

◆ begin() [3/3]

error_t DW1000Chip::begin ( Config_t * params)
inline

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

Parameters
params환경 설정 파라미터
153 {
154 return begin(true, params);
155 }

◆ bufferIsEmpty()

virtual bool DW1000Chip::bufferIsEmpty ( )
overridevirtual

Implements PacketRadioChip.

◆ cca()

virtual bool DW1000Chip::cca ( )
overridevirtual

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

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

Implements PacketRadioChip.

◆ flushBuffer()

virtual void DW1000Chip::flushBuffer ( )
overridevirtual

Implements PacketRadioChip.

◆ getChannel()

virtual uint32_t DW1000Chip::getChannel ( )
overridevirtual

현재 설정된 채널을 반환합니다.

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 ( )
inlineoverridevirtual

아무 것도 하지 않습니다. getTxPowerControl() 을 사용하세요.

Implements PacketRadioChip.

181 {
182 //TODO
183 return SCHAR_MIN;
184 }

◆ getTxPowerControl()

virtual uint32_t DW1000Chip::getTxPowerControl ( bool * STPisEnabled)
virtual

Tx power 설정값을 가져옵니다.

Parameters
STPisEnabledSmart Tx Power Control 활성화 여부 (SYS_CFG register의 DIS_STXP bit)
Returns
TX_POWER register에 설정된 값

◆ readFrame()

virtual error_t DW1000Chip::readFrame ( RadioPacket * frame)
overridevirtual

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

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

Implements PacketRadioChip.

◆ setChannel()

virtual void DW1000Chip::setChannel ( uint32_t channel)
overridevirtual

채널을 설정합니다.

Implements PacketRadioChip.

◆ setTxPower()

virtual void DW1000Chip::setTxPower ( int8_t dBm)
inlineoverridevirtual

아무 것도 하지 않습니다. setTxPowerControl() 을 사용하세요.

Implements PacketRadioChip.

191 {
192 }

◆ setTxPowerControl()

virtual void DW1000Chip::setTxPowerControl ( bool enableSTP,
uint32_t value )
virtual

Tx power 설정을 수행합니다.

Parameters
enableSTPSmart Tx Power Control 활성화 여부 (SYS_CFG register의 DIS_STXP bit)
valueTX_POWER register에 설정할 값

◆ sleep()

virtual void DW1000Chip::sleep ( )
overridevirtual

Implements PacketRadioChip.

◆ transmit()

virtual error_t DW1000Chip::transmit ( RadioPacket * frame)
overridevirtual

Implements PacketRadioChip.

◆ wakeup()

virtual void DW1000Chip::wakeup ( )
overridevirtual

Implements PacketRadioChip.


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