38 #include <sys/ioctl.h>
41 #include <sys/types.h>
47 #include <sys/ioctl.h>
76 typedef enum {
STATUS=0,
FRONT,
RIGHT,
LEFT,
REVERSE,
BRAKE,
BLUE,
RED,
GREEN,
CROSS_A,
CROSS_B}
id_enum;
This class implements the DIOC communication protocol.
char * device
Communication device to use.
int ret
Auxiliary return code.
class_dioc(const char *pdevice)
Constructor.
int SetStatus(id_enum ID, status_enum ENUM)
Set the status of a input/output.
bool active
This variable indicates that the communication is active.
int GetStatus(id_enum ID)
Get the status of a input/output.
int port
Communication port to use.
int CommStatus(void)
Get the comm status.
~class_dioc()
De-constructor.
void CleanBuffer(void)
Cleans the buffer.
void perr(int ret)
Print error function.