Может кто-нибудь предложить мне библиотеку c ++ для связи через последовательный порт, которая работает на версиях ОС x86 и x86_64? - PullRequest
1 голос
/ 12 августа 2011

Может кто-нибудь предложить мне библиотеку c ++ для связи через последовательный порт, которая работает на версиях ОС x86 и x86_64? Я использовал Java SerialIO, но он падал на версиях x86_64.

Ответы [ 3 ]

2 голосов
/ 12 августа 2011

Если вы хотите c ++, тогда QextSerialPort - ваш выбор.

1 голос
/ 12 августа 2011

Вы можете использовать интерфейс последовательного порта boost :: asio

http://www.boost.org/doc/libs/1_47_0/doc/html/boost_asio/overview/serial_ports.html

1 голос
/ 12 августа 2011

В Linux, может быть, вы попробуете "termios"

#include <termios.h>
#include <unistd.h> 

int tcgetattr(int fd, struct termios *termios_p); 

int tcsetattr(int fd, int optional_actions, const struct termios *termios_p); 

int tcsendbreak(int fd, int duration); 

int tcdrain(int fd); 

int tcflush(int fd, int queue_selector); 

int tcflow(int fd, int action); 

void cfmakeraw(struct termios *termios_p); 

speed_t cfgetispeed(const struct termios *termios_p); 

speed_t cfgetospeed(const struct termios *termios_p); 

int cfsetispeed(struct termios *termios_p, speed_t speed); 

int cfsetospeed(struct termios *termios_p, speed_t speed); 
Добро пожаловать на сайт PullRequest, где вы можете задавать вопросы и получать ответы от других членов сообщества.
...