3 #include "ofConstants.h"
6 #if defined( TARGET_OSX ) || defined( TARGET_LINUX ) || defined (TARGET_ANDROID)
15 #define MAX_SERIAL_PORTS 256
36 void enumerateDevices();
38 std::vector <ofSerialDeviceInfo> getDeviceList();
42 bool setup(std::string portName,
int baudrate);
43 bool setup(
int deviceNumber,
int baudrate);
46 int readBytes(
unsigned char * buffer,
int length);
47 int writeBytes(
unsigned char * buffer,
int length);
48 bool writeByte(
unsigned char singleByte);
50 void flush(
bool flushIn =
true,
bool flushOut =
true);
54 bool isInitialized()
const;
58 void buildDeviceList();
60 std::string deviceType;
61 std::vector <ofSerialDeviceInfo> devices;
63 bool bHaveEnumeratedDevices;
69 char ** portNamesShort;
70 char ** portNamesFriendly;
73 bool bPortsEnumerated;
74 void enumerateWin32Ports();
75 COMMTIMEOUTS oldTimeout;
79 struct termios oldoptions;
Definition: ofSerial.h:27