1 #ifndef GBXSERIALDEVICEACFR_PRINTUTIL_H
2 #define GBXSERIALDEVICEACFR_PRINTUTIL_H
7 namespace gbxserialdeviceacfr {
14 std::string toHexString( const char *buf, int bufLen );
15 inline std::string toHexString( const std::vector<char> &buf )
16 { return toHexString( &(buf[0]), buf.size() );}
17 inline std::string toHexString( const std::string &buf )
18 { return toHexString( &(buf[0]), buf.size() );}
21 std::string toAsciiString( const char *buf, int bufLen );
22 inline std::string toAsciiString( const std::vector<char> &buf )
23 { return toAsciiString( &(buf[0]), buf.size() );}
virtual bool IsOpen() const =0 Check if the port is open.
FlexiPort data communications library.
virtual void Open()=0 Open the port.
virtual ssize_t BytesAvailableWait()=0 Get the number of bytes waiting after blocking for the timeout.
Exception thrown by the Port class and its derivatives. Definition: flexiport.h:54
virtual ssize_t WriteFull(const void *const buffer, size_t count) Write all the data to the port. Definition: port.cpp:294
virtual ssize_t Read(void *const buffer, size_t count)=0 Read from the port.
Base Port class. Definition: port.h:79
|