|
|
@ -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); |
|
|
|