|
| | Serial () |
| virtual | ~Serial () |
| int | serialOpen (const std::string &device, int baud, float stop_bits, int even, const std::string &serial_name="serial_0") |
| | 打开TCP/IP以太网通信串口
|
| int | serialClose (const std::string &serial_name="serial_0") |
| | 关闭TCP/IP串口通信 关闭与服务器的串口连接。
|
| int | serialReadByte (const std::string &variable, const std::string &serial_name="serial_0") |
| | 从串口读取指定数量的字节。字节为网络字节序。一次最多可读取30个值。
|
| int | serialReadByteList (int number, const std::string &variable, const std::string &serial_name="serial_0") |
| | 从串口读取指定数量的字节。字节为网络字节序。一次最多可读取30个值。 返回读取到的数字列表(int列表,长度=number+1)。
|
| int | serialReadString (const std::string &variable, const std::string &serial_name="serial_0", const std::string &prefix="", const std::string &suffix="", bool interpret_escape=false) |
| | 从串口读取所有数据,并将数据作为字符串返回。 字节为网络字节序。
|
| int | serialSendByte (char value, const std::string &serial_name="serial_0") |
| | 发送一个字节到服务器 通过串口发送字节 。不期望有响应。可用于发送特殊的ASCII字符;10为换行符,2为文本开始,3为文本结束。
|
| int | serialSendInt (int value, const std::string &serial_name="serial_0") |
| | 发送一个整数(int32_t)到服务器 通过串口发送整数 。以网络字节序发送。不期望有响应。
|
| int | serialSendLine (const std::string &str, const std::string &serial_name="serial_0") |
| | 发送带有换行符的字符串到服务器 以ASCII编码通过串口发送字符串<str>,并在末尾添加换行符。不期望有响应。
|
| int | serialSendString (const std::string &str, const std::string &serial_name="serial_0") |
| | 发送字符串到服务器 以ASCII编码通过串口发送字符串<str>。不期望有响应。
|
| int | serialSendAllString (bool is_check, const std::vector< char > &str, const std::string &serial_name="serial_0") |