z1_controller/include/interface/IOUDP.h

29 lines
640 B
C
Raw Normal View History

2022-07-20 11:11:38 +08:00
#ifndef IOUDP_H
#define IOUDP_H
#include "interface/IOInterface.h"
#include "/usr/include/x86_64-linux-gnu/bits/floatn-common.h"
class IOUDP : public IOInterface{
public:
2022-09-13 19:53:15 +08:00
IOUDP(CmdPanel *cmdPanel, const char* IP, bool hasGripper);
2022-07-20 11:11:38 +08:00
~IOUDP();
bool sendRecv(const LowlevelCmd *cmd, LowlevelState *state);
// void setGripper(int position, int force);
// void getGripper(int &position, int &force);
bool calibration();
private:
IOPort *_ioPort;
UDPSendCmd _cmd;
UDPRecvState _state;
size_t _motorNum;
size_t _jointNum;
2022-09-13 19:53:15 +08:00
uint8_t _singleState;
uint8_t _selfCheck[10];
2022-07-20 11:11:38 +08:00
};
#endif // IOUDP_H