Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Dependencies: mbed CANBuffer Watchdog MODSERIAL mbed-rtos xbeeRelay IAP
Fork of SystemManagement by
Libs/XbeeManager/XbeeManager.h
- Committer:
- pspatel321
- Date:
- 2015-02-11
- Revision:
- 39:ddf38df9699e
- Parent:
- 38:8efacce315ae
File content as of revision 39:ddf38df9699e:
#ifndef XBEE_MANAGER_H #define XBEE_MANAGER_H #include "mbed.h" #include "CAN-xbee.h" class XbeeManager { public: XbeeManager(PinName tx1, PinName rx1, PinName tx2, PinName rx2, int baud, int txSize, int rxSize); void baud(int baudrate) { x1.baud(baudrate); x2.baud(baudrate); } bool txSize(unsigned int size) { return (x1.txSize(size) && x2.txSize(size)); } bool rxSize(unsigned int size) { return (x1.rxSize(size) && x2.rxSize(size)); } bool send(CANMessage &msg); bool receive(CANMessage &msg); unsigned int counterX1in; unsigned int counterX2in; unsigned int counterX1out; unsigned int counterX2out; unsigned int bytesX1out; unsigned int bytesX2out; private: bool alternate; CANxbee x1; CANxbee x2; CANMessage extra; bool extraAvail; }; #endif