z1_controller/include/interface/IOInterface.h

29 lines
703 B
C
Raw Normal View History

2022-07-20 11:11:38 +08:00
#ifndef IOINTERFACE_H
#define IOINTERFACE_H
2022-11-11 19:49:41 +08:00
#include <string>
2022-07-20 11:11:38 +08:00
#include "message/LowlevelCmd.h"
#include "message/LowlevelState.h"
2022-11-11 19:49:41 +08:00
#include "control/keyboard.h"
#include "control/joystick.h"
2022-09-13 19:53:15 +08:00
#include "common/math/robotics.h"
2022-07-20 11:11:38 +08:00
class IOInterface{
public:
2022-11-11 19:49:41 +08:00
IOInterface(){}
~IOInterface(){
delete lowCmd;
delete lowState;
};
2022-07-20 11:11:38 +08:00
virtual bool sendRecv(const LowlevelCmd *cmd, LowlevelState *state) = 0;
2022-09-13 19:53:15 +08:00
virtual bool calibration(){return false;};
2022-11-11 19:49:41 +08:00
bool checkGripper(){return hasGripper;};
LowlevelCmd *lowCmd;
LowlevelState *lowState;
virtual bool isDisconnect(){ return false;};
bool hasErrorState;
2022-07-20 11:11:38 +08:00
protected:
2022-11-11 19:49:41 +08:00
bool hasGripper;
2022-07-20 11:11:38 +08:00
};
#endif //IOINTERFACE_H