4 #include "ofConstants.h"
7 #if defined( TARGET_OSX ) || defined( TARGET_LINUX )
24 void enumerateDevices();
26 std::vector <ofSerialDeviceInfo> getDeviceList();
30 bool setup(std::string portName,
int baudrate);
31 bool setup(
int deviceNumber,
int baudrate);
34 int readBytes(
unsigned char * buffer,
int length);
35 int writeBytes(
unsigned char * buffer,
int length);
36 bool writeByte(
unsigned char singleByte);
38 void flush(
bool flushIn =
true,
bool flushOut =
true);
42 bool isInitialized()
const;
44 bool setBaud(
int baud);
45 bool setBaud(
const std::string& baud_str);
48 void buildDeviceList();
50 std::string deviceType;
51 std::vector <ofSerialDeviceInfo> devices;
53 bool bHaveEnumeratedDevices;
57 std::string error_msg;
58 std::string port_name;
61 struct termios settings_orig;
62 struct termios settings;
Definition: ofSerial.h:27