|
|
@ -20,12 +20,15 @@ class ZModuleDeviceManager { |
|
|
|
|
|
|
|
public: |
|
|
|
void initialize(IZcanCmderMaster *m_cancmder); |
|
|
|
void initialize(); |
|
|
|
|
|
|
|
void regCanCmder(IZcanCmderMaster *m_cancmder); |
|
|
|
void registerModule(ZIModule *module); |
|
|
|
|
|
|
|
void regOnRegValChangeEvent(regval_change_event_t on_regval_change_event) { m_on_reg_val_change_event_cbs.push_back(on_regval_change_event); } |
|
|
|
void callOnRegValChangeEvent(int32_t moduleid, int32_t regindex, int32_t oldval, int32_t toval) { |
|
|
|
for (auto &cb : m_on_reg_val_change_event_cbs) |
|
|
|
if (cb) cb(moduleid, regindex, oldval,toval); |
|
|
|
if (cb) cb(moduleid, regindex, oldval, toval); |
|
|
|
} |
|
|
|
|
|
|
|
void for_each_module(function<void(int32_t moduleid)> cb) { |
|
|
@ -138,7 +141,6 @@ class ZModuleDeviceManager { |
|
|
|
virtual int32_t motor_easy_set_current_pos(int32_t pos) { return err::koperation_not_support; }; |
|
|
|
virtual int32_t motor_easy_move_to_io(int32_t ioindex, int32_t direction) { return err::koperation_not_support; }; |
|
|
|
|
|
|
|
|
|
|
|
#endif
|
|
|
|
virtual int32_t motor_enable(uint16_t id, int32_t enable); |
|
|
|
virtual int32_t motor_rotate(uint16_t id, int32_t direction, int32_t motor_velocity, int32_t acc); |
|
|
@ -156,7 +158,7 @@ class ZModuleDeviceManager { |
|
|
|
virtual int32_t motor_move_to_zero_backward_and_calculated_shift(uint16_t id, int32_t findzerospeed, int32_t findzeroedge_speed, int32_t acc, int32_t overtime); |
|
|
|
virtual int32_t motor_move_to_torque(uint16_t id, int32_t pos, int32_t torque, int32_t overtime); |
|
|
|
virtual int32_t motor_calculated_pos_by_move_to_zero(uint16_t id); |
|
|
|
|
|
|
|
|
|
|
|
virtual int32_t motor_easy_rotate(uint16_t id, int32_t direction); |
|
|
|
virtual int32_t motor_easy_move_by(uint16_t id, int32_t distance); |
|
|
|
virtual int32_t motor_easy_move_to(uint16_t id, int32_t position); |
|
|
|