|
|
@ -18,7 +18,6 @@ class ZModuleDeviceManager { |
|
|
|
* ZIModule * |
|
|
|
*******************************************************************************/ |
|
|
|
|
|
|
|
|
|
|
|
#if 0
|
|
|
|
virtual ~ZIModule() {} |
|
|
|
|
|
|
@ -58,32 +57,32 @@ class ZModuleDeviceManager { |
|
|
|
virtual int32_t module_set_state(int32_t state_id, int32_t state_value) { return err::koperation_not_support; } |
|
|
|
virtual int32_t module_get_state(int32_t state_id, int32_t *state_value) { return err::koperation_not_support; } |
|
|
|
#endif
|
|
|
|
int32_t module_stop(uint16_t id); |
|
|
|
int32_t module_break(uint16_t id); |
|
|
|
virtual int32_t module_stop(uint16_t id); |
|
|
|
virtual int32_t module_break(uint16_t id); |
|
|
|
|
|
|
|
int32_t module_get_last_exec_status(uint16_t id, int32_t *status); |
|
|
|
int32_t module_get_status(uint16_t id, int32_t *status); |
|
|
|
virtual int32_t module_get_last_exec_status(uint16_t id, int32_t *status); |
|
|
|
virtual int32_t module_get_status(uint16_t id, int32_t *status); |
|
|
|
|
|
|
|
int32_t module_set_param(uint16_t id, int32_t param_id, int32_t param_value); |
|
|
|
int32_t module_get_param(uint16_t id, int32_t param_id, int32_t *param_value); |
|
|
|
virtual int32_t module_set_param(uint16_t id, int32_t param_id, int32_t param_value); |
|
|
|
virtual int32_t module_get_param(uint16_t id, int32_t param_id, int32_t *param_value); |
|
|
|
|
|
|
|
int32_t module_readio(uint16_t id, int32_t *io); |
|
|
|
int32_t module_writeio(uint16_t id, int32_t io); |
|
|
|
virtual int32_t module_readio(uint16_t id, int32_t *io); |
|
|
|
virtual int32_t module_writeio(uint16_t id, int32_t io); |
|
|
|
|
|
|
|
int32_t module_read_adc(uint16_t id, int32_t adcindex, int32_t *adc); |
|
|
|
virtual int32_t module_read_adc(uint16_t id, int32_t adcindex, int32_t *adc); |
|
|
|
|
|
|
|
int32_t module_get_error(uint16_t id, int32_t *iserror); |
|
|
|
int32_t module_clear_error(uint16_t id); |
|
|
|
virtual int32_t module_get_error(uint16_t id, int32_t *iserror); |
|
|
|
virtual int32_t module_clear_error(uint16_t id); |
|
|
|
|
|
|
|
int32_t module_set_inited_flag(uint16_t id, int32_t flag); |
|
|
|
int32_t module_get_inited_flag(uint16_t id, int32_t *flag); |
|
|
|
virtual int32_t module_set_inited_flag(uint16_t id, int32_t flag); |
|
|
|
virtual int32_t module_get_inited_flag(uint16_t id, int32_t *flag); |
|
|
|
|
|
|
|
int32_t module_factory_reset(uint16_t id); |
|
|
|
int32_t module_flush_cfg(uint16_t id); |
|
|
|
int32_t module_active_cfg(uint16_t id); |
|
|
|
virtual int32_t module_factory_reset(uint16_t id); |
|
|
|
virtual int32_t module_flush_cfg(uint16_t id); |
|
|
|
virtual int32_t module_active_cfg(uint16_t id); |
|
|
|
|
|
|
|
int32_t module_set_state(uint16_t id, int32_t state_id, int32_t state_value); |
|
|
|
int32_t module_get_state(uint16_t id, int32_t state_id, int32_t *state_value); |
|
|
|
virtual int32_t module_set_state(uint16_t id, int32_t state_id, int32_t state_value); |
|
|
|
virtual int32_t module_get_state(uint16_t id, int32_t state_id, int32_t *state_value); |
|
|
|
|
|
|
|
/*******************************************************************************
|
|
|
|
* ZIMotor * |
|
|
@ -94,20 +93,20 @@ class ZModuleDeviceManager { |
|
|
|
virtual int32_t motor_move_to_zero_backward_and_calculated_shift(int32_t findzerospeed, int32_t findzeroedge_speed, int32_t acc, int32_t overtime) override; |
|
|
|
#endif
|
|
|
|
|
|
|
|
int32_t motor_enable(uint16_t id, int32_t enable); |
|
|
|
int32_t motor_rotate(uint16_t id, int32_t direction, int32_t motor_velocity, int32_t acc); |
|
|
|
int32_t motor_move_by(uint16_t id, int32_t distance, int32_t motor_velocity, int32_t acc); |
|
|
|
int32_t motor_move_to(uint16_t id, int32_t position, int32_t motor_velocity, int32_t acc); |
|
|
|
int32_t motor_rotate_acctime(uint16_t id, int32_t direction, int32_t motor_velocity, int32_t acctime); |
|
|
|
int32_t motor_move_by_acctime(uint16_t id, int32_t distance, int32_t motor_velocity, int32_t acctime); |
|
|
|
int32_t motor_move_to_acctime(uint16_t id, int32_t position, int32_t motor_velocity, int32_t acctime); |
|
|
|
int32_t motor_move_to_zero_forward(uint16_t id, int32_t findzerospeed, int32_t findzeroedge_speed, int32_t acc, int32_t overtime); |
|
|
|
int32_t motor_move_to_zero_backward(uint16_t id, int32_t findzerospeed, int32_t findzeroedge_speed, int32_t acc, int32_t overtime); |
|
|
|
int32_t motor_move_to_with_torque(uint16_t id, int32_t direction, int32_t torque); |
|
|
|
int32_t motor_read_pos(uint16_t id, int32_t *pos); |
|
|
|
int32_t motor_set_current_pos_by_change_shift(uint16_t id, int32_t pos); |
|
|
|
int32_t motor_move_to_zero_forward_and_calculated_shift(uint16_t id, int32_t findzerospeed, int32_t findzeroedge_speed, int32_t acc, int32_t overtime); |
|
|
|
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_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); |
|
|
|
virtual int32_t motor_move_by(uint16_t id, int32_t distance, int32_t motor_velocity, int32_t acc); |
|
|
|
virtual int32_t motor_move_to(uint16_t id, int32_t position, int32_t motor_velocity, int32_t acc); |
|
|
|
virtual int32_t motor_rotate_acctime(uint16_t id, int32_t direction, int32_t motor_velocity, int32_t acctime); |
|
|
|
virtual int32_t motor_move_by_acctime(uint16_t id, int32_t distance, int32_t motor_velocity, int32_t acctime); |
|
|
|
virtual int32_t motor_move_to_acctime(uint16_t id, int32_t position, int32_t motor_velocity, int32_t acctime); |
|
|
|
virtual int32_t motor_move_to_zero_forward(uint16_t id, int32_t findzerospeed, int32_t findzeroedge_speed, int32_t acc, int32_t overtime); |
|
|
|
virtual int32_t motor_move_to_zero_backward(uint16_t id, int32_t findzerospeed, int32_t findzeroedge_speed, int32_t acc, int32_t overtime); |
|
|
|
virtual int32_t motor_move_to_with_torque(uint16_t id, int32_t direction, int32_t torque); |
|
|
|
virtual int32_t motor_read_pos(uint16_t id, int32_t *pos); |
|
|
|
virtual int32_t motor_set_current_pos_by_change_shift(uint16_t id, int32_t pos); |
|
|
|
virtual int32_t motor_move_to_zero_forward_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_zero_backward_and_calculated_shift(uint16_t id, int32_t findzerospeed, int32_t findzeroedge_speed, int32_t acc, int32_t overtime); |
|
|
|
|
|
|
|
/*******************************************************************************
|
|
|
|
* ZIXYMotor * |
|
|
@ -122,14 +121,15 @@ class ZModuleDeviceManager { |
|
|
|
virtual int32_t xymotor_read_pos(int32_t *x, int32_t *y) { return err::koperation_not_support; } |
|
|
|
virtual int32_t xymotor_calculated_pos_by_move_to_zero() { return err::koperation_not_support; } |
|
|
|
#endif
|
|
|
|
int32_t xymotor_enable(uint16_t id, int32_t enable); |
|
|
|
int32_t xymotor_move_by(uint16_t id, int32_t dx, int32_t dy, int32_t motor_velocity); |
|
|
|
int32_t xymotor_move_to(uint16_t id, int32_t x, int32_t y, int32_t motor_velocity); |
|
|
|
int32_t xymotor_move_to_zero(uint16_t id); |
|
|
|
int32_t xymotor_move_to_zero_and_calculated_shift(uint16_t id); |
|
|
|
int32_t xymotor_read_pos(uint16_t id, int32_t *x, int32_t *y); |
|
|
|
int32_t xymotor_calculated_pos_by_move_to_zero(uint16_t id); |
|
|
|
|
|
|
|
virtual int32_t xymotor_enable(uint16_t id, int32_t enable); |
|
|
|
virtual int32_t xymotor_move_by(uint16_t id, int32_t dx, int32_t dy, int32_t motor_velocity); |
|
|
|
virtual int32_t xymotor_move_to(uint16_t id, int32_t x, int32_t y, int32_t motor_velocity); |
|
|
|
virtual int32_t xymotor_move_to_zero(uint16_t id); |
|
|
|
virtual int32_t xymotor_move_to_zero_and_calculated_shift(uint16_t id); |
|
|
|
virtual int32_t xymotor_read_pos(uint16_t id, int32_t *x, int32_t *y); |
|
|
|
virtual int32_t xymotor_calculated_pos_by_move_to_zero(uint16_t id); |
|
|
|
|
|
|
|
virtual ~ZModuleDeviceManager() {} |
|
|
|
|
|
|
|
private: |
|
|
|
template <typename T> |
|
|
|