#include <DW1000.h>
Static Public Member Functions | |
static void | begin (int irq, int rst) |
static void | begin (int irq) |
static void | select (int ss) |
static void | reselect (int ss) |
static void | end () |
static void | reset () |
static void | softReset () |
static void | getPrintableDeviceIdentifier (char msgBuffer[]) |
static void | getPrintableExtendedUniqueIdentifier (char msgBuffer[]) |
static void | getPrintableNetworkIdAndShortAddress (char msgBuffer[]) |
static void | getPrintableDeviceMode (char msgBuffer[]) |
static void | setNetworkId (unsigned int val) |
static void | setDeviceAddress (unsigned int val) |
static void | setReceiverAutoReenable (boolean val) |
static void | setInterruptPolarity (boolean val) |
static void | suppressFrameCheck (boolean val) |
static void | setDataRate (byte rate) |
static void | setPulseFrequency (byte freq) |
static void | setPreambleLength (byte prealen) |
static void | setChannel (byte channel) |
static void | setPreambleCode (byte preacode) |
static DW1000Time | setDelay (const DW1000Time &delay) |
static void | receivePermanently (boolean val) |
static void | setData (byte data[], unsigned int n) |
static void | setData (const String &data) |
static void | getData (byte data[], unsigned int n) |
static void | getData (String &data) |
static unsigned int | getDataLength () |
static void | getTransmitTimestamp (DW1000Time &time) |
static void | getReceiveTimestamp (DW1000Time &time) |
static void | getSystemTimestamp (DW1000Time &time) |
static void | getTransmitTimestamp (byte data[]) |
static void | getReceiveTimestamp (byte data[]) |
static void | getSystemTimestamp (byte data[]) |
static float | getReceivePower () |
static float | getFirstPathPower () |
static float | getNoiseValue () |
static void | interruptOnSent (boolean val) |
static void | interruptOnReceived (boolean val) |
static void | interruptOnReceiveFailed (boolean val) |
static void | interruptOnReceiveTimeout (boolean val) |
static void | interruptOnReceiveTimestampAvailable (boolean val) |
static void | interruptOnAutomaticAcknowledgeTrigger (boolean val) |
static void | attachErrorHandler (void(*handleError)(void)) |
static void | attachSentHandler (void(*handleSent)(void)) |
static void | attachReceivedHandler (void(*handleReceived)(void)) |
static void | attachReceiveFailedHandler (void(*handleReceiveFailed)(void)) |
static void | attachReceiveTimeoutHandler (void(*handleReceiveTimeout)(void)) |
static void | attachReceiveTimestampAvailableHandler (void(*handleReceiveTimestampAvailable)(void)) |
static void | idle () |
static void | newConfiguration () |
static void | commitConfiguration () |
static void | newReceive () |
static void | startReceive () |
static void | newTransmit () |
static void | startTransmit () |
static void | enableMode (const byte mode[]) |
static void | setDefaults () |
static void | getPrettyBytes (byte cmd, word offset, char msgBuffer[], unsigned int n) |
static void | getPrettyBytes (byte data[], char msgBuffer[], unsigned int n) |
|
inlinestatic |
|
inlinestatic |
|
inlinestatic |
|
inlinestatic |
|
inlinestatic |
|
inlinestatic |
|
static |
Initiates and starts a sessions with one or more DW1000.
[in] | irq | The interrupt line/pin that connects the Arduino. |
[in] | rst | The reset line/pin for hard resets of ICs that connect to the Arduino. |
|
static |
Initiates and starts a sessions with one or more DW1000. Soft resets (i.e. command triggered) are used and it is assumed that no reset line is wired.
[in] | irq | The interrupt line/pin that connects the Arduino. |
|
static |
|
static |
Specifies the mode of operation for the DW1000. Modes of operation are pre-defined combinations of data rate, pulse repetition frequency, preamble and channel settings that properly go together. If you simply want the chips to work, choosing a mode is preferred over manual configuration.
The following modes are pre-configured and one of them needs to be chosen:
MODE_LONGDATA_RANGE_LOWPOWER
(basically this is 110 kb/s data rate, 16 MHz PRF and long preambles)MODE_SHORTDATA_FAST_LOWPOWER
(basically this is 6.8 Mb/s data rate, 16 MHz PRF and short preambles)MODE_LONGDATA_FAST_LOWPOWER
(basically this is 6.8 Mb/s data rate, 16 MHz PRF and long preambles)MODE_SHORTDATA_FAST_ACCURACY
(basically this is 6.8 Mb/s data rate, 64 MHz PRF and short preambles)MODE_LONGDATA_FAST_ACCURACY
(basically this is 6.8 Mb/s data rate, 64 MHz PRF and long preambles)MODE_LONGDATA_RANGE_ACCURACY
(basically this is 110 kb/s data rate, 64 MHz PRF and long preambles)Note that LOWPOWER and ACCURACY refers to the better power efficiency and improved transmission performance of 16 MHZ and 64 MHZ PRF respectively (see setPulseFrequency()
).
The default setting that is selected by setDefaults()
is MODE_LONGDATA_RANGE_LOWPOWER.
[in] | mode | The mode of operation, encoded by the above defined constants. |
|
static |
Tells the driver library that no communication to a DW1000 will be required anymore. This basically just frees SPI and the previously used pins.
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
Generates a String representation of the device identifier of the chip. That usually are the letters "DECA" plus the version and revision numbers of the chip.
[out] | msgBuffer | The String buffer to be filled with printable device information. Provide 128 bytes, this should be sufficient. |
|
static |
Generates a String representation of the main operational settings of the chip. This includes data rate, pulse repetition frequency, preamble and channel settings.
[out] | msgBuffer | The String buffer to be filled with printable device information. Provide 128 bytes, this should be sufficient. |
|
static |
Generates a String representation of the extended unique identifier (EUI) of the chip.
[out] | msgBuffer | The String buffer to be filled with printable device information. Provide 128 bytes, this should be sufficient. |
|
static |
Generates a String representation of the short address and network identifier currently defined for the respective chip.
[out] | msgBuffer | The String buffer to be filled with printable device information. Provide 128 bytes, this should be sufficient. |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
(Re-)selects a specific DW1000 chip for communication. In case of a single DW1000 chip in use this call is not needed; only a call to select()
has to be performed once at start up. Other than a call to select()
this function does not perform an initial setup of the (again-)selected chips and assumes it to have a valid configuration loaded.
[in] | ss | The chip select line/pin that connects the to-be-selected chip with the Arduino. |
|
static |
Resets all connected or the currently selected DW1000 chip. A hard reset of all chips is preferred, although a soft reset of the currently selected one is executed if no reset pin has been specified (when using begin(int)
, instead of begin(int, int)
).
|
static |
Selects a specific DW1000 chip for communication. In case of a single DW1000 chip in use this call only needs to be done once at start up, but is still mandatory. Other than a call to reselect()
this function performs an initial setup of the now-selected chip.
[in] | ss | The chip select line/pin that connects the to-be-selected chip with the Arduino. |
|
static |
|
static |
|
static |
|
static |
Specifies the data transmission rate of the DW1000 chip. One of the values
TRX_RATE_110KBPS
(i.e. 110 kb/s)TRX_RATE_850KBPS
(i.e. 850 kb/s)TRX_RATE_6800KBPS
(i.e. 6.8 Mb/s) has to be provided.See setDefaults()
and enableMode()
for additional information on data rate settings.
[in] | rate | The data transmission rate, encoded by the above defined constants. |
|
static |
|
static |
|
static |
(Re-)set the device address (i.e. short address) for the currently selected chip. This setting is important for certain MAC address filtering rules.
[in] | val | An arbitrary numeric device address. |
|
static |
Specifies the interrupt polarity of the DW1000 chip.
As part of setDefaults()
if the device is in idle mode, interrupt polarity is set to active high.
[in] | val | true for active high interrupts, false for active low interrupts. |
|
static |
(Re-)set the network identifier which the selected chip should be associated with. This setting is important for certain MAC address filtering rules.
[in] | val | An arbitrary numeric network identifier. |
|
static |
|
static |
|
static |
Specifies the pulse repetition frequency (PRF) of data transmissions with the DW1000. Either
TX_PULSE_FREQ_16MHZ
(i.e. 16 MHz)TX_PULSE_FREQ_64MHZ
(i.e. 64 MHz) has to be chosen.Note that the 16 MHz setting is more power efficient, while the 64 MHz setting requires more power, but also delivers slightly better transmission performance (i.e. on communication range and timestamp accuracy) (see DWM1000 User Manual, section 9.3).
See setDefaults()
and enableMode()
for additional information on PRF settings.
[in] | freq | The PRF, encoded by the above defined constants. |
|
static |
Specifies whether the DW1000 chip should, again, turn on its receiver in case that the last reception failed.
This setting is enabled as part of setDefaults()
if the device is in idle mode.
[in] | val | true to enable, false to disable receiver auto-reenable. |
|
static |
Resets the currently selected DW1000 chip programmatically (via corresponding commands).
|
static |
|
static |
|
static |
Specifies whether to suppress any frame check measures while sending or receiving messages. If suppressed, no 2-byte checksum is appended to the message before sending and this checksum is also not expected at receiver side. Note that when suppressing frame checks, the error event handler (attached via attachReceiveErrorHandler()
) will not be triggered if received data is corrupted.
Frame checks are enabled as part of setDefaults()
if the device is in idle mode.
[in] | val | true to suppress frame check on sender and receiver side, false otherwise. |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |