API
MagAOX::tty::netSerial Struct Reference

Manage a connectio to a serial device over a network. More...

#include <netSerial.hpp>

Collaboration diagram for MagAOX::tty::netSerial:
Collaboration graph

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}
 

Detailed Description

Manage a connectio to a serial device over a network.

Todo:

document this, including methods

add errors to ttyErrors

Definition at line 30 of file netSerial.hpp.

Member Function Documentation

◆ getSocketFD()

int MagAOX::tty::netSerial::getSocketFD ( void  )

Definition at line 255 of file netSerial.cpp.

◆ serialClose()

int MagAOX::tty::netSerial::serialClose ( void  )

Definition at line 63 of file netSerial.cpp.

Referenced by serialInit().

◆ serialIn()

int MagAOX::tty::netSerial::serialIn ( char *  buf,
int  len,
int  timeout 
)

Definition at line 94 of file netSerial.cpp.

◆ serialInit()

int MagAOX::tty::netSerial::serialInit ( const char *  address,
int  port 
)

Definition at line 34 of file netSerial.cpp.

Referenced by MagAOX::app::tcsInterface::appLogic().

◆ serialInString()

int MagAOX::tty::netSerial::serialInString ( char *  buf,
int  len,
int  timeout,
char  terminator 
)

◆ serialInString2()

int MagAOX::tty::netSerial::serialInString2 ( char *  buf,
int  len,
int  timeout,
char *  terminator 
)

◆ serialOut()

int MagAOX::tty::netSerial::serialOut ( const char *  buf,
int  len 
)

Member Data Documentation

◆ m_sockfd

int MagAOX::tty::netSerial::m_sockfd {-1}
protected

Definition at line 34 of file netSerial.hpp.

Referenced by getSocketFD(), serialClose(), serialIn(), serialInit(), serialInString(), and serialOut().


The documentation for this struct was generated from the following files: