Flo rian / RF22KL25Z

Fork of RF22 by Karl Zweimüller

Embed: (wiki syntax)

« Back to documentation index

RF22Mesh Class Reference

RF22 subclass for sending addressed, optionally acknowledged datagrams multi-hop routed across a network, with automatic route discovery. More...

#include <RF22Mesh.h>

Inherits RF22Router.

Data Structures

struct  MeshApplicationMessage
 Signals an application layer message for the caller of RF22Mesh. More...
struct  MeshMessageHeader
 Structure of the basic RF22Mesh header. More...
struct  MeshRouteDiscoveryMessage
 Signals a route discovery request or reply At present only supports physical dest addresses of length 1 octet. More...
struct  MeshRouteFailureMessage
 Signals a route failure. More...

Public Types

enum  RouteState { Invalid = 0, Discovering, Valid }
 

Values for the possible states for routes.

More...
enum  ModemConfigChoice {
  UnmodulatedCarrier = 0, FSK_PN9_Rb2Fd5, FSK_Rb2Fd5, FSK_Rb2_4Fd36,
  FSK_Rb4_8Fd45, FSK_Rb9_6Fd45, FSK_Rb19_2Fd9_6, FSK_Rb38_4Fd19_6,
  FSK_Rb57_6Fd28_8, FSK_Rb125Fd125, GFSK_Rb2Fd5, GFSK_Rb2_4Fd36,
  GFSK_Rb4_8Fd45, GFSK_Rb9_6Fd45, GFSK_Rb19_2Fd9_6, GFSK_Rb38_4Fd19_6,
  GFSK_Rb57_6Fd28_8, GFSK_Rb125Fd125, OOK_Rb1_2Bw75, OOK_Rb2_4Bw335,
  OOK_Rb4_8Bw335, OOK_Rb9_6Bw335, OOK_Rb19_2Bw335, OOK_Rb38_4Bw335,
  OOK_Rb40Bw335
}
 

Choices for setModemConfig() for a selected subset of common modulation types, and data rates.

More...

Public Member Functions

 RF22Mesh (uint8_t thisAddress, PinName slaveSelectPin, PinName mosi, PinName miso, PinName sclk, PinName interrupt)
 Constructor.
uint8_t sendtoWait (uint8_t *buf, uint8_t len, uint8_t dest)
 Sends a message to the destination node.
boolean recvfromAck (uint8_t *buf, uint8_t *len, uint8_t *source=NULL, uint8_t *dest=NULL, uint8_t *id=NULL, uint8_t *flags=NULL)
 Starts the receiver if it is not running already.
boolean recvfromAckTimeout (uint8_t *buf, uint8_t *len, uint16_t timeout, uint8_t *source=NULL, uint8_t *dest=NULL, uint8_t *id=NULL, uint8_t *flags=NULL)
 Starts the receiver if it is not running already.
boolean init ()
 Initialises this instance and the radio module connected to it.
void setMaxHops (uint8_t max_hops)
 Sets the max_hops to the given value This controls the maximum number of hops allowed between source and destination nodes Messages that are not delivered by the time their HOPS field exceeds max_hops on a routing node will be dropped and ignored.
void addRouteTo (uint8_t dest, uint8_t next_hop, uint8_t state=Valid)
 Adds a route to the local routing table, or updates it if already present.
RoutingTableEntrygetRouteTo (uint8_t dest)
 Finds and returns a RoutingTableEntry for the given destination node.
boolean deleteRouteTo (uint8_t dest)
 Deletes from the local routing table any route for the destination node.
void retireOldestRoute ()
 Deletes the oldest (first) route from the local routing table.
void clearRoutingTable ()
 Clears all entries from the local routing table.
void printRoutingTable ()
 If RF22_HAVE_SERIAL is defined, this will print out the contents of the local routing table using Serial.
uint8_t sendtoWait (uint8_t *buf, uint8_t len, uint8_t dest, uint8_t source)
 Similar to sendtoWait() above, but spoofs the source address.
void setTimeout (uint16_t timeout)
 Sets the minimum retransmit timeout.
void setRetries (uint8_t retries)
 Sets the max number of retries.
uint16_t retransmissions ()
 Returns the number of retransmissions we have had to send.
void setThisAddress (uint8_t thisAddress)
 Sets the address of this node.
boolean sendto (uint8_t *buf, uint8_t len, uint8_t address)
 Sends a message to the node(s) with the given address RF22_BROADCAST_ADDRESS is a valid address which will cause the message to be accepted by all RF22Datagram nodes within range.
boolean recvfrom (uint8_t *buf, uint8_t *len, uint8_t *from=NULL, uint8_t *to=NULL, uint8_t *id=NULL, uint8_t *flags=NULL)
 Turns the receiver on if it not already on.
void reset ()
 Issues a software reset to the RF22 module.
uint8_t spiRead (uint8_t reg)
 Reads a single register from the RF22.
void spiWrite (uint8_t reg, uint8_t val)
 Writes a single byte to the RF22.
void spiBurstRead (uint8_t reg, uint8_t *dest, uint8_t len)
 Reads a number of consecutive registers from the RF22 using burst read mode.
void spiBurstWrite (uint8_t reg, const uint8_t *src, uint8_t len)
 Write a number of consecutive registers using burst write mode.
uint8_t statusRead ()
 Reads and returns the device status register RF22_REG_02_DEVICE_STATUS.
uint8_t adcRead (uint8_t adcsel=RF22_ADCSEL_INTERNAL_TEMPERATURE_SENSOR, uint8_t adcref=RF22_ADCREF_BANDGAP_VOLTAGE, uint8_t adcgain=0, uint8_t adcoffs=0)
 Reads a value from the on-chip analog-digital converter.
uint8_t temperatureRead (uint8_t tsrange=RF22_TSRANGE_M64_64C, uint8_t tvoffs=0)
 Reads the on-chip temperature sensoer.
uint16_t wutRead ()
 Reads the wakeup timer value in registers RF22_REG_17_WAKEUP_TIMER_VALUE1 and RF22_REG_18_WAKEUP_TIMER_VALUE2.
void setWutPeriod (uint16_t wtm, uint8_t wtr=0, uint8_t wtd=0)
 Sets the wakeup timer period registers RF22_REG_14_WAKEUP_TIMER_PERIOD1, RF22_REG_15_WAKEUP_TIMER_PERIOD2 and RF22_R<EG_16_WAKEUP_TIMER_PERIOD3.
