XBee API operation library for mbed
Embed:
(wiki syntax)
Show/hide line numbers
ISerial.h
00001 #ifndef UK_AC_HERTS_SMARTLAB_XBEE_ISerial 00002 #define UK_AC_HERTS_SMARTLAB_XBEE_ISerial 00003 00004 /// Serial data interface. 00005 class ISerial 00006 { 00007 public: 00008 /** Read one byte data from the serila port. 00009 * @returns if success return non zero [0x00-0xFF], -1 means something is wrong 00010 */ 00011 virtual int readByte() = 0; 00012 00013 /** write one byte data to the serila port. 00014 * @param data [0x00-0xFF] 00015 */ 00016 virtual void writeByte(char data) = 0; 00017 00018 /// Check if the serial port is already open. 00019 virtual bool isOpen() = 0; 00020 00021 /// Open the serila port. 00022 virtual void open() = 0; 00023 00024 /// Close the serila port. 00025 virtual void close() = 0; 00026 00027 /// Check if data is avaliable to read. 00028 virtual bool peek() = 0; 00029 }; 00030 00031 #endif
Generated on Tue Jul 12 2022 11:17:04 by 1.7.2