20 changed files with 4 additions and 365 deletions
-
23api/api.hpp
-
2api/apibasic/basic.hpp
-
11api/apibasic/cmdid.cpp
-
10api/apibasic/cmdid.hpp
-
1api/apibasic/packet_interface.hpp
-
1api/apibasic/protocol_constant.hpp
-
15api/apibasic/reg_index.hpp
-
25api/zi_a8000_idcard_reader.hpp
-
53api/zi_a8000_optical_module.hpp
-
20api/zi_board.hpp
-
21api/zi_code_scaner.hpp
-
14api/zi_event_bus.hpp
-
14api/zi_fan_ctrl.hpp
-
28api/zi_mini_servo.hpp
-
33api/zi_motor.hpp
-
24api/zi_plate_code_scaner_module.hpp
-
21api/zi_water_cooling_temperature_controler.hpp
-
26api/zi_xymotor.hpp
-
25i_zcanreceiver.hpp
-
2protocol.hpp
@ -1,28 +1,7 @@ |
|||
#pragma once
|
|||
#include "apibasic/basic.hpp"
|
|||
//
|
|||
|
|||
//
|
|||
#include "zi_module.hpp"
|
|||
//
|
|||
#include "zi_motor.hpp"
|
|||
//
|
|||
#include "zi_xymotor.hpp"
|
|||
//
|
|||
#include "zi_event_bus.hpp"
|
|||
//
|
|||
#include "zi_a8000_optical_module.hpp"
|
|||
//
|
|||
#include "zi_mini_servo.hpp"
|
|||
//
|
|||
#include "zi_board.hpp"
|
|||
//
|
|||
#include "zi_code_scaner.hpp"
|
|||
//
|
|||
#include "zi_fan_ctrl.hpp"
|
|||
//
|
|||
#include "zi_water_cooling_temperature_controler.hpp"
|
|||
//
|
|||
#include "zi_a8000_idcard_reader.hpp"
|
|||
//
|
|||
#include "zi_plate_code_scaner_module.hpp"
|
|||
//
|
@ -1 +0,0 @@ |
|||
#define ZCANCMD_READ_BUF_MAX_SIZE 64
|
@ -1,25 +0,0 @@ |
|||
#pragma once
|
|||
#include <stdint.h>
|
|||
|
|||
#include <functional>
|
|||
|
|||
#include "apibasic/basic.hpp"
|
|||
|
|||
namespace iflytop { |
|||
using namespace std; |
|||
class ZIA8000IDCardReaderModule { |
|||
public: |
|||
typedef enum { |
|||
kf_optical = 0, |
|||
kt_optical = 1, |
|||
ktest_optical = 2, |
|||
} optical_type_t; |
|||
|
|||
public: |
|||
virtual ~ZIA8000IDCardReaderModule(){}; |
|||
virtual int32_t a8000_idcard_reader_read_raw(int32_t index, uint8_t* data, int32_t* len) = 0; |
|||
virtual int32_t a8000_idcard_write_raw(int32_t add, uint8_t* data, int32_t len) = 0; |
|||
virtual int32_t a8000_idcard_erase() = 0; |
|||
virtual int32_t a8000_idcard_earse_unlock() = 0; |
|||
}; |
|||
} // namespace iflytop
|
@ -1,53 +0,0 @@ |
|||
#pragma once
|
|||
#include <stdint.h>
|
|||
|
|||
#include <functional>
|
|||
|
|||
#include "apibasic/basic.hpp"
|
|||
|
|||
namespace iflytop { |
|||
using namespace std; |
|||
class ZIA8000OpticalModule { |
|||
public: |
|||
typedef enum { |
|||
kf_optical = 0, |
|||
kt_optical = 1, |
|||
ktest_optical = 2, |
|||
} optical_type_t; |
|||
|
|||
public: |
|||
virtual ~ZIA8000OpticalModule(){}; |
|||
virtual int32_t a8000_optical_start_capture() { return err::kcmd_not_support; } |
|||
virtual int32_t a8000_optical_read_raw(int32_t index, uint8_t* data, int32_t* len) { return err::kcmd_not_support; } |
|||
|
|||
/*******************************************************************************
|
|||
* TEST * |
|||
*******************************************************************************/ |
|||
/**
|
|||
* @概述: |
|||
* 1. 下面方法属于单步测试采样的方法,用于调试。一般手动移动光学模组,然后利用下面方法进行测试 |
|||
* 2. 正式逻辑不使用下面逻辑 |
|||
*/ |
|||
virtual int32_t a8000_optical_module_power_ctrl(int32_t state) { return err::kcmd_not_support; } |
|||
virtual int32_t a8000_optical_open_laser(int32_t type) { return err::kcmd_not_support; } |
|||
virtual int32_t a8000_optical_close_laser(int32_t type) { return err::kcmd_not_support; } |
|||
virtual int32_t a8000_optical_set_laster_gain(int32_t type, int32_t gain) { return err::kcmd_not_support; } |
|||
virtual int32_t a8000_optical_set_scan_amp_gain(int32_t type, int32_t gain) { return err::kcmd_not_support; } |
|||
virtual int32_t a8000_optical_read_scanner_adc_val(int32_t type, int32_t* adcval) { return err::kcmd_not_support; } |
|||
virtual int32_t a8000_optical_read_laster_adc_val(int32_t type, int32_t* adcval) { return err::kcmd_not_support; } |
|||
virtual int32_t a8000_optical_scan_current_point_amp_adc_val(int32_t type, int32_t lastergain, int32_t ampgain, int32_t* laster_fb_val, int32_t* adcval) { return err::kcmd_not_support; } |
|||
|
|||
|
|||
|
|||
virtual int32_t a8k_opt_v2_t_start_scan(int32_t scanDirection, int32_t lasterGain, int32_t scanGain) { return err::kcmd_not_support; } |
|||
virtual int32_t a8k_opt_v2_f_start_scan(int32_t scanDirection, int32_t lasterGain, int32_t scanGain) { return err::kcmd_not_support; } |
|||
|
|||
virtual int32_t a8k_opt_v2_t_open_laster(int32_t lasterGain, int32_t scanGain) { return err::kcmd_not_support; } |
|||
virtual int32_t a8k_opt_v2_t_close_laster() { return err::kcmd_not_support; } |
|||
virtual int32_t a8k_opt_v2_t_readVal(int32_t* lasteradc, int32_t* scanadc) { return err::kcmd_not_support; } |
|||
|
|||
virtual int32_t a8k_opt_v2_f_open_laster(int32_t lasterGain, int32_t scanGain) { return err::kcmd_not_support; } |
|||
virtual int32_t a8k_opt_v2_f_close_laster() { return err::kcmd_not_support; } |
|||
virtual int32_t a8k_opt_v2_f_readVal(int32_t* lasteradc, int32_t* scanadc) { return err::kcmd_not_support; } |
|||
}; |
|||
} // namespace iflytop
|
@ -1,20 +0,0 @@ |
|||
#pragma once
|
|||
#include <stdint.h>
|
|||
|
|||
#include <functional>
|
|||
|
|||
#include "apibasic/basic.hpp"
|
|||
|
|||
namespace iflytop { |
|||
using namespace std; |
|||
class ZIBoard { |
|||
public: |
|||
virtual ~ZIBoard() {} |
|||
virtual int32_t extboard_read_inio(int32_t ioindex, int32_t *val) = 0; |
|||
virtual int32_t kextboard_write_outio(int32_t ioindex, int32_t val) = 0; |
|||
virtual int32_t extboard_read_muti_inio(int32_t *val) = 0; |
|||
virtual int32_t extboard_read_inio_index_in_stm32(int32_t ioindex, int32_t *val) = 0; |
|||
virtual int32_t extboard_read_outio_index_in_stm32(int32_t ioindex, int32_t *val) = 0; |
|||
virtual int32_t extboard_read_outio(int32_t ioindex, int32_t *val) = 0; |
|||
}; |
|||
} // namespace iflytop
|
@ -1,21 +0,0 @@ |
|||
#pragma once
|
|||
#include <stdint.h>
|
|||
|
|||
#include <functional>
|
|||
|
|||
#include "apibasic/basic.hpp"
|
|||
|
|||
namespace iflytop { |
|||
using namespace std; |
|||
|
|||
class ZICodeScaner { |
|||
public: |
|||
virtual ~ZICodeScaner() {} |
|||
|
|||
virtual int32_t code_scaner_start_scan() = 0; |
|||
virtual int32_t code_scaner_stop_scan() = 0; |
|||
virtual int32_t code_scaner_result_is_ready(int32_t* ready) = 0; |
|||
virtual int32_t code_scaner_get_result_length(int32_t* length) = 0; |
|||
virtual int32_t code_scaner_read_scaner_result(uint8_t* result, int32_t* len) = 0; |
|||
}; |
|||
} // namespace iflytop
|
@ -1,14 +0,0 @@ |
|||
#pragma once
|
|||
#include <stdint.h>
|
|||
|
|||
#include <functional>
|
|||
#include "apibasic/basic.hpp"
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
namespace iflytop { |
|||
using namespace std; |
|||
|
|||
} // namespace iflytop
|
@ -1,14 +0,0 @@ |
|||
#pragma once
|
|||
#include <stdint.h>
|
|||
|
|||
#include <functional>
|
|||
|
|||
#include "apibasic/basic.hpp"
|
|||
|
|||
namespace iflytop { |
|||
using namespace std; |
|||
class ZIFanControler { |
|||
public: |
|||
virtual int32_t fan_controler_set_speed(int32_t targetTemperature) = 0; |
|||
}; |
|||
} // namespace iflytop
|
@ -1,28 +0,0 @@ |
|||
#pragma once
|
|||
#include <stdint.h>
|
|||
|
|||
#include <functional>
|
|||
|
|||
#include "apibasic/basic.hpp"
|
|||
|
|||
namespace iflytop { |
|||
using namespace std; |
|||
|
|||
class ZIMiniServo { |
|||
public: |
|||
virtual ~ZIMiniServo() {} |
|||
virtual int32_t mini_servo_enable(int32_t enable) = 0; |
|||
virtual int32_t mini_servo_read_pos(int32_t* pos) = 0; |
|||
virtual int32_t mini_servo_active_cfg() = 0; |
|||
virtual int32_t mini_servo_stop(int32_t breakstop) = 0; |
|||
|
|||
virtual int32_t mini_servo_move_to(int32_t pos3600) = 0; // 舵机模式
|
|||
virtual int32_t mini_servo_rotate(int32_t speed) = 0; // 速度模式
|
|||
virtual int32_t mini_servo_rotate_with_torque(int32_t torque) = 0; // 扭矩模式
|
|||
|
|||
virtual int32_t mini_servo_set_mid_point() = 0; |
|||
virtual int32_t mini_servo_read_io_state(int32_t ioindex, int32_t* val) = 0; |
|||
virtual int32_t mini_servo_set_cur_pos(int32_t pos) = 0; // 设置当前位置
|
|||
|
|||
}; |
|||
} // namespace iflytop
|
@ -1,24 +0,0 @@ |
|||
#pragma once
|
|||
#include <stdint.h>
|
|||
|
|||
#include <functional>
|
|||
|
|||
#include "apibasic/basic.hpp"
|
|||
|
|||
namespace iflytop { |
|||
using namespace std; |
|||
|
|||
class ZI_PlateCodeScanerModule { |
|||
public: |
|||
virtual ~ZI_PlateCodeScanerModule(){}; |
|||
virtual int32_t plate_code_scaner_push_card_and_scan(int32_t final_stop_pos) = 0; |
|||
virtual int32_t plate_code_scaner_stop_scan() = 0; |
|||
virtual int32_t plate_code_scaner_read_result(int32_t packetIndex, uint8_t* data, int32_t* len) = 0; |
|||
virtual int32_t plate_code_scaner_read_result_point_num(int32_t* packetNum) = 0; |
|||
virtual int32_t plate_code_scaner_read_code(int32_t* rawcode, int32_t* legal, int32_t* item, int32_t* lot) = 0; |
|||
|
|||
virtual int32_t plate_code_scaner_adc_readraw(int32_t* val) = 0; |
|||
virtual int32_t plate_code_scaner_open_laser() = 0; |
|||
virtual int32_t plate_code_scaner_close_laser() = 0; |
|||
}; |
|||
} // namespace iflytop
|
@ -1,21 +0,0 @@ |
|||
#pragma once
|
|||
#include <stdint.h>
|
|||
|
|||
#include <functional>
|
|||
|
|||
#include "apibasic/basic.hpp"
|
|||
|
|||
namespace iflytop { |
|||
using namespace std; |
|||
class ZI_WaterCoolingTemperatureControler { |
|||
public: |
|||
virtual int32_t temp_controler_start_hearting(int32_t targetTemperature) = 0; |
|||
virtual int32_t temp_controler_stop_hearting() = 0; |
|||
|
|||
virtual int32_t temp_controler_set_peltier_power_level(int32_t level) = 0; // 测试使用
|
|||
virtual int32_t temp_controler_set_pump_level(int32_t level) = 0; // 测试使用
|
|||
virtual int32_t temp_controler_set_fan_level(int32_t level) = 0; // 测试使用
|
|||
virtual int32_t temp_controler_enable_log(int32_t level) = 0; // 测试使用
|
|||
|
|||
}; |
|||
} // namespace iflytop
|
@ -1,26 +0,0 @@ |
|||
#pragma once
|
|||
#include <stdint.h>
|
|||
|
|||
#include <functional>
|
|||
|
|||
#include "apibasic/basic.hpp"
|
|||
|
|||
namespace iflytop { |
|||
using namespace std; |
|||
class ZIXYMotor { |
|||
public: |
|||
virtual ~ZIXYMotor() {} |
|||
virtual int32_t xymotor_enable(int32_t enable) = 0; |
|||
virtual int32_t xymotor_move_by(int32_t dx, int32_t dy) = 0; |
|||
virtual int32_t xymotor_move_to(int32_t x, int32_t y) = 0; |
|||
virtual int32_t xymotor_move_to_zero() = 0; |
|||
virtual int32_t xymotor_read_pos(int32_t *x, int32_t *y) = 0; |
|||
virtual int32_t xymotor_set_pos(int32_t x, int32_t y) = 0; |
|||
|
|||
virtual int32_t xymotor_motor_move_by_direct(int32_t motor1_dpos, int32_t motor2_dpos) = 0; |
|||
virtual int32_t xymotor_read_enc_direct(int32_t *enc1, int32_t *enc2) = 0; |
|||
|
|||
virtual int32_t xymotor_read_inio(int32_t ioindex, int32_t *val) = 0; |
|||
virtual int32_t xymotor_read_inio_index_in_stm32(int32_t ioindex, int32_t *val) = 0; |
|||
}; |
|||
} // namespace iflytop
|
@ -1,25 +0,0 @@ |
|||
//
|
|||
// Created by zwsd
|
|||
//
|
|||
|
|||
#pragma once
|
|||
#include "api/api.hpp"
|
|||
namespace iflytop { |
|||
using namespace zcr; |
|||
|
|||
class IZCanReceiverListener { |
|||
public: |
|||
virtual void onRceivePacket(zcr_cmd_header_t *rxcmd, int32_t len) = 0; |
|||
}; |
|||
|
|||
class IZCanReceiver { |
|||
public: |
|||
public: |
|||
virtual void registerListener(IZCanReceiverListener *listener) = 0; |
|||
virtual int32_t sendBufAck(zcr_cmd_header_t *rx_cmd_header, uint8_t *data, int32_t len) = 0; |
|||
virtual int32_t sendAck(zcr_cmd_header_t *rx_cmd_header, int32_t *ackvar, int32_t nack) = 0; |
|||
virtual int32_t sendErrorAck(zcr_cmd_header_t *rx_cmd_header, int32_t errorcode) = 0; |
|||
virtual int32_t triggerEvent(zcr_cmd_header_t *rx_cmd_header, uint8_t *data, int32_t len) = 0; |
|||
}; |
|||
|
|||
} // namespace iflytop
|
@ -1,4 +1,2 @@ |
|||
#pragma once
|
|||
#include "api/api.hpp"
|
|||
//
|
|||
#include "i_zcanreceiver.hpp"
|
Write
Preview
Loading…
Cancel
Save
Reference in new issue