Manage a connectio to a serial device over a network. More...
#include <netSerial.hpp>

Public Member Functions | |
| int | serialInit (const char *address, int port) |
| int | serialClose (void) |
| int | serialOut (const char *buf, int len) |
| int | serialIn (char *buf, int len, int timeout) |
| int | serialInString (char *buf, int len, int timeout, char terminator) |
| int | serialInString2 (char *buf, int len, int timeout, char *terminator) |
| int | getSocketFD (void) |
Protected Attributes | |
| int | m_sockfd {-1} |
Manage a connectio to a serial device over a network.
document this, including methods
add errors to ttyErrors
Definition at line 30 of file netSerial.hpp.
| int MagAOX::tty::netSerial::getSocketFD | ( | void | ) |
Definition at line 255 of file netSerial.cpp.
References m_sockfd.
| int MagAOX::tty::netSerial::serialClose | ( | void | ) |
Definition at line 63 of file netSerial.cpp.
References m_sockfd, and NETSERIAL_E_NOERROR.
Referenced by serialInit().
| int MagAOX::tty::netSerial::serialIn | ( | char * | buf, |
| int | len, | ||
| int | timeout | ||
| ) |
Definition at line 94 of file netSerial.cpp.
References m_sockfd.
| int MagAOX::tty::netSerial::serialInit | ( | const char * | address, |
| int | port | ||
| ) |
Definition at line 34 of file netSerial.cpp.
References m_sockfd, NETSERIAL_E_CONNECT, NETSERIAL_E_NETWORK, NETSERIAL_E_NOERROR, and serialClose().
Referenced by MagAOX::app::tcsInterface::appLogic().
| int MagAOX::tty::netSerial::serialInString | ( | char * | buf, |
| int | len, | ||
| int | timeout, | ||
| char | terminator | ||
| ) |
Definition at line 127 of file netSerial.cpp.
References m_sockfd.
Referenced by MagAOX::app::tcsInterface::getMagTelStatus(), and MagAOX::app::tcsInterface::sendMagTelCommand().
| int MagAOX::tty::netSerial::serialInString2 | ( | char * | buf, |
| int | len, | ||
| int | timeout, | ||
| char * | terminator | ||
| ) |
| int MagAOX::tty::netSerial::serialOut | ( | const char * | buf, |
| int | len | ||
| ) |
Definition at line 72 of file netSerial.cpp.
References m_sockfd, NETSERIAL_E_COMM, and NETSERIAL_E_NOERROR.
Referenced by MagAOX::app::tcsInterface::getMagTelStatus(), and MagAOX::app::tcsInterface::sendMagTelCommand().
|
protected |
Definition at line 34 of file netSerial.hpp.
Referenced by getSocketFD(), serialClose(), serialIn(), serialInit(), serialInString(), and serialOut().