SerialInterface Class Reference

#include <RobotAPI/drivers/WeissHapticSensor/SerialInterface.h>

+ Inheritance diagram for SerialInterface:

Public Member Functions

void close () override
 
int open () override
 
 SerialInterface (const char *device, const unsigned int bitrate)
 
std::string toString () const override
 
 ~SerialInterface () override
 
- Public Member Functions inherited from AbstractInterface
 AbstractInterface ()
 
void fireAndForgetCmd (unsigned char id, unsigned char *payload, unsigned int len, bool pending)
 
bool IsConnected () const
 
void logText (std::string message)
 
int read (unsigned char *buf, unsigned int len)
 
Response receive (bool pending, unsigned char expectedId)
 
int receive (msg_t *msg)
 
Response receiveWithoutChecks ()
 
int send (unsigned char id, unsigned int len, unsigned char *data)
 
void startLogging (std::string file)
 
Response submitCmd (unsigned char id, unsigned char *payload, unsigned int len, bool pending)
 
int write (unsigned char *buf, unsigned int len)
 
virtual ~AbstractInterface ()
 

Protected Member Functions

int readInternal (unsigned char *, unsigned int) override
 
int writeInternal (unsigned char *, unsigned int) override
 

Additional Inherited Members

- Protected Attributes inherited from AbstractInterface
bool connected
 

Detailed Description

Definition at line 30 of file SerialInterface.h.

Constructor & Destructor Documentation

◆ SerialInterface()

SerialInterface ( const char *  device,
const unsigned int  bitrate 
)

Definition at line 80 of file SerialInterface.cpp.

◆ ~SerialInterface()

~SerialInterface ( )
override

Definition at line 87 of file SerialInterface.cpp.

Member Function Documentation

◆ close()

void close ( )
overridevirtual

Implements AbstractInterface.

Definition at line 167 of file SerialInterface.cpp.

◆ open()

int open ( )
overridevirtual

Implements AbstractInterface.

Definition at line 92 of file SerialInterface.cpp.

◆ readInternal()

int readInternal ( unsigned char *  buf,
unsigned int  len 
)
overrideprotectedvirtual

Implements AbstractInterface.

Definition at line 177 of file SerialInterface.cpp.

◆ toString()

std::string toString ( ) const
overridevirtual

Implements AbstractInterface.

Definition at line 228 of file SerialInterface.cpp.

+ Here is the call graph for this function:

◆ writeInternal()

int writeInternal ( unsigned char *  buf,
unsigned int  len 
)
overrideprotectedvirtual

Implements AbstractInterface.

Definition at line 222 of file SerialInterface.cpp.

+ Here is the call graph for this function:

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