INTRODUCTION Overview Download and Install Documentation Publications REPOSITORY Libraries DEVELOPER Dev Guide Dashboard PEOPLE Contributors Users Project Download Mailing lists
|
port.h 11 * This work is a product of the National Institute of Advanced Industrial Science and Technology,
16 * flexiport is free software: you can redistribute it and/or modify it under the terms of the GNU
virtual ssize_t WriteString(const char *const buffer) Write a string to the port. Definition: port.cpp:331 virtual void Flush()=0 Flush the port's input and output buffers, discarding all data. virtual ssize_t ReadLine(char *const buffer, size_t count) Read a new-line terminated string of data. Definition: port.cpp:201 virtual ssize_t SkipUntil(uint8_t terminator, unsigned int count) Read and dump data until the specified termination character has been seen count times. Definition: port.cpp:245 FlexiPort data communications library. virtual ssize_t Skip(size_t count) Dump data until the specified number of bytes have been read. Definition: port.cpp:209 virtual bool CanWrite() const Get the write permissions of the port. Definition: port.h:291 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:55 virtual ssize_t WriteFull(const void *const buffer, size_t count) Write all the data to the port. Definition: port.cpp:294 virtual void SetCanRead(bool canRead)=0 Set the read permissions of the port. virtual bool IsBlocking() const Get the blocking property of the port. If the timeout is non-zero, the port will block. Definition: port.h:282 virtual void SetTimeout(Timeout timeout)=0 Set the timeout value. Set seconds to -1 to disable timeouts and block forever. virtual ssize_t ReadStringUntil(std::string &buffer, char terminator) Read a string until the specified termination character is received. Definition: port.cpp:160 virtual ssize_t ReadString(std::string &buffer) Read a string. Definition: port.cpp:72 virtual ssize_t BytesAvailable()=0 Get the number of bytes waiting to be read at the port. Returns immediatly. virtual ssize_t ReadUntil(void *const buffer, size_t count, uint8_t terminator) Read data until a specified termination byte is received. Definition: port.cpp:115 virtual ssize_t ReadFull(void *const buffer, size_t count)=0 Read the requested quantity of data from the port. virtual void SetCanWrite(bool canWrite)=0 Set the write permissions of the port. virtual ssize_t Write(const void *const buffer, size_t count)=0 Write data to the port. virtual std::string GetStatus() const Get the status of the port (type, device, etc). Definition: port.cpp:352 virtual bool CanRead() const Get the read permissions of the port. Definition: port.h:287 virtual ssize_t ReadLine(std::string &buffer) Read a new-line terminated string of data. Definition: port.h:195 |