API for communicating with XBee devices.

Dependencies:   CircularBuffer FixedLengthList

Dependents:   XBeeApiTest XBeeApiSimpleATCmdsExample XBeeApiBroadcastExample XBeeApiBroadcastExampleRTOS ... more

Overview

XBeeApi is intended to be a library for providing a high-level API interface to the XBee - for example getChannel() and setChannel(2) methods rather than needing to send( "ATCH" ) and send( "ATCH 2" ) - and then de-code the responses.

See the notebook page here for a description of how the API works & some details on the various classes.

Features:

  • Support for transmission & reception of data packets
  • Support for reading & changing settings
  • Support for "Remote AT" interface to access settings & I/O channels on remote XBees
  • XBeeApi should work if you're using mbed-rtos, though it is not currently threadsafe. Take a look at the XBeeApiBroadcastExampleRTOS example if you're including mbed-rtos.

Example Programs

There are also example programs available:

Transmit

Import programXBeeApiSimpleBroadcastExample

Simple example of how to use XBeeApi - set up the XBee, configure P2P networking then transmit a frame.

Import programXBeeApiBroadcastExample

Example for XBeeAPI; a little more involved than XBeeApiSimpleBroadcastExample with report on failure to set up the XBee and on the transmit status of the message.

Import programXBeeApiBroadcastExampleRTOS

Example of using the XBeeApi library to broadcast a message, based on XBeeApiBroadcastExample. This example shows how to use the library when using mbed-rtos. Before compiling you must open "XbeeApi\Config\XBeeApiCfg.hpp" and change the '#if 0' to '#if 1' on the line above the comment reading "Use RTOS features to make XBeeApi threadsafe"

Settings/Status

Import programXBeeApiSimpleATCmdsExample

Simple example of using XBeeApi to send AT-style commands to the XBee

Import programXBeeApiRemoteATCmdsExample

Example of using the XBeeApi library to send AT commands to remote XBee devices in order to read/write settings

Receive

Import programXBeeApiSimpleReceiveExample

Simple example of using XBeeApi to receive data packets via wireless

Import programXBeeApiReceiveCallbackExample

Example of using the XBeeApi library to receive a message via a callback method

Import programXBeeApiReceiveCallbackExampleRTOS

Example of using the XBeeApi library to receive a message via a callback method. This example shows how to use the library when using mbed-rtos. See the comment at the top of main.cpp

Remote I/O

Import programXBeeApiRemoteIOExample

Example of using the XBeeApi library to read inputs on a remote XBee

If you have 2 mbed connected XBees available then you can use XBeeApiSimpleReceiveExample and XBeeApiSimpleBroadcastExample as a pair.

Note that this is still a work in progress! XBeeApiTodoList tracks some of the functionality still to be added.

Committer:
johnb
Date:
Mon Jul 28 12:48:33 2014 +0000
Revision:
52:0950b05d5270
Parent:
51:a7d0d2ef9261
Child:
55:610aa4a2ed3b
Add initial support for decoding IO frames.

Who changed what in which revision?

