MotorControlModuleSDFM_TMS3.../Projects/EFC_Application/UMLibrary/communication/hiperface/HipReset.hh

47 lines
1.0 KiB
C++

/*
* HipReset.h
*
* Created on: 21 ôåâð. 2020 ã.
* Author: user
*/
#ifndef UMLIBRARY_COMMUNICATION_HIPERFACE_HIPRESET_H_
#define UMLIBRARY_COMMUNICATION_HIPERFACE_HIPRESET_H_
#include "../../math/math_inc.hh"
#include "../../driver/HiperfaceNetworkDriver.hh"
namespace communication {
namespace hiperface {
class HipReset {
private:
driver::HiperfaceNetworkDriver & hip_driver;
struct Reset {
driver::MessageControl message_control = {
.address = 0,
.code = 0x53,
.send_data_size = 0,
.send_data = nullptr,
.rec_data_size = 0,
.rec_data = nullptr,
.timeout_ms = 100,
.ans_ready_flag = false,
.result = driver::OK
};
} request;
public:
bool sendRequest() { return hip_driver.send( &request.message_control ); }
HipReset( driver::HiperfaceNetworkDriver & hip_driver, unsigned short address );
};
} /* namespace hiperface */
} /* namespace communication */
#endif /* UMLIBRARY_COMMUNICATION_HIPERFACE_HIPRESET_H_ */