Instrument Neutral Distributed Interface INDI 2.2.5
Public Member Functions | List of all members
MXHDSerial Class Reference

#include <mxhd_serial.h>

Public Member Functions

 MXHDSerial (int fd)
 
bool discardInput (std::string &err)
 
bool writeRaw (const void *data, size_t len, std::string &err)
 
bool writeString (const std::string &s, std::string &err)
 
bool readHashTerminated (std::string &out, int timeoutMs, std::string &err)
 
bool readExact (std::vector< uint8_t > &out, size_t n, int timeoutMs, std::string &err)
 
bool readChar (char &ch, int timeoutMs, std::string &err)
 
bool queryHash (const std::string &cmd, std::string &response, int timeoutMs, std::string &err)
 
bool queryAck (const std::string &cmd, char &ack, int timeoutMs, std::string &err)
 
bool queryStatus3 (const std::string &cmd, uint8_t &b1, uint8_t &b2, uint8_t &b3, int timeoutMs, std::string &err)
 

Detailed Description

Definition at line 27 of file mxhd_serial.h.

Constructor & Destructor Documentation

◆ MXHDSerial()

MXHDSerial::MXHDSerial ( int  fd)
explicit

Definition at line 27 of file mxhd_serial.cpp.

Member Function Documentation

◆ discardInput()

bool MXHDSerial::discardInput ( std::string &  err)

Definition at line 45 of file mxhd_serial.cpp.

◆ queryAck()

bool MXHDSerial::queryAck ( const std::string &  cmd,
char &  ack,
int  timeoutMs,
std::string &  err 
)

Definition at line 166 of file mxhd_serial.cpp.

◆ queryHash()

bool MXHDSerial::queryHash ( const std::string &  cmd,
std::string &  response,
int  timeoutMs,
std::string &  err 
)

Definition at line 156 of file mxhd_serial.cpp.

◆ queryStatus3()

bool MXHDSerial::queryStatus3 ( const std::string &  cmd,
uint8_t &  b1,
uint8_t &  b2,
uint8_t &  b3,
int  timeoutMs,
std::string &  err 
)

Definition at line 177 of file mxhd_serial.cpp.

◆ readChar()

bool MXHDSerial::readChar ( char &  ch,
int  timeoutMs,
std::string &  err 
)

Definition at line 121 of file mxhd_serial.cpp.

◆ readExact()

bool MXHDSerial::readExact ( std::vector< uint8_t > &  out,
size_t  n,
int  timeoutMs,
std::string &  err 
)

Definition at line 94 of file mxhd_serial.cpp.

◆ readHashTerminated()

bool MXHDSerial::readHashTerminated ( std::string &  out,
int  timeoutMs,
std::string &  err 
)

Definition at line 132 of file mxhd_serial.cpp.

◆ writeRaw()

bool MXHDSerial::writeRaw ( const void *  data,
size_t  len,
std::string &  err 
)

Definition at line 55 of file mxhd_serial.cpp.

◆ writeString()

bool MXHDSerial::writeString ( const std::string &  s,
std::string &  err 
)

Definition at line 75 of file mxhd_serial.cpp.


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