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 &, const AbstractInterface &)
 

Detailed Description

Definition at line 49 of file AbstractInterface.h.

Constructor & Destructor Documentation

◆ AbstractInterface()

Definition at line 35 of file AbstractInterface.cpp.

◆ ~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 74 of file AbstractInterface.cpp.

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

◆ IsConnected()

bool IsConnected ( ) const
inline

Definition at line 59 of file AbstractInterface.h.

◆ logText()

void logText ( std::string  message)

Definition at line 99 of file AbstractInterface.cpp.

+ Here is the call graph for this function:
+ 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 45 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 126 of file AbstractInterface.cpp.

+ Here is the call graph for this function:

◆ receive() [2/2]

int receive ( msg_t msg)

Definition at line 169 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 107 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 275 of file AbstractInterface.cpp.

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

◆ startLogging()

void startLogging ( std::string  file)

Definition at line 94 of file AbstractInterface.cpp.

◆ submitCmd()

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

Definition at line 68 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 57 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 caller graph for this function:

Friends And Related Function Documentation

◆ operator<<

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

Definition at line 326 of file AbstractInterface.cpp.

Member Data Documentation

◆ connected

bool connected
protected

Definition at line 77 of file AbstractInterface.h.


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