MotorControlModuleSDFM_TMS3.../Projects/EFC_Communication/UMLibrary/communication/hiperface/HipReset.hh
2024-06-07 11:12:56 +03:00

47 lines
1.1 KiB
C++
Raw Permalink Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

/*
* 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_ */