boolean setFrequency (float centre, float afcPullInRange=0.05)
 Sets the transmitter and receiver centre frequency.
boolean setFHStepSize (uint8_t fhs)
 Sets the frequency hopping step size.
boolean setFHChannel (uint8_t fhch)
 Sets the frequncy hopping channel.
uint8_t rssiRead ()
 Reads and returns the current RSSI value from register RF22_REG_26_RSSI.
uint8_t ezmacStatusRead ()
 Reads and returns the current EZMAC value from register RF22_REG_31_EZMAC_STATUS.
void setMode (uint8_t mode)
 Sets the parameters for the RF22 Idle mode in register RF22_REG_07_OPERATING_MODE.
void setModeIdle ()
 If current mode is Rx or Tx changes it to Idle.
void setModeRx ()
 If current mode is Tx or Idle, changes it to Rx.
void setModeTx ()
 If current mode is Rx or Idle, changes it to Rx.
uint8_t mode ()
 Returns the operating mode of the library.
void setTxPower (uint8_t power)
 Sets the transmitter power output level in register RF22_REG_6D_TX_POWER.
void setModemRegisters (const ModemConfig *config)
 Sets all the registered required to configure the data modem in the RF22, including the data rate, bandwidths etc.
boolean setModemConfig (ModemConfigChoice index)
 Select one of the predefined modem configurations.
boolean available ()
 Starts the receiver and checks whether a received message is available.
void waitAvailable ()
 Starts the receiver and blocks until a valid received message is available.
bool waitAvailableTimeout (uint16_t timeout)
 Starts the receiver and blocks until a received message is available or a timeout.
boolean recv (uint8_t *buf, uint8_t *len)
 Turns the receiver on if it not already on.
boolean send (const uint8_t *data, uint8_t len)
 Waits until any previous transmit packet is finished being transmitted with waitPacketSent().
void waitPacketSent ()
 Blocks until the RF22 is not in mode RF22_MODE_TX (ie until the RF22 is not transmitting).
void setPromiscuous (boolean promiscuous)
 Tells the receiver to accept messages with any TO address, not just messages addressed to this node or the broadcast address.
uint8_t headerTo ()
 Returns the TO header of the last received message.
uint8_t headerFrom ()
 Returns the FROM header of the last received message.
uint8_t headerId ()
 Returns the ID header of the last received message.
uint8_t headerFlags ()
 Returns the FLAGS header of the last received message.
uint8_t lastRssi ()
 Returns the RSSI (Receiver Signal Strength Indicator) of the last received message.
void setPreambleLength (uint8_t nibbles)
 Sets the length of the preamble in 4-bit nibbles.
void setSyncWords (const uint8_t *syncWords, uint8_t len)
 Sets the sync words for transmit and receive in registers RF22_REG_36_SYNC_WORD3 to RF22_REG_39_SYNC_WORD0 Caution: this should be set to the same value on all nodes in your network.

Static Public Member Functions

static void printBuffer (const char *prompt, const uint8_t *buf, uint8_t len)
 Prints a data buffer in HEX.

Protected Member Functions

virtual void peekAtMessage (RoutedMessage *message, uint8_t messageLen)
 Internal function that inspects messages being received and adjusts the routing table if necessary.
virtual uint8_t route (RoutedMessage *message, uint8_t messageLen)
 Internal function that inspects messages being received and adjusts the routing table if necessary.
virtual boolean doArp (uint8_t address)
 Try to resolve a route for the given address.
virtual boolean isPhysicalAddress (uint8_t *address, uint8_t addresslen)
 Tests if the given address of length addresslen is indentical to the physical addres of this node.
void deleteRoute (uint8_t index)
 Deletes a specific rout entry from therouting table.
void acknowledge (uint8_t id, uint8_t from)
 Send an ACK for the message id to the given from address Blocks until the ACK has been sent.
boolean haveNewMessage ()
 Checks whether the message currently in the Rx buffer is a new message, not previously received based on the from address and the sequence.
void handleInterrupt ()
 This is a low level function to handle the interrupts for one instance of RF22.
void clearRxBuf ()
 Clears the receiver buffer.
void clearTxBuf ()
 Clears the transmitter buffer Internal use only.
boolean fillTxBuf (const uint8_t *data, uint8_t len)
 Fills the transmitter buffer with the data of a mesage to be sent.
boolean appendTxBuf (const uint8_t *data, uint8_t len)
 Appends the transmitter buffer with the data of a mesage to be sent.
void sendNextFragment ()
 Internal function to load the next fragment of the current message into the transmitter FIFO Internal use only.
void readNextFragment ()
 function to copy the next fragment from the receiver FIF) into the receiver buffer
void resetFifos ()
 Clears the RF22 Rx and Tx FIFOs Internal use only.
void resetRxFifo ()
 Clears the RF22 Rx FIFO Internal use only.
void resetTxFifo ()
 Clears the RF22 Tx FIFO Internal use only.
virtual void handleExternalInterrupt ()
 This function will be called by handleInterrupt() if an RF22 external interrupt occurs.
virtual void handleWakeupTimerInterrupt ()
 This function will be called by handleInterrupt() if an RF22 wakeup timer interrupt occurs.
void setHeaderTo (uint8_t to)
 Sets the TO header to be sent in all subsequent messages.
void setHeaderFrom (uint8_t from)
 Sets the FROM header to be sent in all subsequent messages.
void setHeaderId (uint8_t id)
 Sets the ID header to be sent in all subsequent messages.
void setHeaderFlags (uint8_t flags)
 Sets the FLAGS header to be sent in all subsequent messages.
void startTransmit ()
 Start the transmission of the contents of the Tx buffer.
void restartTransmit ()
 ReStart the transmission of the contents of the Tx buffer after a atransmission failure.
void isr0 ()
 Low level interrupt service routine for RF22 connected to interrupt 0.

Protected Attributes

uint8_t _lastE2ESequenceNumber
 The last end-to-end sequence number to be used Defaults to 0.
uint8_t _max_hops
 The maximum number of hops permitted in routed messages.
uint8_t _thisAddress
 The address of this node. Defaults to 0.

Detailed Description

RF22 subclass for sending addressed, optionally acknowledged datagrams multi-hop routed across a network, with automatic route discovery.

Extends RF22Router to add automatic route discovery within a mesh of adjacent nodes, and route signalling.

