From 40bae4b887cc873eea0d37ba581669363fdc6f27 Mon Sep 17 00:00:00 2001 From: zhaohe Date: Wed, 4 Oct 2023 09:48:32 +0800 Subject: [PATCH] update --- api/basic_type.hpp | 8 ++++++++ api/i_pipette_module.hpp | 51 ++++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 59 insertions(+) create mode 100644 api/i_pipette_module.hpp diff --git a/api/basic_type.hpp b/api/basic_type.hpp index 423dfd5..682ce34 100644 --- a/api/basic_type.hpp +++ b/api/basic_type.hpp @@ -30,4 +30,12 @@ typedef enum { kmodule_statu_exception, } module_statu_type_t; +#ifndef ZSTRUCT +#define ZSTRUCT(name, ...) \ + typedef struct { \ + __VA_ARGS__ \ + } name; + +#endif + } // namespace iflytop \ No newline at end of file diff --git a/api/i_pipette_module.hpp b/api/i_pipette_module.hpp new file mode 100644 index 0000000..4d2a634 --- /dev/null +++ b/api/i_pipette_module.hpp @@ -0,0 +1,51 @@ + +#pragma once +#include + +#include + +#include "basic_type.hpp" +// + +namespace iflytop { +using namespace std; +class I_PipetteModule { + public: +#if 0 + 0. 设备信息 + 1. Z轴步数和高度的换算系数 + 2. Z轴偏移 + 3. Z轴最大高度 + + 1. 预设参数(试管信息) + 1.触底高度 + 2.平台移动高度 + 3.体积高度公式 + 4.液面跟随 + +3. 平台参数设置(平台信息) + 1. 取tip高度 + 2. 丢tip高度 + 3. 转移高度 + 4. tip头型号 +#endif + ZSTRUCT(devicepara_t, u8 z_shaft; s16 z_shift; s16 z_step2mm; u16 z_max_height_mm;); + ZSTRUCT(tubepara_t, uint8_t id; int16_t bottom_height_mm; uint8_t follow_liquid;); + ZSTRUCT(tippara_t, uint8_t id; int16_t tiphight;); + ZSTRUCT(platformpara_t, uint8_t id; int16_t take_tip_height_mm; int16_t remove_tip_height_mm; int16_t transfer_height_mm;); + + ZSTRUCT(action_cb_status_t, u8 exec_status;); + + virtual int32_t enable(u8 enable) = 0; + virtual int32_t stop(u8 stop_type) = 0; + + virtual int32_t zero_pos_calibrate(function exec_complete_cb) = 0; + virtual int32_t reset_device(function exec_complete_cb) = 0; + + virtual int32_t take_tip(int tipid, function exec_complete_cb) = 0; + virtual int32_t remove_tip(function exec_complete_cb) = 0; + // 取液(平台参数,试管参数, 取样体积,取样高度,摇匀次数,摇匀体积) + virtual int32_t take_and_split_liquid(u8 tube_id, s16 liquid_volume, s16 zhight, s16 abs_zhight, s16 shake_times, s16 shake_volume, // + function exec_complete_cb) = 0; +}; +} // namespace iflytop