An example of how to use the Serial class
#include <iostream>
#include <cstdlib>
#include <cstdio>
using namespace std;
class MyClass :
public sigc::trackable
{
public:
{
mem_fun(*
this, &MyClass::onCharactersReceived));
{
perror(
"Open serial port failed");
}
serial->setParams(9600, Serial::PARITY_NONE, 8, 1, Serial::FLOW_NONE);
}
{
}
private:
{
cout <<
"Read " <<
count <<
" characters from serial port: "
}
};
{
}
The core class for writing asyncronous cpp applications.
A class for using asynchronous serial communications.
An application class for writing non GUI applications.
void exec(void)
Execute the application main loop.
A class for using asyncronous serial communications.
void connect(const std::string &remote_host, uint16_t remote_port)
Connect to the remote host.
A class for creating a TCP client connection.
virtual int write(const void *buf, int count)
Write data to the TCP connection.
Namespace for the asynchronous programming classes.