Unlike RF22Router, RF22Mesh can be used in networks where the network topology is fluid, or unknown, or if nodes can mode around or go in or out of service. When a node wants to send a message to another node, it will automcatically discover a route to the destaintion node and use it. If the route becomes unavailable, a new route will be discovered.

Route Discovery

When a RF22Mesh mesh node is initialised, it doe not know any routes to any other nodes (see RF22Router for details on route and the routing table). When you attempt to send a message with sendtoWait, will first check to see if there is a route to the destinastion node in the routing tabl;e. If not, it wil initialite 'Route Discovery'. When a node needs to discover a route to another node, it broadcasts MeshRouteDiscoveryMessage with a message type of RF22_MESH_MESSAGE_TYPE_ROUTE_DISCOVERY_REQUEST. Any node that receives such a request checks to see if it is a request for a route to itself (in which case it makes a unicast reply to the originating node with a MeshRouteDiscoveryMessage with a message type of RF22_MESH_MESSAGE_TYPE_ROUTE_DISCOVERY_RESPONSE) otherwise it rebroadcasts the request, after adding itself to the list of nodes visited so far by the request.

If a node receives a RF22_MESH_MESSAGE_TYPE_ROUTE_DISCOVERY_REQUEST that already has itself listed in the visited nodes, it knows it has already seen and rebroadcast this request, and threfore ignores it. This prevents broadcast storms. When a node receives a RF22_MESH_MESSAGE_TYPE_ROUTE_DISCOVERY_REQUEST it can use the list of nodes aready visited to deduce routes back towards the originating (requesting node). This also means that when the destination node of the request is reached, it (and all the previous nodes the request visited) will have a route back to the originating node. This means the unicast RF22_MESH_MESSAGE_TYPE_ROUTE_DISCOVERY_RESPONSE reply will be routed successfully back to the original route requester.

The RF22_MESH_MESSAGE_TYPE_ROUTE_DISCOVERY_RESPONSE sent back by the destination node contains the full list of nodes that were visited on the way to the destination. Therefore, intermediate nodes that route the reply back towards the originating node can use the node list in the reply to deduce routes to all the nodes between it and the destination node.

Therefore, RF22_MESH_MESSAGE_TYPE_ROUTE_DISCOVERY_REQUEST and RF22_MESH_MESSAGE_TYPE_ROUTE_DISCOVERY_RESPONSE together ensure the original requester and all the intermediate nodes know how to route to the source and destination nodes and every node along the path.

Note that there is a race condition here that can effect routing on multipath routes. For example, if the route to the destination can traverse several paths, last reply from the destination will be the one used.

Route Failure

RF22Router (and therefore RF22Mesh) use reliable hop-to-hop delivery of messages using hop-to-hop acknowledgements, but not end-to-end acknowledgements. When sendtoWait() returns, you know that the message has been delivered to the next hop, but not if it is (or even if it can be) delivered to the destination node. If during the course of hop-to-hop routing of a message, one of the intermediate RF22Mesh nodes finds it cannot deliver to the next hop (say due to a lost route or no acknwledgement from the next hop), it replies to the originator with a unicast MeshRouteFailureMessage RF22_MESH_MESSAGE_TYPE_ROUTE_FAILURE message. Intermediate nodes (on the way beack to the originator) and the originating node use this message to delete the route to the destination node of the original message. This means that if a route to a destination becomes unusable (either because an intermediate node is off the air, or has moved out of range) a new route will be established the next time a message is to be sent.

Message Format

RF22Mesh uses a number of message formats layered on top of RF22Router:

  • MeshApplicationMessage (message type RF22_MESH_MESSAGE_TYPE_APPLICATION). Carries an application layer message for the caller of RF22Mesh
  • MeshRouteDiscoveryMessage (message types RF22_MESH_MESSAGE_TYPE_ROUTE_DISCOVERY_REQUEST and RF22_MESH_MESSAGE_TYPE_ROUTE_DISCOVERY_RESPONSE). Carries Route Discovery messages (broadcast) and replies (unicast).
  • MeshRouteFailureMessage (message type RF22_MESH_MESSAGE_TYPE_ROUTE_FAILURE) Informs nodes of route failures.

