WaspXBeeZBmust be created. This object, called
xbeeZB, is created inside Waspmote XBee library and it is public to all libraries. It is used through the guide to show how the Waspmote XBee library works.
xbeeZB.sourceMacHigh[0-3]→ stores the 32 upper bits of MAC address
xbeeZB.sourceMacLow [0-3]→ stores the 32 lower bits of MAC address
xbeeZB.getOwnMacLowthe related variable
xbeeZB.sourceMacLowwill be filled with the appropriate values. Before calling the function, the related variable is created but it is empty. Almost every function has a related variable, and it will be indicated when the function was explained.
xbeeZB.commandAT[0-99]→ stores the response given by the module up to 100 Bytes
MAX_DATA: (default value is 300) it defines the maximum available data size for a packet. This constant must be equal or bigger than the data is sent on each packet. This size shouldn't be bigger than 1500.
MAX_PARSE: (default value is 300) it defines the maximum data that is parsed in each call to
treatData(). If more data are received, they will be stored in the UART buffer until the next call to
treatData(). However, if the UART buffer is full, the following data will be written on the buffer, so be careful with this matter.
MAX_BROTHERS: (default value is 5) it defines the maximum number of brothers that can be stored.