AbstractInterface Class Referenceabstract

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

+ Inheritance diagram for AbstractInterface:

Public Member Functions

 AbstractInterface ()
 
virtual void close ()=0
 
void fireAndForgetCmd (unsigned char id, unsigned char *payload, unsigned int len, bool pending)
 
bool IsConnected () const
 
void logText (std::string message)
 
virtual int open ()=0
 
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)
 
virtual std::string toString () const =0
 
int write (unsigned char *buf, unsigned int len)
 
virtual ~AbstractInterface ()
 

Protected Member Functions

virtual int readInternal (unsigned char *buf, unsigned int len)=0
 
virtual int writeInternal (unsigned char *buf, unsigned int len)=0
 

Protected Attributes

bool connected
 

Friends

std::ostream & operator<< (std::ostream &strm, const AbstractInterface &a)
 

Detailed Description

Definition at line 52 of file AbstractInterface.h.

Constructor & Destructor Documentation

◆ AbstractInterface()

Definition at line 37 of file AbstractInterface.cpp.

+ Here is the caller graph for this function:

◆ ~AbstractInterface()

~AbstractInterface ( )
virtual

Definition at line 41 of file AbstractInterface.cpp.

Member Function Documentation

◆ close()

virtual void close ( )
pure virtual

Implemented in SerialInterface.

+ Here is the caller graph for this function:

◆ fireAndForgetCmd()

void fireAndForgetCmd ( unsigned char id,
unsigned char * payload,
unsigned int len,
bool pending )

Definition at line 80 of file AbstractInterface.cpp.

+ Here is the caller graph for this function:

◆ IsConnected()

bool IsConnected ( ) const
inline

Definition at line 63 of file AbstractInterface.h.

◆ logText()

void logText ( std::string message)

Definition at line 110 of file AbstractInterface.cpp.

+ Here is the caller graph for this function:

◆ open()

virtual int open ( )
pure virtual

Implemented in SerialInterface.

◆ read()

int read ( unsigned char * buf,
unsigned int len )

Definition at line 46 of file AbstractInterface.cpp.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ readInternal()

virtual int readInternal ( unsigned char * buf,
unsigned int len )
protectedpure virtual

Implemented in SerialInterface.

+ Here is the caller graph for this function:

◆ receive() [1/2]

Response receive ( bool pending,
unsigned char expectedId )

Definition at line 139 of file AbstractInterface.cpp.

+ Here is the call graph for this function:

◆ receive() [2/2]

int receive ( msg_t * msg)

Definition at line 184 of file AbstractInterface.cpp.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ receiveWithoutChecks()

Response receiveWithoutChecks ( )

Definition at line 119 of file AbstractInterface.cpp.

+ Here is the call graph for this function:

◆ send()

int send ( unsigned char id,
unsigned int len,
unsigned char * data )

Definition at line 294 of file AbstractInterface.cpp.

+ Here is the call graph for this function:

◆ startLogging()

void startLogging ( std::string file)

Definition at line 104 of file AbstractInterface.cpp.

◆ submitCmd()

Response submitCmd ( unsigned char id,
unsigned char * payload,
unsigned int len,
bool pending )

Definition at line 70 of file AbstractInterface.cpp.

+ Here is the call graph for this function:

◆ toString()

virtual std::string toString ( ) const
pure virtual

Implemented in SerialInterface.

◆ write()

int write ( unsigned char * buf,
unsigned int len )

Definition at line 59 of file AbstractInterface.cpp.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ writeInternal()

virtual int writeInternal ( unsigned char * buf,
unsigned int len )
protectedpure virtual

Implemented in SerialInterface.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

Friends And Related Symbol Documentation

◆ operator<<

std::ostream & operator<< ( std::ostream & strm,
const AbstractInterface & a )
friend

Definition at line 342 of file AbstractInterface.cpp.

Member Data Documentation

◆ connected

bool connected
protected

Definition at line 81 of file AbstractInterface.h.


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