Part of the Arduino RF22 library for operating with HopeRF RF22 compatible transceivers (see http://www.hoperf.com)

Definition at line 98 of file RF22Mesh.h.


Member Enumeration Documentation

enum ModemConfigChoice [inherited]

Choices for setModemConfig() for a selected subset of common modulation types, and data rates.

If you need another configuration, use the register calculator. and call setModemRegisters() with your desired settings These are indexes into _modemConfig

Enumerator:
UnmodulatedCarrier 

Unmodulated carrier for testing.

FSK_PN9_Rb2Fd5 

FSK, No Manchester, Rb = 2kbs, Fd = 5kHz, PN9 random modulation for testing.

FSK_Rb2Fd5 

FSK, No Manchester, Rb = 2kbs, Fd = 5kHz.

FSK_Rb2_4Fd36 

FSK, No Manchester, Rb = 2.4kbs, Fd = 36kHz.

FSK_Rb4_8Fd45 

FSK, No Manchester, Rb = 4.8kbs, Fd = 45kHz.

FSK_Rb9_6Fd45 

FSK, No Manchester, Rb = 9.6kbs, Fd = 45kHz.

FSK_Rb19_2Fd9_6 

FSK, No Manchester, Rb = 19.2kbs, Fd = 9.6kHz.

FSK_Rb38_4Fd19_6 

FSK, No Manchester, Rb = 38.4kbs, Fd = 19.6kHz.

FSK_Rb57_6Fd28_8 

FSK, No Manchester, Rb = 57.6kbs, Fd = 28.8kHz.

FSK_Rb125Fd125 

FSK, No Manchester, Rb = 125kbs, Fd = 125kHz.

GFSK_Rb2Fd5 

GFSK, No Manchester, Rb = 2kbs, Fd = 5kHz.

GFSK_Rb2_4Fd36 

GFSK, No Manchester, Rb = 2.4kbs, Fd = 36kHz.

GFSK_Rb4_8Fd45 

GFSK, No Manchester, Rb = 4.8kbs, Fd = 45kHz.

GFSK_Rb9_6Fd45 

GFSK, No Manchester, Rb = 9.6kbs, Fd = 45kHz.

GFSK_Rb19_2Fd9_6 

GFSK, No Manchester, Rb = 19.2kbs, Fd = 9.6kHz.

GFSK_Rb38_4Fd19_6 

GFSK, No Manchester, Rb = 38.4kbs, Fd = 19.6kHz.

GFSK_Rb57_6Fd28_8 

GFSK, No Manchester, Rb = 57.6kbs, Fd = 28.8kHz.

GFSK_Rb125Fd125 

GFSK, No Manchester, Rb = 125kbs, Fd = 125kHz.

OOK_Rb1_2Bw75 

OOK, No Manchester, Rb = 1.2kbs, Rx Bandwidth = 75kHz.

OOK_Rb2_4Bw335 

OOK, No Manchester, Rb = 2.4kbs, Rx Bandwidth = 335kHz.

OOK_Rb4_8Bw335 

OOK, No Manchester, Rb = 4.8kbs, Rx Bandwidth = 335kHz.

OOK_Rb9_6Bw335 

OOK, No Manchester, Rb = 9.6kbs, Rx Bandwidth = 335kHz.

OOK_Rb19_2Bw335 

OOK, No Manchester, Rb = 19.2kbs, Rx Bandwidth = 335kHz.

OOK_Rb38_4Bw335 

OOK, No Manchester, Rb = 38.4kbs, Rx Bandwidth = 335kHz.

OOK_Rb40Bw335 

OOK, No Manchester, Rb = 40kbs, Rx Bandwidth = 335kHz.

Definition at line 758 of file RF22.h.

enum RouteState [inherited]

Values for the possible states for routes.

Enumerator:
Invalid 

No valid route is known.

Discovering 

Discovering a route (not currently used)

Valid 

Route is valid.

Definition at line 157 of file RF22Router.h.


Constructor & Destructor Documentation

RF22Mesh ( uint8_t  thisAddress,
PinName  slaveSelectPin,
PinName  mosi,
PinName  miso,
PinName  sclk,
PinName  interrupt 
)

Constructor.

Parameters:
[in]thisAddressThe address to assign to this node. Defaults to 0
[in]slaveSelectPinthe Arduino pin number of the output to use to select the RF22 before accessing it. Defaults to the normal SS pin for your Arduino (D10 for Diecimila, Uno etc, D53 for Mega)
[in]interruptThe interrupt number to use. Default is interrupt 0 (Arduino input pin 2)

Definition at line 24 of file RF22Mesh.cpp.


Member Function Documentation

void acknowledge ( uint8_t  id,
uint8_t  from 
) [protected, inherited]

Send an ACK for the message id to the given from address Blocks until the ACK has been sent.

Definition at line 155 of file RF22ReliableDatagram.cpp.

uint8_t adcRead ( uint8_t  adcsel = RF22_ADCSEL_INTERNAL_TEMPERATURE_SENSOR,
uint8_t  adcref = RF22_ADCREF_BANDGAP_VOLTAGE,
uint8_t  adcgain = 0,
uint8_t  adcoffs = 0 
) [inherited]

Reads a value from the on-chip analog-digital converter.

Parameters:
[in]adcselSelects the ADC input to measure. One of RF22_ADCSEL_*. Defaults to the internal temperature sensor
[in]adcrefSpecifies the refernce voltage to use. One of RF22_ADCREF_*. Defaults to the internal bandgap voltage.
[in]adcgainAmplifier gain selection.
[in]adcoffsAmplifier offseet (0 to 15).
Returns:
The analog value. 0 to 255.

Definition at line 409 of file RF22.cpp.

void addRouteTo ( uint8_t  dest,
uint8_t  next_hop,
uint8_t  state = Valid 
) [inherited]

Adds a route to the local routing table, or updates it if already present.

If there is not enough room the oldest (first) route will be deleted by calling retireOldestRoute().

Parameters:
[in]destThe destination node address. RF22_BROADCAST_ADDRESS is permitted.
[in]next_hopThe address of the next hop to send messages destined for dest
[in]stateThe satte of the route. Defaults to Valid

Definition at line 48 of file RF22Router.cpp.

boolean appendTxBuf ( const uint8_t *  data,
uint8_t  len 
) [protected, inherited]

Appends the transmitter buffer with the data of a mesage to be sent.

Parameters:
[in]dataArray of data bytes to be sent (0 to 255)
[in]lenNumber of data bytes in data
Returns:
false if the resulting message would exceed RF22_MAX_MESSAGE_LEN, else true

Definition at line 716 of file RF22.cpp.

boolean available (  ) [inherited]

Starts the receiver and checks whether a received message is available.

This can be called multiple times in a timeout loop

Returns:
true if a complete, valid message has been received and is able to be retrieved by recv()

Definition at line 603 of file RF22.cpp.

void clearRoutingTable (  ) [inherited]

Clears all entries from the local routing table.

Definition at line 150 of file RF22Router.cpp.

void clearRxBuf (  ) [protected, inherited]

Clears the receiver buffer.

Internal use only

Definition at line 595 of file RF22.cpp.

void clearTxBuf (  ) [protected, inherited]

Clears the transmitter buffer Internal use only.

Definition at line 670 of file RF22.cpp.

void deleteRoute ( uint8_t  index ) [protected, inherited]

Deletes a specific rout entry from therouting table.

Parameters:
[in]indexThe 0 based index of the routing table entry to delete

Definition at line 101 of file RF22Router.cpp.

boolean deleteRouteTo ( uint8_t  dest ) [inherited]

Deletes from the local routing table any route for the destination node.

Parameters:
[in]destThe destination node address
Returns:
true if the route was present

Definition at line 128 of file RF22Router.cpp.

boolean doArp ( uint8_t  address ) [protected, virtual]

Try to resolve a route for the given address.

Blocks while discovering the route which may take up to 4000 msec. Virtual so subclasses can override.

Parameters:
[in]addressThe physical addres to resolve
Returns:
true if the address was resolved and added to the local routing table

Definition at line 52 of file RF22Mesh.cpp.

uint8_t ezmacStatusRead (  ) [inherited]

Reads and returns the current EZMAC value from register RF22_REG_31_EZMAC_STATUS.

Returns:
The current EZMAC value

Definition at line 508 of file RF22.cpp.

boolean fillTxBuf ( const uint8_t *  data,
uint8_t  len 
) [protected, inherited]

Fills the transmitter buffer with the data of a mesage to be sent.

Parameters:
[in]dataArray of data bytes to be sent (1 to 255)
[in]lenNumber of data bytes in data (> 0)
Returns:
true if the message length is valid

Definition at line 708 of file RF22.cpp.

RF22Router::RoutingTableEntry * getRouteTo ( uint8_t  dest ) [inherited]

Finds and returns a RoutingTableEntry for the given destination node.

Parameters:
[in]destThe desired destination node address.
Returns:
pointer to a RoutingTableEntry for dest

Definition at line 91 of file RF22Router.cpp.

void handleExternalInterrupt (  ) [protected, virtual, inherited]

This function will be called by handleInterrupt() if an RF22 external interrupt occurs.

This can only happen if external interrupts are enabled in the RF22 (which they are not by default). Subclasses may override this function to get control when an RF22 external interrupt occurs.

Definition at line 777 of file RF22.cpp.

void handleInterrupt (  ) [protected, inherited]

This is a low level function to handle the interrupts for one instance of RF22.

Called automatically by isr0() and isr1() Should not need to be called.

Definition at line 192 of file RF22.cpp.

void handleWakeupTimerInterrupt (  ) [protected, virtual, inherited]

This function will be called by handleInterrupt() if an RF22 wakeup timer interrupt occurs.

This can only happen if wakeup timer interrupts are enabled in the RF22 (which they are not by default). Subclasses may override this function to get control when an RF22 wakeup timer interrupt occurs.

Definition at line 782 of file RF22.cpp.

boolean haveNewMessage (  ) [protected, inherited]

Checks whether the message currently in the Rx buffer is a new message, not previously received based on the from address and the sequence.

If it is new, it is acknowledged and returns true

Returns:
true if there is a message received and it is a new message
uint8_t headerFlags (  ) [inherited]

Returns the FLAGS header of the last received message.

Returns:
The FLAGS header

Definition at line 821 of file RF22.cpp.

uint8_t headerFrom (  ) [inherited]

Returns the FROM header of the last received message.

Returns:
The FROM header

Definition at line 811 of file RF22.cpp.

uint8_t headerId (  ) [inherited]

Returns the ID header of the last received message.

Returns:
The ID header

Definition at line 816 of file RF22.cpp.

uint8_t headerTo (  ) [inherited]

Returns the TO header of the last received message.

Returns:
The TO header

Definition at line 806 of file RF22.cpp.

boolean init (  ) [inherited]

Initialises this instance and the radio module connected to it.

Overrides the init() function in RF22. Sets max_hops to the default of RF22_DEFAULT_MAX_HOPS (30)

Reimplemented from RF22Datagram.

Definition at line 33 of file RF22Router.cpp.

boolean isPhysicalAddress ( uint8_t *  address,
uint8_t  addresslen 
) [protected, virtual]

Tests if the given address of length addresslen is indentical to the physical addres of this node.

RF22Mesh always ikmplements p[hysical addresses as the 1 octet address of the node given by _thisAddress Called by recvfromAck() to test whether a RF22_MESH_MESSAGE_TYPE_ROUTE_DISCOVERY_REQUEST is for this node. Subclasses may want to override to implemnt mode complicated or longer physical addresses

Parameters:
[in]addressAddress of the pyysical addres being tested
[in]addresslenLengthof the address in bytes
Returns:
true if the physical address of this node is identical to address

Definition at line 147 of file RF22Mesh.cpp.

void isr0 (  ) [protected, inherited]

Low level interrupt service routine for RF22 connected to interrupt 0.

Definition at line 335 of file RF22.cpp.

uint8_t lastRssi (  ) [inherited]

Returns the RSSI (Receiver Signal Strength Indicator) of the last received message.

This measurement is taken when the preamble has been received. It is a (non-linear) measure of the received signal strength.

Returns:
The RSSI

Definition at line 826 of file RF22.cpp.

uint8_t mode (  ) [inherited]

Returns the operating mode of the library.

Returns:
the current mode, one of RF22_MODE_*

Definition at line 547 of file RF22.cpp.

void peekAtMessage ( RoutedMessage message,
uint8_t  messageLen 
) [protected, virtual]

Internal function that inspects messages being received and adjusts the routing table if necessary.

Called by recvfromAck() immediately after it gets the message from RF22ReliableDatagram

Parameters:
[in]messagePointer to the RF22Router message that was received.
[in]messageLenLength of message in octets

Reimplemented from RF22Router.

Definition at line 91 of file RF22Mesh.cpp.

void printBuffer ( const char *  prompt,
const uint8_t *  buf,
uint8_t  len 
) [static, inherited]

Prints a data buffer in HEX.

For diagnostic use

Parameters:
[in]promptstring to preface the print
[in]bufLocation of the buffer to print
[in]lenLength of the buffer in octets.

Definition at line 637 of file RF22.cpp.

void printRoutingTable (  ) [inherited]

If RF22_HAVE_SERIAL is defined, this will print out the contents of the local routing table using Serial.

Definition at line 110 of file RF22Router.cpp.

void readNextFragment (  ) [protected, inherited]

function to copy the next fragment from the receiver FIF) into the receiver buffer

Definition at line 745 of file RF22.cpp.

boolean recv ( uint8_t *  buf,
uint8_t *  len 
) [inherited]

Turns the receiver on if it not already on.

If there is a valid message available, copy it to buf and return true else return false. If a message is copied, *len is set to the length (Caution, 0 length messages are permitted). You should be sure to call this function frequently enough to not miss any messages It is recommended that you call it in your main loop.

Parameters:
[in]bufLocation to copy the received message
[in,out]lenPointer to available space in buf. Set to the actual number of octets copied.
Returns:
true if a valid message was copied to buf

Definition at line 655 of file RF22.cpp.

boolean recvfrom ( uint8_t *  buf,
uint8_t *  len,
uint8_t *  from = NULL,
uint8_t *  to = NULL,
uint8_t *  id = NULL,
uint8_t *  flags = NULL 
) [inherited]

Turns the receiver on if it not already on.

If there is a valid message available for this node, copy it to buf and return true The SRC address is placed in *from if present and not NULL. The DEST address is placed in *to if present and not NULL. If a message is copied, *len is set to the length. You should be sure to call this function frequently enough to not miss any messages It is recommended that you call it in your main loop.

Parameters:
[in]bufLocation to copy the received message
[in,out]lenPointer to available space in buf. Set to the actual number of octets copied.
[in]fromIf present and not NULL, the referenced uint8_t will be set to the FROM address
[in]toIf present and not NULL, the referenced uint8_t will be set to the TO address
[in]idIf present and not NULL, the referenced uint8_t will be set to the ID
[in]flagsIf present and not NULL, the referenced uint8_t will be set to the FLAGS (not just those addressed to this node).
Returns:
true if a valid message was copied to buf

Definition at line 41 of file RF22Datagram.cpp.

boolean recvfromAck ( uint8_t *  buf,
uint8_t *  len,
uint8_t *  source = NULL,
uint8_t *  dest = NULL,
uint8_t *  id = NULL,
uint8_t *  flags = NULL 
)

Starts the receiver if it is not running already.

If there is a valid application layer message available for this node (or RF22_BROADCAST_ADDRESS), send an acknowledgement to the last hop address (blocking until this is complete), then copy the application message payload data to buf and return true else return false. If a message is copied, *len is set to the length.. If from is not NULL, the originator SOURCE address is placed in *source. If to is not NULL, the DEST address is placed in *dest. This might be this nodes address or RF22_BROADCAST_ADDRESS. This is the preferred function for getting messages addressed to this node. If the message is not a broadcast, acknowledge to the sender before returning.

Parameters:
[in]bufLocation to copy the received message
[in,out]lenAvailable space in buf. Set to the actual number of octets copied.
[in]sourceIf present and not NULL, the referenced uint8_t will be set to the SOURCE address
[in]destIf present and not NULL, the referenced uint8_t will be set to the DEST address
[in]idIf present and not NULL, the referenced uint8_t will be set to the ID
[in]flagsIf present and not NULL, the referenced uint8_t will be set to the FLAGS (not just those addressed to this node).
Returns:
true if a valid message was recvived for this node and copied to buf

Reimplemented from RF22Router.

Definition at line 154 of file RF22Mesh.cpp.

boolean recvfromAckTimeout ( uint8_t *  buf,
uint8_t *  len,
uint16_t  timeout,
uint8_t *  source = NULL,
uint8_t *  dest = NULL,
uint8_t *  id = NULL,
uint8_t *  flags = NULL 
)

Starts the receiver if it is not running already.

Similar to recvfromAck(), this will block until either a valid application layer message available for this node or the timeout expires.

Parameters:
[in]bufLocation to copy the received message
[in,out]lenAvailable space in buf. Set to the actual number of octets copied.
[in]timeoutMaximum time to wait in milliseconds
[in]sourceIf present and not NULL, the referenced uint8_t will be set to the SOURCE address
[in]destIf present and not NULL, the referenced uint8_t will be set to the DEST address
[in]idIf present and not NULL, the referenced uint8_t will be set to the ID
[in]flagsIf present and not NULL, the referenced uint8_t will be set to the FLAGS (not just those addressed to this node).
Returns:
true if a valid message was copied to buf

Reimplemented from RF22Router.

Definition at line 226 of file RF22Mesh.cpp.

void reset (  ) [inherited]

Issues a software reset to the RF22 module.

Blocks for 1ms to ensure the reset is complete.

Definition at line 348 of file RF22.cpp.

void resetFifos (  ) [protected, inherited]

Clears the RF22 Rx and Tx FIFOs Internal use only.

Definition at line 756 of file RF22.cpp.

void resetRxFifo (  ) [protected, inherited]

Clears the RF22 Rx FIFO Internal use only.

Definition at line 763 of file RF22.cpp.

void resetTxFifo (  ) [protected, inherited]

Clears the RF22 Tx FIFO Internal use only.

Definition at line 770 of file RF22.cpp.

void restartTransmit (  ) [protected, inherited]

ReStart the transmission of the contents of the Tx buffer after a atransmission failure.

Definition at line 687 of file RF22.cpp.

void retireOldestRoute (  ) [inherited]

Deletes the oldest (first) route from the local routing table.

Definition at line 143 of file RF22Router.cpp.

uint16_t retransmissions (  ) [inherited]

Returns the number of retransmissions we have had to send.

Returns:
The number of retransmissions since initialisation.

Definition at line 150 of file RF22ReliableDatagram.cpp.

uint8_t route ( RoutedMessage message,
uint8_t  messageLen 
) [protected, virtual]

Internal function that inspects messages being received and adjusts the routing table if necessary.

This is virtual, which lets subclasses override or intercept the route() function. Called by sendtoWait after the message header has been filled in.

Parameters:
[in]messagePointer to the RF22Router message to be sent.
[in]messageLenLength of message in octets

Reimplemented from RF22Router.

Definition at line 122 of file RF22Mesh.cpp.

uint8_t rssiRead (  ) [inherited]

Reads and returns the current RSSI value from register RF22_REG_26_RSSI.

If you want to find the RSSI of the last received message, use lastRssi() instead.

Returns:
The current RSSI value

Definition at line 503 of file RF22.cpp.

boolean send ( const uint8_t *  data,
uint8_t  len 
) [inherited]

Waits until any previous transmit packet is finished being transmitted with waitPacketSent().

Then loads a message into the transmitter and starts the transmitter. Note that a message length of 0 is NOT permitted.

Parameters:
[in]dataArray of data to be sent
[in]lenNumber of bytes of data to send (> 0)
Returns:
true if the message length was valid and it was correctly queued for transmit

Definition at line 695 of file RF22.cpp.

void sendNextFragment (  ) [protected, inherited]

Internal function to load the next fragment of the current message into the transmitter FIFO Internal use only.

Definition at line 730 of file RF22.cpp.

boolean sendto ( uint8_t *  buf,
uint8_t  len,
uint8_t  address 
) [inherited]

Sends a message to the node(s) with the given address RF22_BROADCAST_ADDRESS is a valid address which will cause the message to be accepted by all RF22Datagram nodes within range.

Parameters:
[in]bufPointer to the binary message to send
[in]lenNumber of octets to send (> 0)
[in]addressThe address to send the message to.
Returns:
true if the message was transmitted.

Definition at line 35 of file RF22Datagram.cpp.

uint8_t sendtoWait ( uint8_t *  buf,
uint8_t  len,
uint8_t  dest,
uint8_t  source 
) [inherited]

Similar to sendtoWait() above, but spoofs the source address.

For internal use only during routing

Parameters:
[in]bufThe application message data
[in]lenNumber of octets in the application message data. 0 is permitted
[in]destThe destination node address
[in]sourceThe (fake) originatong node address.
Returns:
The result code:
  • RF22_ROUTER_ERROR_NONE Message was routed and deliverd to the next hop (not necessarily to the final dest address)
  • RF22_ROUTER_ERROR_NO_ROUTE There was no route for dest in the local routing table
  • RF22_ROUTER_ERROR_UNABLE_TO_DELIVER Noyt able to deliver to the next hop (usually because it dod not acknowledge due to being off the air or out of range

Definition at line 165 of file RF22Router.cpp.

uint8_t sendtoWait ( uint8_t *  buf,
uint8_t  len,
uint8_t  dest 
)

Sends a message to the destination node.

Initialises the RF22Router message header (the SOURCE address is set to the address of this node, HOPS to 0) and calls route() which looks up in the routing table the next hop to deliver to. If no route is known, initiates route discovery and waits for a reply. Then sends the message to the next hop Then waits for an acknowledgement from the next hop (but not from the destination node (if that is different).

Parameters:
[in]bufThe application message data
[in]lenNumber of octets in the application message data. 0 is permitted
[in]destThe destination node address
Returns:
The result code:
  • RF22_ROUTER_ERROR_NONE Message was routed and deliverd to the next hop (not necessarily to the final dest address)
  • RF22_ROUTER_ERROR_NO_ROUTE There was no route for dest in the local routing table
  • RF22_ROUTER_ERROR_UNABLE_TO_DELIVER Noyt able to deliver to the next hop (usually because it dod not acknowledge due to being off the air or out of range

Reimplemented from RF22Router.

Definition at line 35 of file RF22Mesh.cpp.

boolean setFHChannel ( uint8_t  fhch ) [inherited]

Sets the frequncy hopping channel.

Adds fhch * fhs to centre frequency

Parameters:
[in]fhchThe channel number
Returns:
true if the selected frquency centre + (fhch * fhs) is within range

Definition at line 497 of file RF22.cpp.

boolean setFHStepSize ( uint8_t  fhs ) [inherited]

Sets the frequency hopping step size.

Parameters:
[in]fhsFrequency Hopping step size in 10kHz increments
Returns:
true if centre + (fhch * fhs) is within limits

Definition at line 489 of file RF22.cpp.

boolean setFrequency ( float  centre,
float  afcPullInRange = 0.05 
) [inherited]

Sets the transmitter and receiver centre frequency.

Parameters:
[in]centreFrequency in MHz. 240.0 to 960.0. Caution, some versions of RF22 and derivatives implemented more restricted frequency ranges.
[in]afcPullInRangeSets the AF Pull In Range in MHz. Defaults to 0.05MHz (50kHz). Range is 0.0 to 0.159375 for frequencies 240.0 to 480MHz, and 0.0 to 0.318750MHz for frequencies 480.0 to 960MHz,
Returns:
true if the selected frquency centre + (fhch * fhs) is within range and the afcPullInRange is within range

Definition at line 454 of file RF22.cpp.

void setHeaderFlags ( uint8_t  flags ) [protected, inherited]

Sets the FLAGS header to be sent in all subsequent messages.

Parameters:
[in]flagsThe new FLAGS header value

Definition at line 801 of file RF22.cpp.

void setHeaderFrom ( uint8_t  from ) [protected, inherited]

Sets the FROM header to be sent in all subsequent messages.

Parameters:
[in]fromThe new FROM header value

Definition at line 791 of file RF22.cpp.

void setHeaderId ( uint8_t  id ) [protected, inherited]

Sets the ID header to be sent in all subsequent messages.

Parameters:
[in]idThe new ID header value

Definition at line 796 of file RF22.cpp.

void setHeaderTo ( uint8_t  to ) [protected, inherited]

Sets the TO header to be sent in all subsequent messages.

Parameters:
[in]toThe new TO header value

Definition at line 786 of file RF22.cpp.

void setMaxHops ( uint8_t  max_hops ) [inherited]

Sets the max_hops to the given value This controls the maximum number of hops allowed between source and destination nodes Messages that are not delivered by the time their HOPS field exceeds max_hops on a routing node will be dropped and ignored.

Parameters:
[in]max_hopsThe new value for max_hops

Definition at line 42 of file RF22Router.cpp.

void setMode ( uint8_t  mode ) [inherited]

Sets the parameters for the RF22 Idle mode in register RF22_REG_07_OPERATING_MODE.

Idle mode is the mode the RF22 will be in when not transmitting or receiving. The default idle mode is RF22_XTON ie READY mode.

Parameters:
[in]modeMask of mode bits, using RF22_SWRES, RF22_ENLBD, RF22_ENWT, RF22_X32KSEL, RF22_PLLON, RF22_XTON.

Definition at line 513 of file RF22.cpp.

void setModeIdle (  ) [inherited]

If current mode is Rx or Tx changes it to Idle.

If the transmitter or receiver is running, disables them.

Definition at line 518 of file RF22.cpp.

boolean setModemConfig ( ModemConfigChoice  index ) [inherited]

Select one of the predefined modem configurations.

If you need a modem configuration not provided here, use setModemRegisters() with your own ModemConfig.

Parameters:
[in]indexThe configuration choice.
Returns:
true if index is a valid choice.

Definition at line 571 of file RF22.cpp.

void setModemRegisters ( const ModemConfig config ) [inherited]

Sets all the registered required to configure the data modem in the RF22, including the data rate, bandwidths etc.

You cas use this to configure the modem with custom configuraitons if none of the canned configurations in ModemConfigChoice suit you.

Parameters:
[in]configA ModemConfig structure containing values for the modem configuration registers.

Definition at line 558 of file RF22.cpp.

void setModeRx (  ) [inherited]

If current mode is Tx or Idle, changes it to Rx.

Starts the receiver in the RF22.

Definition at line 526 of file RF22.cpp.

void setModeTx (  ) [inherited]

If current mode is Rx or Idle, changes it to Rx.

Starts the transmitter in the RF22.

Definition at line 534 of file RF22.cpp.

void setPreambleLength ( uint8_t  nibbles ) [inherited]

Sets the length of the preamble in 4-bit nibbles.

Caution: this should be set to the same value on all nodes in your network. Default is 8. Sets the message preamble length in RF22_REG_34_PREAMBLE_LENGTH

Parameters:
[in]nibblesPreamble length in nibbles of 4 bits each.

Definition at line 584 of file RF22.cpp.

void setPromiscuous ( boolean  promiscuous ) [inherited]

Tells the receiver to accept messages with any TO address, not just messages addressed to this node or the broadcast address.

Parameters:
[in]promiscuoustrue if you wish to receive messages with any TO address

Definition at line 831 of file RF22.cpp.

void setRetries ( uint8_t  retries ) [inherited]

Sets the max number of retries.

Defaults to 3. If set to 0, the message will only be sent once. sendtoWait will give up and return false if there is no ack received after all transmissions time out. param[in] retries The maximum number a retries.

Definition at line 37 of file RF22ReliableDatagram.cpp.

void setSyncWords ( const uint8_t *  syncWords,
uint8_t  len 
) [inherited]

Sets the sync words for transmit and receive in registers RF22_REG_36_SYNC_WORD3 to RF22_REG_39_SYNC_WORD0 Caution: this should be set to the same value on all nodes in your network.

Default is { 0x2d, 0xd4 }

Parameters:
[in]syncWordsArray of sync words
[in]lenNumber of sync words to set

Definition at line 590 of file RF22.cpp.

void setThisAddress ( uint8_t  thisAddress ) [inherited]

Sets the address of this node.

Defaults to 0. This will be used to set the FROM address of all messages sent by this node. If all the nodes leave the address unset (ie 0), In a conventional multinode system, all nodes will have a unique address (which you could store in EEPROM).

Parameters:
[in]thisAddressThe address of this node

Definition at line 26 of file RF22Datagram.cpp.

void setTimeout ( uint16_t  timeout ) [inherited]

Sets the minimum retransmit timeout.

If sendtoWait is waiting for an ack longer than this time (in milliseconds), it will retransmit the message. Defaults to 200ms. The timeout is measured from the end of transmission of the message. It must be at least longer than the the transmit time of the acknowledgement (preamble+6 octets) plus the latency/poll time of the receiver. For fast modulation schemes you can considerably shorten this time. The actual timeout is randomly varied between timeout and timeout*2.

Parameters:
[in]timeoutThe new timeout period in milliseconds

Definition at line 31 of file RF22ReliableDatagram.cpp.

void setTxPower ( uint8_t  power ) [inherited]

Sets the transmitter power output level in register RF22_REG_6D_TX_POWER.

Be a good neighbour and set the lowest power level you need. After init(), the power wil be set to RF22_TXPOW_8DBM. Caution: In some countries you may only select RF22_TXPOW_17DBM if you are also using frequency hopping.

Parameters:
[in]powerTransmitter power level, one of RF22_TXPOW_*

Definition at line 552 of file RF22.cpp.

void setWutPeriod ( uint16_t  wtm,
uint8_t  wtr = 0,
uint8_t  wtd = 0 
) [inherited]

Sets the wakeup timer period registers RF22_REG_14_WAKEUP_TIMER_PERIOD1, RF22_REG_15_WAKEUP_TIMER_PERIOD2 and RF22_R<EG_16_WAKEUP_TIMER_PERIOD3.

Parameters:
[in]wtmWakeup timer mantissa value
[in]wtrWakeup timer exponent R value
[in]wtdWakeup timer exponent D value

Definition at line 441 of file RF22.cpp.

void spiBurstRead ( uint8_t  reg,
uint8_t *  dest,
uint8_t  len 
) [inherited]

Reads a number of consecutive registers from the RF22 using burst read mode.

Parameters:
[in]regRegister number of the first register, one of RF22_REG_*
[in]destArray to write the register values to. Must be at least len bytes
[in]lenNumber of bytes to read

Definition at line 382 of file RF22.cpp.

void spiBurstWrite ( uint8_t  reg,
const uint8_t *  src,
uint8_t  len 
) [inherited]

Write a number of consecutive registers using burst write mode.

Parameters:
[in]regRegister number of the first register, one of RF22_REG_*
[in]srcArray of new register values to write. Must be at least len bytes
[in]lenNumber of bytes to write

Definition at line 393 of file RF22.cpp.

uint8_t spiRead ( uint8_t  reg ) [inherited]

Reads a single register from the RF22.

Parameters:
[in]regRegister number, one of RF22_REG_*
Returns:
The value of the register

Definition at line 356 of file RF22.cpp.

void spiWrite ( uint8_t  reg,
uint8_t  val 
) [inherited]

Writes a single byte to the RF22.

Parameters:
[in]regRegister number, one of RF22_REG_*
[in]valThe value to write

Definition at line 370 of file RF22.cpp.

void startTransmit (  ) [protected, inherited]

Start the transmission of the contents of the Tx buffer.

Definition at line 679 of file RF22.cpp.

uint8_t statusRead (  ) [inherited]

Reads and returns the device status register RF22_REG_02_DEVICE_STATUS.

Returns:
The value of the device status register

Definition at line 404 of file RF22.cpp.

uint8_t temperatureRead ( uint8_t  tsrange = RF22_TSRANGE_M64_64C,
uint8_t  tvoffs = 0 
) [inherited]

Reads the on-chip temperature sensoer.

Parameters:
[in]tsrangeSpecifies the temperature range to use. One of RF22_TSRANGE_*
[in]tvoffsSpecifies the temperature value offset. This is actually signed value added to the measured temperature value
Returns:
The measured temperature.

Definition at line 426 of file RF22.cpp.

void waitAvailable (  ) [inherited]

Starts the receiver and blocks until a valid received message is available.

Definition at line 611 of file RF22.cpp.

bool waitAvailableTimeout ( uint16_t  timeout ) [inherited]

Starts the receiver and blocks until a received message is available or a timeout.

Parameters:
[in]timeoutMaximum time to wait in milliseconds.
Returns:
true if a message is available

Definition at line 619 of file RF22.cpp.

void waitPacketSent (  ) [inherited]

Blocks until the RF22 is not in mode RF22_MODE_TX (ie until the RF22 is not transmitting).

This effectively waits until any previous transmit packet is finished being transmitted.

Definition at line 630 of file RF22.cpp.

uint16_t wutRead (  ) [inherited]

Reads the wakeup timer value in registers RF22_REG_17_WAKEUP_TIMER_VALUE1 and RF22_REG_18_WAKEUP_TIMER_VALUE2.

Returns:
The wakeup timer value

Definition at line 433 of file RF22.cpp.


Field Documentation

uint8_t _lastE2ESequenceNumber [protected, inherited]

The last end-to-end sequence number to be used Defaults to 0.

Definition at line 308 of file RF22Router.h.

uint8_t _max_hops [protected, inherited]

The maximum number of hops permitted in routed messages.

If a routed message would exceed this number of hops it is dropped and ignored.

Definition at line 312 of file RF22Router.h.

uint8_t _thisAddress [protected, inherited]

The address of this node. Defaults to 0.

Definition at line 73 of file RF22Datagram.h.