UserRevisionLine numberNew contents of line
johnb 8:1b48b619d7f6 1 /**
johnb 8:1b48b619d7f6 2 @file
johnb 8:1b48b619d7f6 3 @brief Class to abstract AT commands send to the XBee API
johnb 8:1b48b619d7f6 4
johnb 8:1b48b619d7f6 5 AT commands have the payload:
johnb 8:1b48b619d7f6 6
johnb 8:1b48b619d7f6 7 Byte 1 : Frame ID
johnb 8:1b48b619d7f6 8 Byte 2 & 3 : AT command
johnb 8:1b48b619d7f6 9 Byte 4-n : Parameter Value
johnb 8:1b48b619d7f6 10
johnb 8:1b48b619d7f6 11 @author John Bailey
johnb 8:1b48b619d7f6 12
johnb 8:1b48b619d7f6 13 @copyright Copyright 2014 John Bailey
johnb 8:1b48b619d7f6 14
johnb 8:1b48b619d7f6 15 @section LICENSE
johnb 8:1b48b619d7f6 16
johnb 8:1b48b619d7f6 17 Licensed under the Apache License, Version 2.0 (the "License");
johnb 8:1b48b619d7f6 18 you may not use this file except in compliance with the License.
johnb 8:1b48b619d7f6 19 You may obtain a copy of the License at
johnb 8:1b48b619d7f6 20
johnb 8:1b48b619d7f6 21 http://www.apache.org/licenses/LICENSE-2.0
johnb 8:1b48b619d7f6 22
johnb 8:1b48b619d7f6 23 Unless required by applicable law or agreed to in writing, software
johnb 8:1b48b619d7f6 24 distributed under the License is distributed on an "AS IS" BASIS,
johnb 8:1b48b619d7f6 25 WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
johnb 8:1b48b619d7f6 26 See the License for the specific language governing permissions and
johnb 8:1b48b619d7f6 27 limitations under the License.
johnb 8:1b48b619d7f6 28
johnb 8:1b48b619d7f6 29 */
johnb 8:1b48b619d7f6 30
johnb 8:1b48b619d7f6 31 #if !defined XBEEAPICMDAT_HPP
johnb 8:1b48b619d7f6 32 #define XBEEAPICMDAT_HPP
johnb 8:1b48b619d7f6 33
johnb 8:1b48b619d7f6 34 #include "XBeeApiFrame.hpp"
johnb 8:1b48b619d7f6 35 #include "XBeeDevice.hpp"
johnb 8:1b48b619d7f6 36
johnb 8:1b48b619d7f6 37 #include <stdint.h>
johnb 8:1b48b619d7f6 38
johnb 26:f5df80e990f4 39 #define XBEE_API_CMD_SET_HEADER_LEN 3U
johnb 50:f76b7e7959a2 40 #define XBEE_API_CMD_REQ_HEADER_LEN 3U
johnb 50:f76b7e7959a2 41
johnb 50:f76b7e7959a2 42 #define XBEE_API_DIO_CHANNEL_COUNT 8U
johnb 52:0950b05d5270 43 #define XBEE_API_ADC_CHANNEL_COUNT 6U
johnb 26:f5df80e990f4 44
johnb 26:f5df80e990f4 45 /** Class to access the configuration interface of the XBee.
johnb 26:f5df80e990f4 46 Requests to the XBee are non-blocking meaning that code
johnb 26:f5df80e990f4 47 which utilises this class must deal with the fact that
johnb 26:f5df80e990f4 48 there will be a delay between requesting the data from
johnb 26:f5df80e990f4 49 the XBee and the data being available via the API. See
johnb 26:f5df80e990f4 50 XBeeApiCmdAtBlocking for a blocking version.
johnb 26:f5df80e990f4 51
johnb 26:f5df80e990f4 52 Parameters from the XBee are cached in the object so
johnb 26:f5df80e990f4 53 subsequent requests do not need have the overhead of
johnb 26:f5df80e990f4 54 communication with the XBee */
johnb 8:1b48b619d7f6 55 class XBeeApiCmdAt : public XBeeApiFrameDecoder
johnb 8:1b48b619d7f6 56 {
johnb 13:302e7c1ea0b3 57 public:
johnb 26:f5df80e990f4 58 /** Type to represent the ID of a PAN (Personal Area Network) */
johnb 26:f5df80e990f4 59 typedef uint16_t panId_t;
johnb 26:f5df80e990f4 60 /** Type to represent a wireless channel number */
johnb 26:f5df80e990f4 61 typedef uint8_t channel_t;
johnb 32:af4e495afd62 62 /** Type to represent the different MAC modes supported by the XBee */
johnb 32:af4e495afd62 63 typedef enum {
johnb 32:af4e495afd62 64 XBEE_API_MAC_MODE_DIGI_ACK = 0,
johnb 32:af4e495afd62 65 XBEE_API_MAC_MODE_802_15_4_NO_ACK = 1,
johnb 32:af4e495afd62 66 XBEE_API_MAC_MODE_802_15_4_ACK = 2,
johnb 32:af4e495afd62 67 XBEE_API_MAC_MODE_DIGI_NO_ACK = 3,
johnb 32:af4e495afd62 68 } XBeeApiMACMode_e;
johnb 13:302e7c1ea0b3 69
johnb 50:f76b7e7959a2 70 typedef enum
johnb 50:f76b7e7959a2 71 {
johnb 50:f76b7e7959a2 72 XBEE_API_DIO_DISABLED = 0,
johnb 50:f76b7e7959a2 73 XBEE_API_DIO_SPECIAL = 1,
johnb 51:a7d0d2ef9261 74 XBEE_API_DIO_ADC = 2,
johnb 50:f76b7e7959a2 75 XBEE_API_DIO_INPUT = 3,
johnb 50:f76b7e7959a2 76 XBEE_API_DIO_OUT_LOW = 4,
johnb 50:f76b7e7959a2 77 XBEE_API_DIO_OUT_HIGH = 5,
johnb 50:f76b7e7959a2 78 XBEE_API_DIO_RS485_TX_LOW = 6,
johnb 50:f76b7e7959a2 79 XBEE_API_DIO_RS485_TX_HIGH = 7
johnb 50:f76b7e7959a2 80 } XBeeApiDioConfig_e;
johnb 50:f76b7e7959a2 81
johnb 8:1b48b619d7f6 82 protected:
johnb 26:f5df80e990f4 83 /** Indicates whether or not m_hwVer contains data retrieved from the XBee */
johnb 31:c144106e55b5 84 bool m_have_hwVer;
johnb 26:f5df80e990f4 85 /** Indicates whether or not m_fwVer contains data retrieved from the XBee */
johnb 31:c144106e55b5 86 bool m_have_fwVer;
johnb 26:f5df80e990f4 87 /** Indicates whether or not m_chan contains data retrieved from the XBee */
johnb 31:c144106e55b5 88 bool m_have_chan;
johnb 26:f5df80e990f4 89 /** Indicates whether or not m_PANId contains data retrieved from the XBee */
johnb 31:c144106e55b5 90 bool m_have_PANId;
johnb 26:f5df80e990f4 91 /** Indicates whether or not m_EDA contains data retrieved from the XBee */
johnb 31:c144106e55b5 92 bool m_have_EDA;
johnb 26:f5df80e990f4 93 /** Indicates whether or not m_CE contains data retrieved from the XBee */
johnb 31:c144106e55b5 94 bool m_have_CE;
johnb 31:c144106e55b5 95 bool m_have_sourceAddress;
johnb 32:af4e495afd62 96 bool m_have_snLow;
johnb 32:af4e495afd62 97 bool m_have_snHigh;
johnb 32:af4e495afd62 98 bool m_have_retries;
johnb 32:af4e495afd62 99 bool m_have_randomDelaySlots;
johnb 32:af4e495afd62 100 bool m_have_macMode;
johnb 50:f76b7e7959a2 101 bool m_have_d[ XBEE_API_DIO_CHANNEL_COUNT ];
johnb 51:a7d0d2ef9261 102 bool m_have_dioChangeDetectMask;
johnb 51:a7d0d2ef9261 103 bool m_have_dioLevels;
johnb 51:a7d0d2ef9261 104 bool m_have_sampleRate;
johnb 51:a7d0d2ef9261 105 bool m_have_destHigh;
johnb 51:a7d0d2ef9261 106 bool m_have_destLow;
johnb 51:a7d0d2ef9261 107
johnb 13:302e7c1ea0b3 108
johnb 8:1b48b619d7f6 109 uint16_t m_hwVer;
johnb 8:1b48b619d7f6 110 uint16_t m_fwVer;
johnb 13:302e7c1ea0b3 111 channel_t m_chan;
johnb 13:302e7c1ea0b3 112 channel_t m_chanPend;
johnb 13:302e7c1ea0b3 113 panId_t m_PANId;
johnb 13:302e7c1ea0b3 114 panId_t m_PANIdPend;
johnb 13:302e7c1ea0b3 115 bool m_EDA;
johnb 13:302e7c1ea0b3 116 bool m_EDAPend;
johnb 13:302e7c1ea0b3 117 bool m_CE;
johnb 13:302e7c1ea0b3 118 bool m_CEPend;
johnb 31:c144106e55b5 119 uint16_t m_sourceAddress;
johnb 31:c144106e55b5 120 uint16_t m_sourceAddressPend;
johnb 32:af4e495afd62 121 uint32_t m_snLow;
johnb 32:af4e495afd62 122 uint32_t m_snHigh;
johnb 32:af4e495afd62 123 uint8_t m_retries;
johnb 32:af4e495afd62 124 uint8_t m_retriesPend;
johnb 32:af4e495afd62 125 uint8_t m_randomDelaySlots;
johnb 32:af4e495afd62 126 uint8_t m_randomDelaySlotsPend;
johnb 50:f76b7e7959a2 127 XBeeApiMACMode_e m_macMode;
johnb 50:f76b7e7959a2 128 XBeeApiMACMode_e m_macModePend;
johnb 50:f76b7e7959a2 129 XBeeApiDioConfig_e m_d[ XBEE_API_DIO_CHANNEL_COUNT ];
johnb 50:f76b7e7959a2 130 XBeeApiDioConfig_e m_dPend[ XBEE_API_DIO_CHANNEL_COUNT ];
johnb 51:a7d0d2ef9261 131 uint8_t m_dioChangeDetectMask;
johnb 51:a7d0d2ef9261 132 uint8_t m_dioChangeDetectMaskPend;
johnb 51:a7d0d2ef9261 133 uint8_t m_dioLevels;
johnb 51:a7d0d2ef9261 134 uint8_t m_dioLevelsPend;
johnb 51:a7d0d2ef9261 135 uint16_t m_sampleRate;
johnb 51:a7d0d2ef9261 136 uint16_t m_sampleRatePend;
johnb 51:a7d0d2ef9261 137 uint32_t m_destHigh;
johnb 51:a7d0d2ef9261 138 uint32_t m_destHighPend;
johnb 51:a7d0d2ef9261 139 uint32_t m_destLow;
johnb 51:a7d0d2ef9261 140 uint32_t m_destLowPend;
johnb 51:a7d0d2ef9261 141 uint32_t m_writeCount;
johnb 51:a7d0d2ef9261 142 uint32_t m_applyCount;
johnb 51:a7d0d2ef9261 143 uint32_t m_resetCount;
johnb 51:a7d0d2ef9261 144 uint32_t m_sampleCount;
johnb 52:0950b05d5270 145
johnb 52:0950b05d5270 146 time_t m_ioDigitalUpdatedTime[ XBEE_API_DIO_CHANNEL_COUNT ];
johnb 52:0950b05d5270 147 bool m_ioDigitalState[ XBEE_API_DIO_CHANNEL_COUNT ];
johnb 52:0950b05d5270 148 time_t m_ioAnalogueUpdatedTime[ XBEE_API_ADC_CHANNEL_COUNT ];
johnb 52:0950b05d5270 149 uint16_t m_ioAnalogueVal[ XBEE_API_ADC_CHANNEL_COUNT ];
johnb 52:0950b05d5270 150
johnb 8:1b48b619d7f6 151
johnb 50:f76b7e7959a2 152 virtual void SendCmd_uint8_t( const uint8_t p_frameId,
johnb 50:f76b7e7959a2 153 const uint8_t* const p_data,
johnb 50:f76b7e7959a2 154 const uint8_t& p_val );
johnb 50:f76b7e7959a2 155 virtual void SendCmd_uint16_t( const uint8_t p_frameId,
johnb 50:f76b7e7959a2 156 const uint8_t* const p_data,
johnb 50:f76b7e7959a2 157 const uint16_t& p_val );
johnb 51:a7d0d2ef9261 158 virtual void SendCmd_uint32_t( const uint8_t p_frameId,
johnb 51:a7d0d2ef9261 159 const uint8_t* const p_data,
johnb 51:a7d0d2ef9261 160 const uint32_t& p_val );
johnb 50:f76b7e7959a2 161 virtual void SendReq( const uint8_t p_frameId,
johnb 50:f76b7e7959a2 162 const uint8_t* p_data );
johnb 13:302e7c1ea0b3 163
johnb 50:f76b7e7959a2 164 virtual size_t getResponseStatusPos( void ) const;
johnb 50:f76b7e7959a2 165
johnb 50:f76b7e7959a2 166
johnb 50:f76b7e7959a2 167 /* Implement XBeeApiCmdDecoder interface */
johnb 50:f76b7e7959a2 168 virtual bool decodeCallback( const uint8_t* const p_data, size_t p_len );
johnb 50:f76b7e7959a2 169
johnb 50:f76b7e7959a2 170 virtual bool processResponseFrame( const uint8_t* const p_data, size_t p_len );
johnb 50:f76b7e7959a2 171
johnb 52:0950b05d5270 172 virtual bool processIOFrame( const uint8_t* const p_data, size_t p_len, const size_t p_start );
johnb 26:f5df80e990f4 173
johnb 8:1b48b619d7f6 174 public:
johnb 13:302e7c1ea0b3 175
johnb 29:c6d037cceb02 176 /** Constructor
johnb 29:c6d037cceb02 177
johnb 29:c6d037cceb02 178 \param p_device XBee device with which this object should be associated */
johnb 29:c6d037cceb02 179 XBeeApiCmdAt( XBeeDevice* const p_device = NULL );
johnb 26:f5df80e990f4 180
johnb 26:f5df80e990f4 181 /** Destructor */
johnb 26:f5df80e990f4 182 virtual ~XBeeApiCmdAt( void ) {};
johnb 8:1b48b619d7f6 183
johnb 52:0950b05d5270 184 time_t getDigitalState( const uint8_t p_chanNo, bool& p_state );
johnb 52:0950b05d5270 185 time_t getAnalogueValue( const uint8_t p_chanNo, uint16_t& p_val );
johnb 52:0950b05d5270 186
johnb 26:f5df80e990f4 187 /** Request the hardware version identifier from the XBee.
johnb 26:f5df80e990f4 188 As the data is retrieved asynchronously to this call,
johnb 26:f5df80e990f4 189 once the response is received it can be accessed via
johnb 26:f5df80e990f4 190 getHardwareVersion() */
johnb 26:f5df80e990f4 191 bool requestHardwareVersion( void );
johnb 26:f5df80e990f4 192 bool requestFirmwareVersion( void );
johnb 26:f5df80e990f4 193 bool requestChannel( void );
johnb 26:f5df80e990f4 194 bool requestCoordinatorEnabled( void );
johnb 26:f5df80e990f4 195 bool requestEndDeviceAssociationEnabled( void );
johnb 26:f5df80e990f4 196 bool requestPanId( void );
johnb 31:c144106e55b5 197 bool requestSourceAddress( void );
johnb 32:af4e495afd62 198 bool requestSerialNumber( void );
johnb 50:f76b7e7959a2 199 bool requestSerialNumberHigh( void );
johnb 50:f76b7e7959a2 200 bool requestSerialNumberLow( void );
johnb 50:f76b7e7959a2 201 bool requestDioConfig( const uint8_t p_chanNo );
johnb 51:a7d0d2ef9261 202 bool requestDioChangeDetectMask( void );
johnb 51:a7d0d2ef9261 203 bool requestSampleRate( void );
johnb 50:f76b7e7959a2 204
johnb 32:af4e495afd62 205 /** Request the number of retries the XBee is configured to make.
johnb 32:af4e495afd62 206 Note that the 802.15.4 MAC already allows 3 retries, so this parameter
johnb 32:af4e495afd62 207 specifies an additional multiple of 3 retries
johnb 32:af4e495afd62 208 As the data is retrieved asynchronously to this call,
johnb 32:af4e495afd62 209 once the response is received it can be accessed via
johnb 32:af4e495afd62 210 getRetries()
johnb 32:af4e495afd62 211 */
johnb 32:af4e495afd62 212 bool requestRetries( void );
johnb 32:af4e495afd62 213
johnb 32:af4e495afd62 214 /** Request the minimum value of the back-off exponent in the CSMA-CA algorithm
johnb 32:af4e495afd62 215 used in collision avoidance.
johnb 32:af4e495afd62 216 */
johnb 32:af4e495afd62 217 bool requestRandomDelaySlots( void );
johnb 32:af4e495afd62 218
johnb 32:af4e495afd62 219 bool requestMacMode( void );
johnb 51:a7d0d2ef9261 220 bool requestDestinationAddress( void );
johnb 51:a7d0d2ef9261 221 bool requestDestinationAddressHigh( void );
johnb 51:a7d0d2ef9261 222 bool requestDestinationAddressLow( void );
johnb 51:a7d0d2ef9261 223
johnb 51:a7d0d2ef9261 224 bool requestWriteSettings( void );
johnb 51:a7d0d2ef9261 225 bool requestApplyChanges( void );
johnb 51:a7d0d2ef9261 226 bool requestReset( void );
johnb 51:a7d0d2ef9261 227 bool requestForceSample( void );
johnb 8:1b48b619d7f6 228
johnb 26:f5df80e990f4 229 /** Read the XBee's hardware version identifier.
johnb 26:f5df80e990f4 230
johnb 26:f5df80e990f4 231 This method does not initiate any communication with the
johnb 26:f5df80e990f4 232 XBee - the identifier must previously have been requested
johnb 26:f5df80e990f4 233 via requestHardwareVersion(). The method is non-blocking. */
johnb 26:f5df80e990f4 234 virtual bool getHardwareVersion( uint16_t* const p_ver );
johnb 26:f5df80e990f4 235
johnb 26:f5df80e990f4 236 /** Read the XBee's firmware version identifier.
johnb 26:f5df80e990f4 237
johnb 26:f5df80e990f4 238 This method does not initiate any communication with the
johnb 26:f5df80e990f4 239 XBee - the identifier must previously have been requested
johnb 26:f5df80e990f4 240 via requestFirmwareVersion(). The method is non-blocking. */
johnb 26:f5df80e990f4 241 virtual bool getFirmwareVersion( uint16_t* const p_ver );
johnb 32:af4e495afd62 242
johnb 32:af4e495afd62 243 virtual bool getSerialNumber( uint64_t* const p_sn );
johnb 13:302e7c1ea0b3 244
johnb 32:af4e495afd62 245 virtual bool getChannel( uint8_t* const p_chan );
johnb 32:af4e495afd62 246 virtual bool setChannel( uint8_t const p_chan );
johnb 8:1b48b619d7f6 247
johnb 32:af4e495afd62 248 virtual bool getCoordinatorEnabled( bool* const p_en );
johnb 32:af4e495afd62 249 virtual bool setCoordinatorEnabled( const bool p_en );
johnb 32:af4e495afd62 250
johnb 32:af4e495afd62 251 virtual bool getEndDeviceAssociationEnabled( bool* const p_en );
johnb 32:af4e495afd62 252 virtual bool setEndDeviceAssociationEnabled( const bool p_en );
johnb 13:302e7c1ea0b3 253
johnb 32:af4e495afd62 254 virtual bool getPanId( panId_t* const p_id );
johnb 32:af4e495afd62 255 virtual bool setPanId( const panId_t p_id );
johnb 32:af4e495afd62 256
johnb 32:af4e495afd62 257 virtual bool getSourceAddress( uint16_t* const p_addr );
johnb 32:af4e495afd62 258 virtual bool setSourceAddress( const uint16_t p_addr );
johnb 31:c144106e55b5 259
johnb 32:af4e495afd62 260 virtual bool getRetries( uint8_t* const p_addr );
johnb 32:af4e495afd62 261 virtual bool setRetries( const uint8_t p_addr );
johnb 31:c144106e55b5 262
johnb 32:af4e495afd62 263 virtual bool getRandomDelaySlots( uint8_t* const p_addr );
johnb 32:af4e495afd62 264 virtual bool setRandomDelaySlots( const uint8_t p_addr );
johnb 32:af4e495afd62 265
johnb 32:af4e495afd62 266 virtual bool getMacMode( XBeeApiMACMode_e* const p_mode );
johnb 50:f76b7e7959a2 267 virtual bool setMacMode( const XBeeApiMACMode_e p_mode );
johnb 50:f76b7e7959a2 268
johnb 50:f76b7e7959a2 269 virtual bool getDioConfig( const uint8_t p_chanNo, XBeeApiDioConfig_e* const p_conf );
johnb 50:f76b7e7959a2 270 virtual bool setDioConfig( const uint8_t p_chanNo, const XBeeApiDioConfig_e p_conf );
johnb 51:a7d0d2ef9261 271
johnb 51:a7d0d2ef9261 272 virtual bool getDioChangeDetectMask( uint8_t* const p_mask );
johnb 51:a7d0d2ef9261 273 virtual bool setDioChangeDetectMask( const uint8_t p_mask );
johnb 26:f5df80e990f4 274
johnb 51:a7d0d2ef9261 275 /** Note that this method will only return a value in the case that the levels have
johnb 51:a7d0d2ef9261 276 been previously set via the setDioLevels method and that the XBee has
johnb 51:a7d0d2ef9261 277 returned a successful response. There is no ability to simply read what the
johnb 51:a7d0d2ef9261 278 current digital outputs are set to */
johnb 51:a7d0d2ef9261 279 virtual bool getDioLevels( uint8_t* const p_mask );
johnb 51:a7d0d2ef9261 280 virtual bool setDioLevels( const uint8_t p_mask );
johnb 8:1b48b619d7f6 281
johnb 51:a7d0d2ef9261 282 /* TODO: Add protection to prevent p_interval being too small - see data sheet */
johnb 51:a7d0d2ef9261 283 virtual bool getSampleRate( uint16_t* const p_interval );
johnb 51:a7d0d2ef9261 284 virtual bool setSampleRate( const uint16_t p_interval );
johnb 51:a7d0d2ef9261 285
johnb 51:a7d0d2ef9261 286 virtual bool getDestinationAddress( uint64_t* const p_address );
johnb 51:a7d0d2ef9261 287 virtual bool setDestinationAddress( const uint64_t p_address );
johnb 13:302e7c1ea0b3 288
johnb 51:a7d0d2ef9261 289 virtual bool getDestinationAddressHigh( uint32_t* const p_address );
johnb 51:a7d0d2ef9261 290 virtual bool setDestinationAddressHigh( const uint32_t p_address );
johnb 31:c144106e55b5 291
johnb 51:a7d0d2ef9261 292 virtual bool getDestinationAddressLow( uint32_t* const p_address );
johnb 51:a7d0d2ef9261 293 virtual bool setDestinationAddressLow( const uint32_t p_address );
johnb 32:af4e495afd62 294
johnb 8:1b48b619d7f6 295 };
johnb 8:1b48b619d7f6 296
johnb 8:1b48b619d7f6 297 #endif