commit 40d3e52b366ae271c5d48df3c574286d5b6d9229 Author: 闄堥稿嚒 <1343619937@qq.com> Date: Wed Feb 7 14:42:32 2024 +0800 1 diff --git a/conf/0x0100_0x0000_sysconfig.conf b/conf/0x0100_0x0000_sysconfig.conf new file mode 100644 index 0000000..1022dce --- /dev/null +++ b/conf/0x0100_0x0000_sysconfig.conf @@ -0,0 +1,7 @@ +#----------------------------------------------------------------------------------------------------------------------- +# 属性名 权限 作用 +#----------------------------------------------------------------------------------------------------------------------- +# Product.Serial 读写 产品序列号(字符串) +# Beep.EnableLevel 只读 蜂鸣器发声电平 +#----------------------------------------------------------------------------------------------------------------------- +Beep.EnableLevel=1 diff --git a/conf/0x0100_0x0000_sysconfig.conf.sig b/conf/0x0100_0x0000_sysconfig.conf.sig new file mode 100644 index 0000000..dfd73ab --- /dev/null +++ b/conf/0x0100_0x0000_sysconfig.conf.sig @@ -0,0 +1 @@ +f2945c01f574a23d813cb22243b460fb8aa8349f2723b6baa3f5dbadb71f4ebd 0x0100_0x0000_sysconfig.conf diff --git a/conf/0x0100_0x0000_vusart.conf b/conf/0x0100_0x0000_vusart.conf new file mode 100644 index 0000000..5a53122 --- /dev/null +++ b/conf/0x0100_0x0000_vusart.conf @@ -0,0 +1,19 @@ +#----------------------------------------------------------------------------------------------------------------------- +# 属性名 权限 作用 +#----------------------------------------------------------------------------------------------------------------------- +# VUSART.Count 只读 虚拟串口数量 +# VUSART.InitDelay 只读 初始化延时(毫秒) +# VUSART%d.Channel 只读 虚拟串口通道号: 1, 2, 3(0已被系统信息输出占用) +# VUSART%d.Baud 只读 虚拟串口波特率 +# VUSART%d.InitString 只读 初始化字符串 +#----------------------------------------------------------------------------------------------------------------------- + +VUSART.Count=2 +VUSART.InitDelay=1000 + +VUSART0.Channel=2 +VUSART0.Baud=9600 +VUSART0.InitString=DM-\x8d\x0a + +VUSART1.Channel=3 +VUSART1.Baud=9600 \ No newline at end of file diff --git a/conf/0x0100_0x0000_vusart.conf.sig b/conf/0x0100_0x0000_vusart.conf.sig new file mode 100644 index 0000000..83e3d24 --- /dev/null +++ b/conf/0x0100_0x0000_vusart.conf.sig @@ -0,0 +1 @@ +c6eb30f9d174bbd86e87f28957cd5b136e5cc3c0d707f939df32e2cd200783ae 0x0100_0x0000_vusart.conf diff --git a/conf/0x0120_0x0000_pwrconfig.conf b/conf/0x0120_0x0000_pwrconfig.conf new file mode 100644 index 0000000..7f8278c --- /dev/null +++ b/conf/0x0120_0x0000_pwrconfig.conf @@ -0,0 +1,35 @@ +#----------------------------------------------------------------------------------------------------------------------- +# 属性名 权限 作用 +#----------------------------------------------------------------------------------------------------------------------- +# PowerOn.Step.Count 只读 上电步骤数, 0表示禁用电源管理 +# PowerOn.Step%d.Channel 只读 上电通道号 +# PowerOn.Step%d.ScanRequired 只读 上电后是否要扫描模块, 只能为以下值之一: true/false/yes/no/0/1 +# PowerOn.Step%d.Delay 只读 上电后延迟时间(毫秒), 当ScanRequired为TRUE时本参数最小值5000, 小于5000的自动取5000 +# PowerOff.Delay 只读 关机延迟时间(毫秒) +#----------------------------------------------------------------------------------------------------------------------- + +PowerOn.Step.Count=5 +# 12V-加样臂 +PowerOn.Step0.Channel=0 +PowerOn.Step0.ScanRequired=no +PowerOn.Step0.Delay=200 + +# 24V-加样臂 +PowerOn.Step1.Channel=2 +PowerOn.Step1.ScanRequired=no +PowerOn.Step1.Delay=10000 + +# 12V-反应区 +PowerOn.Step2.Channel=1 +PowerOn.Step2.ScanRequired=no +PowerOn.Step2.Delay=200 + +# 24V-反应区 +PowerOn.Step3.Channel=3 +PowerOn.Step3.ScanRequired=no +PowerOn.Step3.Delay=200 + +# 24V-反应区 +PowerOn.Step4.Channel=4 +PowerOn.Step4.ScanRequired=no +PowerOn.Step4.Delay=0 \ No newline at end of file diff --git a/conf/0x0120_0x0000_pwrconfig.conf.sig b/conf/0x0120_0x0000_pwrconfig.conf.sig new file mode 100644 index 0000000..ee580da --- /dev/null +++ b/conf/0x0120_0x0000_pwrconfig.conf.sig @@ -0,0 +1 @@ +74d0cc6db89f2959424dd56351deb945a649676c4e81371e205968908630d227 0x0120_0x0000_pwrconfig.conf diff --git a/conf/0x0208_0x0000_temp.conf b/conf/0x0208_0x0000_temp.conf new file mode 100644 index 0000000..2e2b090 --- /dev/null +++ b/conf/0x0208_0x0000_temp.conf @@ -0,0 +1,478 @@ +#数据类型 属性 +#INT32U Mode // 通道工作模式配置 默认值0 +#INT32U TempPin // 通道温度传感器配置 只读 (一个通道可以多个温度传感器,但一个pin只能接一个温度传感器) +#INT32U TemphumiPin // 通道湿度传感器配置 只读 (一个通道可以多个湿度传感器,但一个pin只能接一个温度传感器) +#INT32U ProtectTempPin // 保护温度传感器配置 只读 (一个通道可以多个湿度传感器,但一个pin只能接一个温度传感器) +#INT32U HeatPin // 通道加热输出配置 只读 (一个通道只能接一个输出) +#INT32U CoolPin // 通道制冷输出配置 只读 (一个通道只能接一个输出) +#INT32U FanOutPin // 通道风扇输出配置 只读 (一个通道只能接一个输出) +#INT32U FanInPin // 通道风扇转速输入引脚配置 只读 +#FP32 Proportion // 比例参数 默认值 1.5 +#FP32 Integral // 积分参数 默认值 0.0 +#FP32 Derivative // 微分参数 默认值 0.0 +#FP32 Deadzone // 温控死区(用于制冷) 默认值 2.0 +#FP32 SensorAdjust // 温度传感器修正值 默认值 0.0 +#FP32 TempBusy // 温控目标(有板时) 默认值 37.0 +#FP32 TempIdle // 温控目标(无板时) 默认值 25.0 +#FP32 ApproachOffset // 温控区间参数(用于加热) 默认值 2.0 +#INT32U Peroid // 通道控制周期参数(毫秒) 默认值 5000 +#FP32 TempProtectLow // 温控保护温度下限 默认值 NaN +#FP32 TempProtectHigh // 温控保护温度上限 默认值 NaN +#FP32 TempHumidityLow // 湿度下限(用于湿度控制模式) 默认值 +#FP32 TempHumidityHigh // 湿度上限(用于湿度控制模式) 默认值 +#INT32S FanSpeedLow // 风扇速度下限(用于制冷控制模式) 默认值 100 +#INT32S FanSpeedHigh // 风扇速度上限(用于制冷控制模式) 默认值 10000 +#------------------------------------------------------------------------------------------------- +#要使用的通道将31位置1,使能 +#加热模式:采集温度输入引脚各传感器温度值平均值,经PID控制输出到输出引脚(输出引脚只能是一个) +# 所用参数:Mode,TempPin,HeatPin,Proportion,Integral,Derivative,SensorAdjust,TempBusy,TempIdle,ApproachOffset,TempProtectLow,TempProtectHigh +#制冷模式:采集温度输入引脚各传感器温度值平均值,经迟滞计算后输出到输出引脚(输出引脚只能是一个),如果使能空气循环风扇检测, +# 则需要配置相应的风扇反馈信号引脚(可以多路输入),当发现某一路风扇速度不在范围时关闭输出,并报告错误代码 +# 所用参数:Mode,TempPin,CoolPin,FanInPin,SensorAdjust,TempBusy,TempIdle,Deadzone,TempProtectLow,TempProtectHigh,FanSpeedLow,FanSpeedHigh +#湿度控制模式:获取相应的输入传感器器求平均后控制风扇输出 +# 所用参数:Mode,TemphumiPin,FanOutPin,FanInPin,SensorAdjust,TempHumidityLow,TempHumidityHigh,FanSpeedLow,FanSpeedHigh +#风扇模式:单纯的风扇控制,可以选择是否进行检查转速 +#所用通道在使用为非风扇模式时,如通道没有进行自己控制都可作为风扇控制通道,当选择风扇工作模式为1时是由通道自动控制,如果是0采用上位机控制(控制只能控制一个pin的输出) +#glGetSensor TempRAW 直接读取温度传感器指令,通道配置的温度传感器顺序读出,配置时注意 +#glGetSensor HumidityRaw直接读取湿度传感器,通道配置的温度传感器顺序读出,配置时注意 +#glGetSensor Fan_Speed 得到该通道所用风扇转速平均值,配置时注意 +#------------------------------------------------------------------------------------------------- +#Mode 参数位说明 +#位 名称 默认值 功能 +#------------------------------------------------------------------------------------------------- +#0-1 mode 0 通道工作模式:0->加热模式,1->制冷模式,2->湿度控制模式,3,->风扇模式 +#3 plateTrigger 0 微孔板触发电平 (触发电平输入,用于改变目标温度) +#4 icbBoot 0 温控上电是否自动启动 (1为上电启动) +#5 icbEna 0 温控使能电平 (默认是低电平 当单片机输出端口为低电平是驱动输出为灌电流,单片机输出端口为高电平时输出驱动截止) +#6 icbDual 0 是否支持双向温控 (目前电路板只支持单向) +#7 icbDir 0 加热方向电平(仅双向温控使能时) +#18 humidityEna 0 使能湿度传感器(未使用) +#19 fanDetectEna 0 使能空气循环风扇转速检测 +#20-23 icbSensorCount 1 温控传感器数量(未使用) +#24-27 icbProtectCount 0 温控保护传感器数量(未使用) +#28 icbSensorMode 0 温控传感器工作方式: 0 求平均 +#29 icbProtectMode 0 保护传感器工作方式: 0 任意一个触发保护条件即停止温控, 1 全部触发保护条件停止温控 +#30 fanMode 0 风扇工作模式: 0 通过glSwFunc指令控制, 1 温控使能时自动开启 +#31 channelEnable 1 通道使能位:1使能,0失能 +#32 PowerCoefficient 加热片加热效率(0.0-1.0之间),超过范围后视为1.0 +#------------------------------------------------------------------------------------------------- +#系统管理模块软关机是需要打开的风扇通道 +Systemsleep.FanON=0x00000600 +#系统管理模块软关机后打开延时(ms) +Systemsleep.FanONDelay=300000 + +#通道0,不使用 +Channel0.Mode=0x00000000 +Channel0.TempPin=0x00000000 +Channel0.TemphumiPin=0x00000000 +Channel0.ProtectTempPin=0x00000000 +Channel0.HeatPin=0x00000000 +Channel0.CoolPin=0x00000000 +Channel0.FanOutPin=0x00000000 +Channel0.FanInPin=0x00000000 +Channel0.Proportion=1.5 +Channel0.Integral=0.0 +Channel0.Derivative=0.02 +Channel0.Deadzone=2.0 +Channel0.SensorAdjust=0.0 +Channel0.TempBusy=37.5 +Channel0.TempIdle=25.0 +Channel0.ApproachOffset=2.0 +Channel0.Peroid=5000 +Channel0.TempProtectLow=-20.0 +Channel0.TempProtectHigh=100.0 +Channel0.TempHumidityLow=0.0 +Channel0.TempHumidityHigh=80.0 +Channel0.FanSpeedLow=100 +Channel0.FanSpeedHigh=1000 +Channel0.PowerCoefficient=1.0 + +#通道1,温育底板 +Channel1.Mode=0x80000010 +Channel1.TempPin=0x00000010 +Channel1.TemphumiPin=0x00000000 +Channel1.ProtectTempPin=0x00000000 +Channel1.HeatPin=0x00000010 +Channel1.CoolPin=0x00000000 +Channel1.FanOutPin=0x00000000 +Channel1.FanInPin=0x00000000 +Channel1.Proportion=1.5 +Channel1.Integral=0.0 +Channel1.Derivative=0.02 +Channel1.Deadzone=0.5 +Channel1.SensorAdjust=-2.0 +Channel1.TempBusy=37.5 +Channel1.TempIdle=25.0 +Channel1.ApproachOffset=0.5 +Channel1.Peroid=5000 +Channel1.TempProtectLow=-20.0 +Channel1.TempProtectHigh=60.0 +Channel1.TempHumidityLow=0.0 +Channel1.TempHumidityHigh=80.0 +Channel1.FanSpeedLow=100 +Channel1.FanSpeedHigh=1000 +Channel1.PowerCoefficient=1.0 + +#通道2,T1温育 +Channel2.Mode=0x80000010 +Channel2.TempPin=0x00000040 +Channel2.TemphumiPin=0x00000000 +Channel2.ProtectTempPin=0x00000000 +Channel2.HeatPin=0x00000040 +Channel2.CoolPin=0x00000000 +Channel2.FanOutPin=0x00000000 +Channel2.FanInPin=0x00000000 +Channel2.Proportion=1.5 +Channel2.Integral=0.0 +Channel2.Derivative=0.02 +Channel2.Deadzone=0.5 +Channel2.SensorAdjust=-2.0 +Channel2.TempBusy=37.5 +Channel2.TempIdle=25.0 +Channel2.ApproachOffset=0.5 +Channel2.Peroid=5000 +Channel2.TempProtectLow=-20.0 +Channel2.TempProtectHigh=60.0 +Channel2.TempHumidityLow=0.0 +Channel2.TempHumidityHigh=80.0 +Channel2.FanSpeedLow=100 +Channel2.FanSpeedHigh=1000 +Channel2.PowerCoefficient=1.0 + +#通道3,T2温育 +Channel3.Mode=0x80000010 +Channel3.TempPin=0x00000080 +Channel3.TemphumiPin=0x00000000 +Channel3.ProtectTempPin=0x00000000 +Channel3.HeatPin=0x00000080 +Channel3.CoolPin=0x00000000 +Channel3.FanOutPin=0x00000000 +Channel3.FanInPin=0x00000000 +Channel3.Proportion=1.5 +Channel3.Integral=0.0 +Channel3.Derivative=0.02 +Channel3.Deadzone=0.5 +Channel3.SensorAdjust=-2.0 +Channel3.TempBusy=37.5 +Channel3.TempIdle=25.0 +Channel3.ApproachOffset=0.5 +Channel3.Peroid=5000 +Channel3.TempProtectLow=-20.0 +Channel3.TempProtectHigh=60.0 +Channel3.TempHumidityLow=0.0 +Channel3.TempHumidityHigh=80.0 +Channel3.FanSpeedLow=100 +Channel3.FanSpeedHigh=1000 +Channel3.PowerCoefficient=1.0 + +#通道4,试剂2制冷 +Channel4.Mode=0x80000011 +Channel4.TempPin=0x00000003 +Channel4.TemphumiPin=0x00000000 +Channel4.ProtectTempPin=0x00000000 +Channel4.HeatPin=0x00000000 +Channel4.CoolPin=0x00000001 +Channel4.FanOutPin=0x00000000 +Channel4.FanInPin=0x00000003 +Channel4.Proportion=1.5 +Channel4.Integral=0.0 +Channel4.Derivative=0.02 +Channel4.Deadzone=1.0 +Channel4.SensorAdjust=0 +Channel4.TempBusy=6.5 +Channel4.TempIdle=15.0 +Channel4.ApproachOffset=1.0 +Channel4.Peroid=5000 +Channel4.TempProtectLow=-1.0 +Channel4.TempProtectHigh=50.0 +Channel4.TempHumidityLow=0.0 +Channel4.TempHumidityHigh=80.0 +Channel4.FanSpeedLow=100 +Channel4.FanSpeedHigh=1000 +Channel4.PowerCoefficient=1.0 + +#通道5,通用液制冷 +Channel5.Mode=0x80000011 +Channel5.TempPin=0x00000003 +Channel5.TemphumiPin=0x00000000 +Channel5.ProtectTempPin=0x00000000 +Channel5.HeatPin=0x00000000 +Channel5.CoolPin=0x00000002 +Channel5.FanOutPin=0x00000000 +Channel5.FanInPin=0x00000003 +Channel5.Proportion=1.5 +Channel5.Integral=0.0 +Channel5.Derivative=0.02 +Channel5.Deadzone=1.0 +Channel5.SensorAdjust=0 +Channel5.TempBusy=6.5 +Channel5.TempIdle=15.0 +Channel5.ApproachOffset=1.0 +Channel5.Peroid=5000 +Channel5.TempProtectLow=-1.0 +Channel5.TempProtectHigh=50.0 +Channel5.TempHumidityLow=0.0 +Channel5.TempHumidityHigh=80.0 +Channel5.FanSpeedLow=100 +Channel5.FanSpeedHigh=1000 +Channel5.PowerCoefficient=1.0 + +#通道6,试剂1制冷 +Channel6.Mode=0x80000011 +Channel6.TempPin=0x00000003 +Channel6.TemphumiPin=0x00000000 +Channel6.ProtectTempPin=0x00000000 +Channel6.HeatPin=0x00000000 +Channel6.CoolPin=0x00000004 +Channel6.FanOutPin=0x00000000 +Channel6.FanInPin=0x00000003 +Channel6.Proportion=1.5 +Channel6.Integral=0.0 +Channel6.Derivative=0.02 +Channel6.Deadzone=1.0 +Channel6.SensorAdjust=0.0 +Channel6.TempBusy=6.5 +Channel6.TempIdle=15.0 +Channel6.ApproachOffset=1.0 +Channel6.Peroid=5000 +Channel6.TempProtectLow=-1.0 +Channel6.TempProtectHigh=50.0 +Channel6.TempHumidityLow=0.0 +Channel6.TempHumidityHigh=80.0 +Channel6.FanSpeedLow=100 +Channel6.FanSpeedHigh=1000 +Channel6.PowerCoefficient=1.0 + +#通道7,温育前上盖板 +Channel7.Mode=0x80000010 +Channel7.TempPin=0x00000008 +Channel7.TemphumiPin=0x00000000 +Channel7.ProtectTempPin=0x00000000 +Channel7.HeatPin=0x00000008 +Channel7.CoolPin=0x00000000 +Channel7.FanOutPin=0x00000000 +Channel7.FanInPin=0x00000000 +Channel7.Proportion=2 +Channel7.Integral=0.0 +Channel7.Derivative=0.02 +Channel7.Deadzone=0.5 +Channel7.SensorAdjust=-2.0 +Channel7.TempBusy=37.5 +Channel7.TempIdle=25.0 +Channel7.ApproachOffset=0.5 +Channel7.Peroid=5000 +Channel7.TempProtectLow=-20.0 +Channel7.TempProtectHigh=60.0 +Channel7.TempHumidityLow=0.0 +Channel7.TempHumidityHigh=80.0 +Channel7.FanSpeedLow=100 +Channel7.FanSpeedHigh=1000 +Channel7.PowerCoefficient=1.0 + +#通道8,温育后上盖板 +Channel8.Mode=0x80000010 +Channel8.TempPin=0x0000020 +Channel8.TemphumiPin=0x00000000 +Channel8.ProtectTempPin=0x00000000 +Channel8.HeatPin=0x00000020 +Channel8.CoolPin=0x00000000 +Channel8.FanOutPin=0x00000000 +Channel8.FanInPin=0x00000000 +Channel8.Proportion=2 +Channel8.Integral=0.0 +Channel8.Derivative=0.02 +Channel8.Deadzone=0.5 +Channel8.SensorAdjust=-2.0 +Channel8.TempBusy=37.5 +Channel8.TempIdle=25.0 +Channel8.ApproachOffset=0.5 +Channel8.Peroid=5000 +Channel8.TempProtectLow=-20.0 +Channel8.TempProtectHigh=60.0 +Channel8.TempHumidityLow=0.0 +Channel8.TempHumidityHigh=80.0 +Channel8.FanSpeedLow=100 +Channel8.FanSpeedHigh=1000 +Channel8.PowerCoefficient=1.0 + +#检测风扇 +Channel9.Mode=0x80000013 +Channel9.TempPin=0x00000000 +Channel9.TemphumiPin=0x00000000 +Channel9.ProtectTempPin=0x00000000 +Channel9.HeatPin=0x00000000 +Channel9.CoolPin=0x00000000 +Channel9.FanOutPin=0x00000001 +Channel9.FanInPin=0x00000010 +Channel9.Proportion=1.5 +Channel9.Integral=0.0 +Channel9.Derivative=0.02 +Channel9.Deadzone=2.0 +Channel9.SensorAdjust=0.0 +Channel9.TempBusy=8.0 +Channel9.TempIdle=15.0 +Channel9.ApproachOffset=2.0 +Channel9.Peroid=5000 +Channel9.TempProtectLow=-20.0 +Channel9.TempProtectHigh=100.0 +Channel9.TempHumidityLow=0.0 +Channel9.TempHumidityHigh=80.0 +Channel9.FanSpeedLow=100 +Channel9.FanSpeedHigh=1000 +Channel9.PowerCoefficient=1.0 + +#温育风扇 +Channel10.Mode=0x80000013 +Channel10.TempPin=0x00000000 +Channel10.TemphumiPin=0x00000000 +Channel10.ProtectTempPin=0x00000000 +Channel10.HeatPin=0x00000000 +Channel10.CoolPin=0x00000000 +Channel10.FanOutPin=0x00000002 +Channel10.FanInPin=0x00000008 +Channel10.Proportion=1.5 +Channel10.Integral=0.0 +Channel10.Derivative=0.02 +Channel10.Deadzone=2.0 +Channel10.SensorAdjust=0.0 +Channel10.TempBusy=37.5 +Channel10.TempIdle=25.0 +Channel10.ApproachOffset=2.0 +Channel10.Peroid=5000 +Channel10.TempProtectLow=-20.0 +Channel10.TempProtectHigh=100.0 +Channel10.TempHumidityLow=0.0 +Channel10.TempHumidityHigh=80.0 +Channel10.FanSpeedLow=100 +Channel10.FanSpeedHigh=1000 +Channel10.PowerCoefficient=1.0 + +#玻璃加热 +Channel11.Mode=0x80000010 +Channel11.TempPin=0x00000000 +Channel11.TemphumiPin=0x00000000 +Channel11.ProtectTempPin=0x00000000 +Channel11.HeatPin=0x00000100 +Channel11.CoolPin=0x00000000 +Channel11.FanOutPin=0x00000000 +Channel11.FanInPin=0x00000000 +Channel11.Proportion=1.5 +Channel11.Integral=0.0 +Channel11.Derivative=0.02 +Channel11.Deadzone=1.0 +Channel11.SensorAdjust=0 +Channel11.TempBusy=37.5 +Channel11.TempIdle=25.0 +Channel11.ApproachOffset=1.0 +Channel11.Peroid=5000 +Channel11.TempProtectLow=-20.0 +Channel11.TempProtectHigh=60.0 +Channel11.TempHumidityLow=0.0 +Channel11.TempHumidityHigh=80.0 +Channel11.FanSpeedLow=100 +Channel11.FanSpeedHigh=1000 +Channel11.PowerCoefficient=1.0 + +#试剂盖加热 +Channel12.Mode=0x80000010 +Channel12.TempPin=0x00000000 +Channel12.TemphumiPin=0x00000000 +Channel12.ProtectTempPin=0x00000000 +Channel12.HeatPin=0x00000200 +Channel12.CoolPin=0x00000000 +Channel12.FanOutPin=0x00000000 +Channel12.FanInPin=0x00000000 +Channel12.Proportion=1.5 +Channel12.Integral=0.0 +Channel12.Derivative=0.02 +Channel12.Deadzone=2.0 +Channel12.SensorAdjust=0 +Channel12.TempBusy=37.5 +Channel12.TempIdle=25.0 +Channel12.ApproachOffset=2.0 +Channel12.Peroid=5000 +Channel12.TempProtectLow=-20.0 +Channel12.TempProtectHigh=60.0 +Channel12.TempHumidityLow=0.0 +Channel12.TempHumidityHigh=80.0 +Channel12.FanSpeedLow=100 +Channel12.FanSpeedHigh=1000 +Channel12.PowerCoefficient=0.4 + +#预留1 +Channel13.Mode=0x00000000 +Channel13.TempPin=0x00000000 +Channel13.TemphumiPin=0x00000000 +Channel13.ProtectTempPin=0x00000000 +Channel13.HeatPin=0x00000200 +Channel13.CoolPin=0x00000000 +Channel13.FanOutPin=0x00000000 +Channel13.FanInPin=0x00000000 +Channel13.Proportion=1.5 +Channel13.Integral=0.0 +Channel13.Derivative=0.02 +Channel13.Deadzone=2.0 +Channel13.SensorAdjust=0 +Channel13.TempBusy=37.5 +Channel13.TempIdle=25.0 +Channel13.ApproachOffset=2.0 +Channel13.Peroid=5000 +Channel13.TempProtectLow=-20.0 +Channel13.TempProtectHigh=100.0 +Channel13.TempHumidityLow=0.0 +Channel13.TempHumidityHigh=80.0 +Channel13.FanSpeedLow=100 +Channel13.FanSpeedHigh=1000 +Channel13.PowerCoefficient=1.0 + +#预留2 +Channel14.Mode=0x00000000 +Channel14.TempPin=0x00000000 +Channel14.TemphumiPin=0x00000000 +Channel14.ProtectTempPin=0x00000000 +Channel14.HeatPin=0x00000200 +Channel14.CoolPin=0x00000000 +Channel14.FanOutPin=0x00000000 +Channel14.FanInPin=0x00000000 +Channel14.Proportion=1.5 +Channel14.Integral=0.0 +Channel14.Derivative=0.02 +Channel14.Deadzone=2.0 +Channel14.SensorAdjust=0 +Channel14.TempBusy=37.5 +Channel14.TempIdle=25.0 +Channel14.ApproachOffset=2.0 +Channel14.Peroid=5000 +Channel14.TempProtectLow=-20.0 +Channel14.TempProtectHigh=100.0 +Channel14.TempHumidityLow=0.0 +Channel14.TempHumidityHigh=80.0 +Channel14.FanSpeedLow=100 +Channel14.FanSpeedHigh=1000 +Channel14.PowerCoefficient=1.0 + +#预留3 +Channel15.Mode=0x00000000 +Channel15.TempPin=0x00000000 +Channel15.TemphumiPin=0x00000000 +Channel15.ProtectTempPin=0x00000000 +Channel15.HeatPin=0x00000200 +Channel15.CoolPin=0x00000000 +Channel15.FanOutPin=0x00000000 +Channel15.FanInPin=0x00000000 +Channel15.Proportion=1.5 +Channel15.Integral=0.0 +Channel15.Derivative=0.02 +Channel15.Deadzone=2.0 +Channel15.SensorAdjust=0 +Channel15.TempBusy=37.5 +Channel15.TempIdle=25.0 +Channel15.ApproachOffset=2.0 +Channel15.Peroid=5000 +Channel15.TempProtectLow=-20.0 +Channel15.TempProtectHigh=100.0 +Channel15.TempHumidityLow=0.0 +Channel15.TempHumidityHigh=80.0 +Channel15.FanSpeedLow=100 +Channel15.FanSpeedHigh=1000 +Channel15.PowerCoefficient=1.0 diff --git a/conf/0x0208_0x0000_temp.conf.sig b/conf/0x0208_0x0000_temp.conf.sig new file mode 100644 index 0000000..6681c68 --- /dev/null +++ b/conf/0x0208_0x0000_temp.conf.sig @@ -0,0 +1 @@ +a871071ccd156898332ac85d2dc1933c9cc56c4fb192df38eca4fd9b56fe00cd 0x0208_0x0000_temp.conf diff --git a/conf/0x10A0_0x0001_lica_read.05d9ff393231554d51247205.conf b/conf/0x10A0_0x0001_lica_read.05d9ff393231554d51247205.conf new file mode 100644 index 0000000..9341016 --- /dev/null +++ b/conf/0x10A0_0x0001_lica_read.05d9ff393231554d51247205.conf @@ -0,0 +1,2 @@ +Calibrate0.StartPos=3161 +Lrd.Quot=1.000000e+00 diff --git a/conf/0x10A0_0x0001_lica_read.conf b/conf/0x10A0_0x0001_lica_read.conf new file mode 100644 index 0000000..25a0420 --- /dev/null +++ b/conf/0x10A0_0x0001_lica_read.conf @@ -0,0 +1,116 @@ +#------------------------------------------------------------------------------------------------------------------- +# 属性名 权限 作用 +#------------------------------------------------------------------------------------------------------------------- +# Lrd.HoleCnt 只读 板条孔位数量 +# Lrd.HoleSpace 只读 每孔间距 +# Lrd.Flag 只读 配置标志 +# bit0: 两个反射式传感器触发电平 +# bit1: G电机使能电平 +# bit2: G电机开方向(插入)电平 +# bit3: G电机零位传感器触发电平 +# bit4: G电机限位传感器触发电平 +# bit5: 光耦使能电平 +# bit6: PMT使能电平 (预留) +# bit7: PMT溢出电平 +# bit8: 激光使能电平 +# bit9: 加热除雾使能电平 +# Lrd.ModuleName 只读 模块名称 +# Lrd.Quot 读写 读数值调整系数 +# Spacer%d.MoveTimeout 读写 叉子电机运动超时 +# Spacer%d.DutyRatio 读写 叉子电机使能占空比(范围1 - 100) +# Laser%d.PwrLvl 读写 默认激光功率档位(档位有0/1/2/3档) +# Laser%d.Duration 读写 默认激发时间 +# Reader%d.Delay 读写 默认激发到读数时间 +# Reader%d.Duration 读写 默认读数时间 +# Reader%d.OverflowTimeout 读写 溢出超时 +# Motor%d.MaxPos 读写 电机可运动的最大坐标 +# Motor%d.DoorOpenPos 读写 开门位置坐标(新装置改为开门折回位置,实际开门坐标为0) +# Motor%d.DoorSlowSpeedPos 读写 接触前门时减速坐标 +# Motor%d.NormalSpeed 读写 电机移动默认速度 +# Motor%d.NormalAcc 读写 电机移动默认加速度 +# Motor%d.FastSpeed 读写 电机快速移动速度 +# Motor%d.FastAcc 读写 电机快速移动加速度 +# Motor%d.SlowSpeed 读写 电机慢速移动速度 +# Motor%d.SlowAcc 读写 电机慢速移动加速度 +# Motor%d.DetectSpeed 读写 检测读数时默认速度 +# Motor%d.DetectAcc 读写 检测读数时默认加速度 +# Motor%d.StandbyPos 读写 电机停靠(待机)位置 +# Motor%d.DiscardPos0 读写 扔板条位置0 (扔弃位置) +# Motor%d.DiscardPos1 读写 扔板条位置1 (回撤位置)(新装置改为扔板条减速点) +# Motor%d.DiscardPos2 读写 扔板条位置2 (关门位置)(新装置用不到) +# Motor%d.CoordinateZero 只读 电机零位逻辑坐标 +# Motor%d.LostStepForward 读写 电机正向最大允许失步 +# Motor%d.LostStepReverse 读写 电机反向最大允许失步 +# Motor%d.ZeroTriggerLevel 只读 零位传感器触发电平 +# Motor%d.EnaLevel 只读 电机使能电平 +# Motor%d.ForwardLevel 只读 电机正方向电平 +# Motor%d.MicroStep 只读 电机细分数 +# Calibrate%d.StartPos 读写 定标第一孔位中心位置 +# Calibrate%d.RefStartPos 读写 定标第一孔位中心位置机械参考点 +# Calibrate%d.RefGroup 读写 定标第一孔位读取PMT值的位置组数(100=1),=1时为正常锁板条位置 +# Motor%d.LockPos0" 读写 锁板条正常位置0 +# Motor%d.LockPos1" 读写 锁板条重试位置1 +# Motor%d.LockPos2" 读写 锁板条重试位置2 +# Motor%d.LockPos3" 读写 锁板条重试位置3 +# Motor%d.LockPos4" 读写 锁板条重试位置4 (目前没用:LockPosCnt=4) +#------------------------------------------------------------------------------------------------------------------ +Lrd.HoleSpace=787.5 +Lrd.Flag=0x0080 +Lrd.ModuleName=Reader module +Lrd.Quot=1.0 + +Spacer0.MoveTimeout=300 +Spacer0.DutyRatio=55 + +Laser0.PwrLvl=1 +Laser0.Duration=600 + +Reader0.Delay=200 +Reader0.Duration=600 +Reader0.OverflowTimeout=5000 + +Motor0.MaxPos=10050 +Motor0.DoorOpenPos=1312 +Motor0.DoorSlowSpeedPos=1312 +Motor0.NormalSpeed=24000 +Motor0.NormalAcc=64000 +Motor0.FastSpeed=24000 +Motor0.FastAcc=64000 +Motor0.SlowSpeed=3000 +Motor0.SlowAcc=12000 +Motor0.DetectSpeed=24000 +Motor0.DetectAcc=480000 +Motor0.StandbyPos=0 +Motor0.DiscardPos0=9864 +Motor0.DiscardPos1=0 +Motor0.DiscardPos2=0 + +Motor0.CoordinateZero=124 +Motor0.LostStepForward=0x20 +Motor0.LostStepReverse=0x20 + +Motor0.ZeroTriggerLevel=1 +Motor0.EnaLevel=1 +Motor0.ForwardLevel=0 +Motor0.MicroStep=16 + +Calibrate0.StartPos=3086 +Calibrate0.RefStartPos=3086 +Calibrate0.RefGroup=140 +Calibrate0.RefSpace=5 + +Hearter0.Temp=37.0 +Cooler0.Temp=20.0 + +Lrd.LockPosCnt=4 +Motor0.LockPos0=44 +Motor0.LockPos1=132 +Motor0.LockPos2=219 +Motor0.LockPos3=0 +Motor0.LockPos4=0 + + diff --git a/conf/0x10A0_0x0001_lica_read.conf.sig b/conf/0x10A0_0x0001_lica_read.conf.sig new file mode 100644 index 0000000..9b1a164 --- /dev/null +++ b/conf/0x10A0_0x0001_lica_read.conf.sig @@ -0,0 +1 @@ +d590d6f48c163c644db243b655723d52d757f8ed0d80bec11524f9ab4bf00cde 0x10A0_0x0001_lica_read.conf diff --git a/conf/0x1820_0x0000_container.conf b/conf/0x1820_0x0000_container.conf new file mode 100644 index 0000000..db244cf --- /dev/null +++ b/conf/0x1820_0x0000_container.conf @@ -0,0 +1,355 @@ +#----------------------------------------------------------------------------------------------------------------------- +# 属性名 类型 权限 选项 作用 +#----------------------------------------------------------------------------------------------------------------------- +# Container.Count INT32U 只读 required 容器类型数量 +# Container%d.Label STRING 只读 容器描述 +# Container%d.Id INT32U 只读 容器类型 +# Container%d.flag INT16U 只读 容器标志位 +# Container%d.Dip.Speed INT32U 读写 定标点到上液面的速度 +# Container%d.Dip.Acce INT32U 读写 定标点到上液面的加速度 +# Container%d.Top FP32 读写 容器上液面(毫米) +# Container%d.Bottom FP32 读写 容器下液面(毫米) +# Container%d.BottomExt FP32 读写 不探液面取液时的位置(毫米), 本参数忽略时使用Container%d.Bottom的值, offset to Container%d.Bottom +# Container%d.Little FP32 读写 使用探测到的液面进行取液的最低值(毫米),探测到的液面低于此值时直接探到Container%d.BottomExt位置取液, offset to Container%d.Bottom +# Container%d.Diameter FP32 读写 容器直径(毫米) +# Container%d.MixPos FP32 读写 容器混匀高度,基于Bottom(毫米) + +# Container%d.CapCO.LiquidDetect INT32U 读写 required 电容液面检测阈值 +# Container%d.CapCO.LiquidDetectCheck INT32U 读写 二次探液面阈值 +# Container%d.CapCO.LiquidDetectClot INT32U 读写 血凝块检测阈值 +# Container%d.CapCO.RampDetect INT32U 读写 电容坡道检测阈值 +# Container%d.CapFlt.Reference.Count INT32U 读写 required 电容传感器滤波参数: 参考电容连续采样次数 +# Container%d.CapFlt.Reference.Duration INT32U 读写 required 电容传感器滤波参数: 参考电容连续采样时间 +# Container%d.CapFlt.LiquidDetect.Count INT32U 读写 required 电容传感器滤波参数: 液面探测连续采样次数 +# Container%d.CapFlt.LiquidDetect.Duration INT32U 读写 required 电容传感器滤波参数: 液面探测连续采样时间 +# Container%d.CapFlt.Average.Count INT32U 读写 电容传感器滤波参数: 平均值连续采样次数 +# Container%d.CapFlt.Average.Duration INT32U 读写 电容传感器滤波参数: 平均值连续采样时间 + +# Container%d.CapFlt.LiquidDetect.CheckHight INT32U 读写 二次探液面时Z抬起高度 +#------------------------------------------------------------------------------------------------------------------------ +#note: +# 定标点到上液面的过程可用于瓶盖穿刺 +# 参考电容的采集在Container%d.Top +#------------------------------------------------------------------------------------------------------------------------ +Container.Count=20 + +Container0.Label=板条 +Container0.Flag=0x00 +Container0.Top=8 +Container0.Bottom=13 +Container0.BottomExt=0 +Container0.Little=0 +Container0.Diameter=6.5 +Container0.CapFlt.Reference.Count=128 +Container0.CapFlt.LiquidDetect.Count=6 +Container0.CapFlt.Reference.Duration=20 +Container0.CapFlt.LiquidDetect.Duration=3 +Container0.CapCO.LiquidDetect=8000 + +Container1.Label=稀释位 +Container1.Flag=0x00 +Container1.Top=10 +Container1.Bottom=22.5 +Container1.BottomExt=1.5 +Container1.Little=-3.5 +Container1.Diameter=6.7 +Container1.CapFlt.Reference.Count=128 +Container1.CapFlt.LiquidDetect.Count=6 +Container1.CapFlt.Reference.Duration=20 +Container1.CapFlt.LiquidDetect.Duration=3 +Container1.CapFlt.LiquidDetect.CheckHight=6 +Container1.CapCO.LiquidDetect=6000 +Container1.CapCO.LiquidDetectCheck=6000 +Container1.CapCO.LiquidDetectClot=6000 + +Container2.Label=精度测试 +Container2.Flag=0x00 +Container2.Top=-5 +Container2.Bottom=23 +Container2.BottomExt=0 +Container2.Little=0 +Container2.Diameter=15 +Container2.CapFlt.Reference.Count=128 +Container2.CapFlt.LiquidDetect.Count=6 +Container2.CapFlt.Reference.Duration=20 +Container2.CapFlt.LiquidDetect.Duration=3 +Container2.CapCO.LiquidDetect=8000 + +Container3.Label=特殊洗液 +Container3.Flag=0x00 +Container3.Top=2 +Container3.Bottom=102 +Container3.BottomExt=0 +Container3.Little=0 +Container3.Diameter=45.5 +Container3.CapFlt.Reference.Count=128 +Container3.CapFlt.LiquidDetect.Count=6 +Container3.CapFlt.Reference.Duration=20 +Container3.CapFlt.LiquidDetect.Duration=3 +Container3.CapFlt.LiquidDetect.CheckHight=6 +Container3.CapCO.LiquidDetect=8000 +Container3.CapCO.LiquidDetectCheck=6000 +Container3.CapCO.LiquidDetectClot=6000 + +Container4.Label=试管 +Container4.Flag=0x00 +Container4.Top=-40 +Container4.Bottom=57 +Container4.BottomExt=1 +Container4.Little=-3 +Container4.Diameter=10.2 +Container4.CapFlt.Reference.Count=128 +Container4.CapFlt.LiquidDetect.Count=6 +Container4.CapFlt.Reference.Duration=20 +Container4.CapFlt.LiquidDetect.Duration=3 +Container4.CapFlt.LiquidDetect.CheckHight=6 +Container4.CapCO.LiquidDetect=8000 +Container4.CapCO.LiquidDetectCheck=6000 +Container4.CapCO.LiquidDetectClot=6000 + +Container5.Label=标准品 +Container5.Flag=0x00 +Container5.Top=19 +Container5.Bottom=38 +Container5.BottomExt=7 +Container5.Little=-2 +Container5.Diameter=7.6 +Container5.CapFlt.Reference.Count=128 +Container5.CapFlt.LiquidDetect.Count=6 +Container5.CapFlt.Reference.Duration=20 +Container5.CapFlt.LiquidDetect.Duration=3 +Container5.CapFlt.LiquidDetect.CheckHight=6 +Container5.CapCO.LiquidDetect=8000 +Container5.CapCO.LiquidDetectCheck=6000 +Container5.CapCO.LiquidDetectClot=6000 + +Container6.Label=废液孔 +Container6.Flag=0x00 +Container6.Top=0 +Container6.Bottom=57 +Container6.BottomExt=0 +Container6.Little=0 +Container6.Diameter=6.5 +Container6.CapFlt.Reference.Count=128 +Container6.CapFlt.LiquidDetect.Count=6 +Container6.CapFlt.Reference.Duration=20 +Container6.CapFlt.LiquidDetect.Duration=3 +Container6.CapCO.LiquidDetect=8000 + +Container7.Label=1.5ml离心管 +Container7.Flag=0x00 +Container7.Top=20 +Container7.Bottom=52.5 +Container7.BottomExt=5.5 +Container7.Little=-16 +Container7.Diameter=8.3 +Container7.CapFlt.Reference.Count=128 +Container7.CapFlt.LiquidDetect.Count=6 +Container7.CapFlt.Reference.Duration=20 +Container7.CapFlt.LiquidDetect.Duration=3 +Container7.CapFlt.LiquidDetect.CheckHight=6 +Container7.CapCO.LiquidDetect=4000 +Container7.CapCO.LiquidDetectCheck=4000 +Container7.CapCO.LiquidDetectClot=4000 + +Container8.Label=2.0ml离心管 +Container8.Flag=0x00 +Container8.Top=20 +Container8.Bottom=57 +Container8.BottomExt=1.0 +Container8.Little=-4.0 +Container8.Diameter=9.0 +Container8.CapFlt.Reference.Count=128 +Container8.CapFlt.LiquidDetect.Count=6 +Container8.CapFlt.Reference.Duration=20 +Container8.CapFlt.LiquidDetect.Duration=3 +Container8.CapFlt.LiquidDetect.CheckHight=6 +Container8.CapCO.LiquidDetect=6000 +Container8.CapCO.LiquidDetectCheck=6000 +Container8.CapCO.LiquidDetectClot=6000 + +Container9.Label=日立杯 +Container9.Flag=0x00 +Container9.Top=31 +Container9.Bottom=59 +Container9.BottomExt=0 +Container9.Little=-5 +Container9.Diameter=10.0 +Container9.CapFlt.Reference.Count=128 +Container9.CapFlt.LiquidDetect.Count=6 +Container9.CapFlt.Reference.Duration=20 +Container9.CapFlt.LiquidDetect.Duration=3 +Container9.CapFlt.LiquidDetect.CheckHight=6 +Container9.CapCO.LiquidDetect=6000 +Container9.CapCO.LiquidDetectCheck=6000 +Container9.CapCO.LiquidDetectClot=6000 + +Container10.Label=板条 +Container10.Flag=0x00 +Container10.Top=-3 +Container10.Bottom=13 +Container10.BottomExt=0 +Container10.Little=0 +Container10.Diameter=6.5 +Container10.CapFlt.Reference.Count=128 +Container10.CapFlt.LiquidDetect.Count=6 +Container10.CapFlt.Reference.Duration=20 +Container10.CapFlt.LiquidDetect.Duration=3 +Container10.CapCO.LiquidDetect=8000 + +Container11.Label=稀释位 +Container11.Flag=0x00 +Container11.Top=10 +Container11.Bottom=22.5 +Container11.BottomExt=1.5 +Container11.Little=-3.5 +Container11.Diameter=6.7 +Container11.CapFlt.Reference.Count=128 +Container11.CapFlt.LiquidDetect.Count=6 +Container11.CapFlt.Reference.Duration=20 +Container11.CapFlt.LiquidDetect.Duration=3 +Container11.CapFlt.LiquidDetect.CheckHight=6 +Container11.CapCO.LiquidDetect=6000 +Container11.CapCO.LiquidDetectCheck=6000 +Container11.CapCO.LiquidDetectClot=6000 + +Container12.Label=精度测试 +Container12.Flag=0x00 +Container12.Top=-5 +Container12.Bottom=23 +Container12.BottomExt=0 +Container12.Little=0 +Container12.Diameter=15 +Container12.CapFlt.Reference.Count=128 +Container12.CapFlt.LiquidDetect.Count=6 +Container12.CapFlt.Reference.Duration=20 +Container12.CapFlt.LiquidDetect.Duration=3 +Container12.CapCO.LiquidDetect=8000 + +Container13.Label=特殊洗液 +Container13.Flag=0x00 +Container13.Top=2 +Container13.Bottom=99 +Container13.BottomExt=0 +Container13.Little=0 +Container13.Diameter=45.5 +Container13.CapFlt.Reference.Count=128 +Container13.CapFlt.LiquidDetect.Count=6 +Container13.CapFlt.Reference.Duration=20 +Container13.CapFlt.LiquidDetect.Duration=3 +Container13.CapFlt.LiquidDetect.CheckHight=6 +Container13.CapCO.LiquidDetect=8000 +Container13.CapCO.LiquidDetectCheck=6000 +Container13.CapCO.LiquidDetectClot=6000 + +Container14.Label=R1 +Container14.Flag=0x00 +Container14.Top=48 +Container14.Bottom=107 +Container14.BottomExt=3 +Container14.Little=-2 +Container14.Diameter=15 +Container14.CapFlt.Reference.Count=128 +Container14.CapFlt.LiquidDetect.Count=6 +Container14.CapFlt.Reference.Duration=20 +Container14.CapFlt.LiquidDetect.Duration=3 +Container14.CapFlt.LiquidDetect.CheckHight=6 +Container14.CapCO.LiquidDetect=7000 +Container14.CapCO.LiquidDetectCheck=6000 +Container14.CapCO.LiquidDetectClot=6000 + +Container15.Label=R3 +Container15.Flag=0x00 +Container15.Top=48 +Container15.Bottom=106.5 +Container15.BottomExt=3.5 +Container15.Little=-2 +Container15.Diameter=25 +Container15.CapFlt.Reference.Count=128 +Container15.CapFlt.LiquidDetect.Count=6 +Container15.CapFlt.Reference.Duration=20 +Container15.CapFlt.LiquidDetect.Duration=3 +Container15.CapFlt.LiquidDetect.CheckHight=6 +Container15.CapCO.LiquidDetect=7000 +Container15.CapCO.LiquidDetectCheck=6000 +Container15.CapCO.LiquidDetectClot=6000 + +Container16.Label=废液孔 +Container16.Flag=0x00 +Container16.Top=0 +Container16.Bottom=57 +Container16.BottomExt=0 +Container16.Little=0 +Container16.Diameter=6.5 +Container16.CapFlt.Reference.Count=128 +Container16.CapFlt.LiquidDetect.Count=6 +Container16.CapFlt.Reference.Duration=20 +Container16.CapFlt.LiquidDetect.Duration=3 +Container16.CapCO.LiquidDetect=8000 + +Container17.Label=R2 +Container17.Flag=0x00 +Container17.Top=48 +Container17.Bottom=107 +Container17.BottomExt=3 +Container17.Little=-2 +Container17.Diameter=15 +Container17.CapFlt.Reference.Count=128 +Container17.CapFlt.LiquidDetect.Count=6 +Container17.CapFlt.Reference.Duration=20 +Container17.CapFlt.LiquidDetect.Duration=3 +Container17.CapFlt.LiquidDetect.CheckHight=6 +Container17.CapCO.LiquidDetect=7000 +Container17.CapCO.LiquidDetectCheck=6000 +Container17.CapCO.LiquidDetectClot=6000 + +Container18.Label=稀释液 +Container18.Flag=0x00 +Container18.Top=48 +Container18.Bottom=106.5 +Container18.BottomExt=3.5 +Container18.Little=-2 +Container18.Diameter=30 +Container18.CapFlt.Reference.Count=128 +Container18.CapFlt.LiquidDetect.Count=6 +Container18.CapFlt.Reference.Duration=20 +Container18.CapFlt.LiquidDetect.Duration=3 +Container18.CapFlt.LiquidDetect.CheckHight=6 +Container18.CapCO.LiquidDetect=7000 +Container18.CapCO.LiquidDetectCheck=6000 +Container18.CapCO.LiquidDetectClot=6000 + +Container19.Label=预留 +Container19.Flag=0x00 +Container19.Top=0 +Container19.Bottom=10 +Container19.BottomExt=0 +Container19.Little=0 +Container19.Diameter=10 +Container19.CapFlt.Reference.Count=128 +Container19.CapFlt.LiquidDetect.Count=6 +Container19.CapFlt.Reference.Duration=20 +Container19.CapFlt.LiquidDetect.Duration=3 +Container19.CapCO.LiquidDetect=8000 + +#2021.3.4 科美需求 +Container0.MixPos=0 +Container1.MixPos=0 +Container2.MixPos=0 +Container3.MixPos=0 +Container4.MixPos=0 +Container5.MixPos=0 +Container6.MixPos=0 +Container7.MixPos=0 +Container8.MixPos=0 +Container9.MixPos=0 +Container10.MixPos=0 +Container11.MixPos=0 +Container12.MixPos=0 +Container13.MixPos=0 +Container14.MixPos=0 +Container15.MixPos=0 +Container16.MixPos=0 +Container17.MixPos=0 +Container18.MixPos=0 +Container19.MixPos=0 \ No newline at end of file diff --git a/conf/0x1820_0x0000_container.conf.sig b/conf/0x1820_0x0000_container.conf.sig new file mode 100644 index 0000000..83b91ec --- /dev/null +++ b/conf/0x1820_0x0000_container.conf.sig @@ -0,0 +1 @@ +69687414f44dbda2921b381550d623226206bf1cd92aa1f3c0e9aaf40cb46660 0x1820_0x0000_container.conf diff --git a/conf/0x1820_0x0000_dispense.conf b/conf/0x1820_0x0000_dispense.conf new file mode 100644 index 0000000..a67c19e --- /dev/null +++ b/conf/0x1820_0x0000_dispense.conf @@ -0,0 +1,524 @@ +#----------------------------------------------------------------------------------------------------------------------- +# 属性名 权限 作用 +#----------------------------------------------------------------------------------------------------------------------- +# Method.Count 只读 加样配置总数 +# Method%d.Type 只读 加样配置类型, 0 加样, 1 吸废液, 2 反应杯, 为兼容旧版本配置文件, 本参数默认值为0 +# Method%d.Label 读写 加样配置名称 +# Method%d.Flag 读写 加样配置标志: +# bit0 : 1 表示一次打空所有液体 +# bit5,4: 0 使用容器上下液面, 1 使用内置参数, 2 使用路径参数 +# bit7,6: 0 使用定标点为坐标原点, 1 使用容器顶为坐标原点, 2 使用容器底为坐标原点 +# Method%d.PipetteId 读写 加样枪(或废液枪)索引号 +#----------------------------------------------------------------------------------------------------------------------- +# Method%d.Volume 读写 加样枪最大体积(ul) +# Method%d.Volume.UnitOver 读写 取液余量(ul) +# Method%d.Volume.UnitBack 读写 多吸一枪(ul) +# Method%d.Volume.MoveBack 读写 回吸体积(ul) +#----------------------------------------------------------------------------------------------------------------------- +# Method%d.Distance.ZDrawupDepth 读写 取液深度(毫米), 检测到液面开始取液前下探的附加深度 +# Method%d.Distance.ZDropBack 读写 预打高度(毫米), 将吸头内打回原容器时距离液面的高度 +# Method%d.Distance.LiquidHeightAdjust 读写 液面检测修正高度(毫米), 检测到液面后的修正值, 向下为正 +#----------------------------------------------------------------------------------------------------------------------- +# Method%d.Delay.DetectZUp 读写 检测到液面后枪提起之前的延迟(毫秒) +# Method%d.Delay.DrawupZDown 读写 检测到液面后枪再次下探取液之前的延迟(毫秒) +# Method%d.Delay.DrawupBefore 读写 取液前的延迟(毫秒) +# Method%d.Delay.DrawupZUp 读写 取液后枪提起之前的延迟(毫秒) +# Method%d.Delay.DrawupDispenseBack 读写 取液后打回前的延迟(毫秒) +# Method%d.Delay.DispenseBefore 读写 加样前的延迟(毫秒) +# Method%d.Delay.DispenseZUp 读写 加样后Z上抬前的延时(毫秒) +# Method%d.Delay.DispensePBack 读写 加样后活塞回吸前的延迟(毫秒) +# Method%d.Delay.DropPBack 读写 打废液后活塞回吸前的延迟(毫秒) +# Method%d.Delay.Reference 读写 采集参考压力前的延迟(毫秒) +# Method%d.Delay.DetectTipLiquid 读写 加样活塞回吸后检测吸头内负压的延迟(毫秒) +#----------------------------------------------------------------------------------------------------------------------- +# Method%d.Speed.MoveZ 读写 枪头带液体时Z的速度(p/sec, 1圈=3200p) +# Method%d.Speed.PunctureZ 读写 枪头穿刺时Z的速度(p/sec, 1圈=3200p) +# Method%d.Speed.DetectZ 读写 液面检测时Z的速度(p/sec, 1圈=3200p) +# Method%d.Speed.DetectP 读写 液面检测时P的速度(p/sec, 1圈=3200p) +# Method%d.Speed.DrawupP 读写 取液时P的速度(p/sec, 1圈=3200p) +# Method%d.Speed.DrawupZUp 读写 取液后枪提起Z的速度(p/sec, 1圈=3200p) +# Method%d.Speed.DispenseP 读写 加样时P的速度(p/sec, 1圈=3200P) +# Method%d.Speed.DispensePBack 读写 加样时P回吸的速度((p/sec, 1圈=3200p) +# Method%d.Speed.DispenseZUp 读写 加样(在下液面位置)后枪提起Z的速度(p/sec, 1圈=3200p) +# Method%d.Speed.WasteP 读写 打废液/打回时P的速度(p/sec, 1圈=3200P) +# Method%d.Speed.WastePBack 读写 打废液/打回时P回吸的速度(p/sec, 1圈=3200P) +# Method%d.Acceleration.MoveZ 读写 枪头带液体时Z的加速度(p/sec^2, 1圈=3200p) +# Method%d.Acceleration.DispenseP 读写 加样时P的加速度(p/sec^2, 1圈=3200p) +# Method%d.Acceleration.DispensePBack 读写 加样时P回吸的加速度(p/sec^2, 1圈=3200p) +# Method%d.Acceleration.WasteP 读写 打废液/打回时P的加速度(p/sec^2, 1圈=3200p) +# Method%d.Acceleration.WastePBack 读写 打废液/打回时P回吸的加速度(p/sec^2, 1圈=3200p) +#----------------------------------------------------------------------------------------------------------------------- + +Method.Count=19 + +Method0.Label=吸一打多(样本-25ul) +Method0.Flag=0x00 +Method0.Volume=255 +Method0.Volume.UnitOver=15 +Method0.Volume.UnitBack=25 +Method0.Volume.MoveBack=0 +Method0.Volume.AirGap=0 +Method0.Distance.ZDrawupDepth=1 +Method0.Distance.ZDropBack=4 +Method0.Delay.DrawupZUp=500 +Method0.Delay.DispenseZUp=500 +Method0.Delay.DispensePBack=50 +Method0.Speed.DetectZ=12800 +Method0.Acce.DetectZ=1000000 +Method0.Speed.DrawupP=9600 +Method0.Speed.DrawupZUp=3200 +Method0.Speed.DispenseP=32000 +Method0.Acceleration.DispenseP=3000000 +Method0.Speed.DispensePBack=12800 +Method0.Speed.DispenseZUp=6400 +Method0.Speed.WasteP=25600 +Method0.Acceleration.WasteP=880000 +Method0.Steps.Compensation=0.01 + + +Method1.Label=吸一打一(样本-5ul) +Method1.Flag=0x00 +Method1.Volume=255 +Method1.Volume.UnitOver=1 +Method1.Volume.UnitBack=0 +Method1.Volume.MoveBack=0 +Method1.Volume.AirGap=10 +Method1.Distance.ZDrawupDepth=1 +Method1.Distance.ZDropBack=4 +Method1.Delay.DrawupZUp=500 +Method1.Delay.DispenseZUp=500 +Method1.Delay.DispensePBack=0 +Method1.Speed.DetectZ=12800 +Method1.Acce.DetectZ=1000000 +Method1.Speed.DrawupP=6400 +Method1.Speed.DrawupZUp=3200 +Method1.Speed.DispenseP=32000 +Method1.Acceleration.DispenseP=3000000 +Method1.Speed.DispensePBack=12800 +Method1.Speed.DispenseZUp=3200 +Method1.Speed.WasteP=25600 +Method1.Acceleration.WasteP=880000 +Method1.Steps.Compensation=0.01 + +Method2.Label=吸一打多(试剂-25ul) +Method2.Flag=0x00 +Method2.Volume=300 +Method2.Volume.UnitOver=15 +Method2.Volume.UnitBack=25 +Method2.Volume.MoveBack=0 +Method2.Volume.AirGap=0 +Method2.Distance.ZDrawupDepth=1 +Method2.Distance.ZDropBack=4 +Method2.Delay.DrawupZUp=500 +Method2.Delay.DispenseZUp=200 +Method2.Delay.DispensePBack=200 +Method2.Speed.DetectZ=12800 +Method2.Acce.DetectZ=1000000 +Method2.Speed.DrawupP=4800 +Method2.Speed.DrawupZUp=3200 +Method2.Speed.DispenseP=16000 +Method2.Acceleration.DispenseP=3000000 +Method2.Speed.DispensePBack=12800 +Method2.Speed.DispenseZUp=6400 +Method2.Speed.WasteP=25600 +Method2.Acceleration.WasteP=880000 +Method2.Steps.Compensation=0.01 + + +Method3.Label=吸一打多(样本-校准品) +Method3.Flag=0x00 +Method3.Volume=255 +Method3.Volume.UnitOver=15 +Method3.Volume.UnitBack=25 +Method3.Volume.MoveBack=0 +Method3.Volume.AirGap=0 +Method3.Distance.ZDrawupDepth=1 +Method3.Distance.ZDropBack=4 +Method3.Delay.DrawupZUp=500 +Method3.Delay.DispenseZUp=500 +Method3.Delay.DispensePBack=50 +Method3.Speed.DetectZ=12800 +Method3.Acce.DetectZ=1000000 +Method3.Speed.DrawupP=9600 +Method3.Speed.DrawupZUp=3200 +Method3.Speed.DispenseP=32000 +Method3.Acceleration.DispenseP=3000000 +Method3.Speed.DispensePBack=12800 +Method3.Speed.DispenseZUp=6400 +Method3.Speed.WasteP=25600 +Method3.Acceleration.WasteP=880000 +Method3.Steps.Compensation=0.01 + + +Method4.Label=吸一打一(样本-下液面) +Method4.Flag=0x00 +Method4.Volume=255 +Method4.Volume.UnitOver=0 +Method4.Volume.UnitBack=0 +Method4.Volume.MoveBack=0 +Method4.Volume.AirGap=10 +Method4.Distance.ZDrawupDepth=1 +Method4.Distance.ZDropBack=4 +Method4.Delay.DrawupZUp=500 +Method4.Delay.DispenseZUp=500 +Method4.Delay.DispensePBack=0 +Method4.Speed.DetectZ=12800 +Method4.Acce.DetectZ=1000000 +Method4.Speed.DrawupP=6400 +Method4.Speed.DrawupZUp=3200 +Method4.Speed.DispenseP=6400 +Method4.Acceleration.DispenseP=128000 +Method4.Speed.DispensePBack=12800 +Method4.Speed.DispenseZUp=3200 +Method4.Speed.WasteP=25600 +Method4.Acceleration.WasteP=880000 +Method4.Steps.Compensation=0.01 + +Method5.Label=吸一打多(样本-10ul) +Method5.Flag=0x00 +Method5.Volume=255 +Method5.Volume.UnitOver=10 +Method5.Volume.UnitBack=10 +Method5.Volume.MoveBack=0 +Method5.Volume.AirGap=0 +Method5.Distance.ZDrawupDepth=1 +Method5.Distance.ZDropBack=4 +Method5.Delay.DrawupZUp=500 +Method5.Delay.DispenseZUp=500 +Method5.Delay.DispensePBack=50 +Method5.Speed.DetectZ=12800 +Method5.Acce.DetectZ=1000000 +Method5.Speed.DrawupP=9600 +Method5.Speed.DrawupZUp=3200 +Method5.Speed.DispenseP=32000 +Method5.Acceleration.DispenseP=5000000 +Method5.Speed.DispensePBack=12800 +Method5.Speed.DispenseZUp=6400 +Method5.Speed.WasteP=25600 +Method5.Acceleration.WasteP=880000 +Method5.Steps.Compensation=0.02 + + +Method6.Label=吸一打一(样本-10ul) +Method6.Flag=0x00 +Method6.Volume=255 +Method6.Volume.UnitOver=1.5 +Method6.Volume.UnitBack=0 +Method6.Volume.MoveBack=0 +Method6.Volume.AirGap=10 +Method6.Distance.ZDrawupDepth=1 +Method6.Distance.ZDropBack=4 +Method6.Delay.DrawupZUp=500 +Method6.Delay.DispenseZUp=500 +Method6.Delay.DispensePBack=0 +Method6.Speed.DetectZ=12800 +Method6.Acce.DetectZ=1000000 +Method6.Speed.DrawupP=6400 +Method6.Speed.DrawupZUp=3200 +Method6.Speed.DispenseP=32000 +Method6.Acceleration.DispenseP=3000000 +Method6.Speed.DispensePBack=12800 +Method6.Speed.DispenseZUp=3200 +Method6.Speed.WasteP=25600 +Method6.Acceleration.WasteP=880000 +Method6.Steps.Compensation=0.0 + + +Method7.Label=吸一打一(样本-25ul) +Method7.Flag=0x00 +Method7.Volume=255 +Method7.Volume.UnitOver=2.0 +Method7.Volume.UnitBack=0 +Method7.Volume.MoveBack=0 +Method7.Volume.AirGap=10 +Method7.Distance.ZDrawupDepth=1 +Method7.Distance.ZDropBack=4 +Method7.Delay.DrawupZUp=500 +Method7.Delay.DispenseZUp=500 +Method7.Delay.DispensePBack=0 +Method7.Speed.DetectZ=12800 +Method7.Acce.DetectZ=1000000 +Method7.Speed.DrawupP=6400 +Method7.Speed.DrawupZUp=3200 +Method7.Speed.DispenseP=32000 +Method7.Acceleration.DispenseP=3000000 +Method7.Speed.DispensePBack=12800 +Method7.Speed.DispenseZUp=3200 +Method7.Speed.WasteP=25600 +Method7.Acceleration.WasteP=880000 +Method7.Steps.Compensation=0.0 + + +Method8.Label=吸一打一(样本-200ul) +Method8.Flag=0x00 +Method8.Volume=255 +Method8.Volume.UnitOver=2 +Method8.Volume.UnitBack=0 +Method8.Volume.MoveBack=0 +Method8.Volume.AirGap=10 +Method8.Distance.ZDrawupDepth=1 +Method8.Distance.ZDropBack=4 +Method8.Delay.DrawupZUp=500 +Method8.Delay.DispenseZUp=500 +Method8.Delay.DispensePBack=0 +Method8.Speed.DetectZ=12800 +Method8.Acce.DetectZ=1000000 +Method8.Speed.DrawupP=6400 +Method8.Speed.DrawupZUp=3200 +Method8.Speed.DispenseP=32000 +Method8.Acceleration.DispenseP=3000000 +Method8.Speed.DispensePBack=12800 +Method8.Speed.DispenseZUp=3200 +Method8.Speed.WasteP=25600 +Method8.Acceleration.WasteP=880000 +Method8.Steps.Compensation=0.0 + + +Method9.Label=吸一打一(试剂-5ul) +Method9.Flag=0x00 +Method9.Volume=300 +Method9.Volume.UnitOver=1 +Method9.Volume.UnitBack=0 +Method9.Volume.MoveBack=0 +Method9.Volume.AirGap=10 +Method9.Distance.ZDrawupDepth=1 +Method9.Distance.ZDropBack=4 +Method9.Delay.DrawupZUp=200 +Method9.Delay.DispenseZUp=200 +Method9.Delay.DispensePBack=200 +Method9.Speed.DetectZ=12800 +Method9.Acce.DetectZ=1000000 +Method9.Speed.DrawupP=4800 +Method9.Speed.DrawupZUp=3200 +Method9.Speed.DispenseP=20000 +Method9.Acceleration.DispenseP=3000000 +Method9.Speed.DispensePBack=12800 +Method9.Speed.DispenseZUp=3200 +Method9.Speed.WasteP=25600 +Method9.Acceleration.WasteP=880000 +Method9.Steps.Compensation=0.01 + + +Method10.Label=吸一打多(样本-5ul) +Method10.Flag=0x00 +Method10.Volume=255 +Method10.Volume.UnitOver=10 +Method10.Volume.UnitBack=5 +Method10.Volume.MoveBack=0 +Method10.Volume.AirGap=0 +Method10.Distance.ZDrawupDepth=1 +Method10.Distance.ZDropBack=4 +Method10.Delay.DrawupZUp=500 +Method10.Delay.DispenseZUp=500 +Method10.Delay.DispensePBack=50 +Method10.Speed.DetectZ=12800 +Method10.Acce.DetectZ=1000000 +Method10.Speed.DrawupP=9600 +Method10.Speed.DrawupZUp=3200 +Method10.Speed.DispenseP=32000 +Method10.Acceleration.DispenseP=5000000 +Method10.Speed.DispensePBack=12800 +Method10.Speed.DispenseZUp=6400 +Method10.Speed.WasteP=25600 +Method10.Acceleration.WasteP=880000 +Method10.Steps.Compensation=0.02 + + +Method11.Label=吸一打多(试剂-15ul) +Method11.Flag=0x00 +Method11.Volume=300 +Method11.Volume.UnitOver=10 +Method11.Volume.UnitBack=15 +Method11.Volume.MoveBack=0 +Method11.Volume.AirGap=0 +Method11.Distance.ZDrawupDepth=1 +Method11.Distance.ZDropBack=4 +Method11.Delay.DrawupZUp=500 +Method11.Delay.DispenseZUp=200 +Method11.Delay.DispensePBack=200 +Method11.Speed.DetectZ=12800 +Method11.Acce.DetectZ=1000000 +Method11.Speed.DrawupP=4800 +Method11.Speed.DrawupZUp=3200 +Method11.Speed.DispenseP=16000 +Method11.Acceleration.DispenseP=3000000 +Method11.Speed.DispensePBack=12800 +Method11.Speed.DispenseZUp=6400 +Method11.Speed.WasteP=25600 +Method11.Acceleration.WasteP=880000 +Method11.Steps.Compensation=0.015 + + +Method12.Label=吸一打一(试剂-15ul) +Method12.Flag=0x00 +Method12.Volume=300 +Method12.Volume.UnitOver=2 +Method12.Volume.UnitBack=0 +Method12.Volume.MoveBack=0 +Method12.Volume.AirGap=10 +Method12.Distance.ZDrawupDepth=1 +Method12.Distance.ZDropBack=4 +Method12.Delay.DrawupZUp=200 +Method12.Delay.DispenseZUp=200 +Method12.Delay.DispensePBack=200 +Method12.Speed.DetectZ=12800 +Method12.Acce.DetectZ=1000000 +Method12.Speed.DrawupP=4800 +Method12.Speed.DrawupZUp=3200 +Method12.Speed.DispenseP=20000 +Method12.Acceleration.DispenseP=3000000 +Method12.Speed.DispensePBack=12800 +Method12.Speed.DispenseZUp=3200 +Method12.Speed.WasteP=25600 +Method12.Acceleration.WasteP=880000 +Method12.Steps.Compensation=0.0 + + +Method13.Label=吸一打一(试剂-25ul) +Method13.Flag=0x00 +Method13.Volume=300 +Method13.Volume.UnitOver=2 +Method13.Volume.UnitBack=0 +Method13.Volume.MoveBack=0 +Method13.Volume.AirGap=10 +Method13.Distance.ZDrawupDepth=1 +Method13.Distance.ZDropBack=4 +Method13.Delay.DrawupZUp=200 +Method13.Delay.DispenseZUp=200 +Method13.Delay.DispensePBack=200 +Method13.Speed.DetectZ=12800 +Method13.Acce.DetectZ=1000000 +Method13.Speed.DrawupP=4800 +Method13.Speed.DrawupZUp=3200 +Method13.Speed.DispenseP=20000 +Method13.Acceleration.DispenseP=3000000 +Method13.Speed.DispensePBack=12800 +Method13.Speed.DispenseZUp=3200 +Method13.Speed.WasteP=25600 +Method13.Acceleration.WasteP=880000 +Method13.Steps.Compensation=0.0 + + +Method14.Label=吸一打一(试剂-50ul) +Method14.Flag=0x00 +Method14.Volume=300 +Method14.Volume.UnitOver=2 +Method14.Volume.UnitBack=0 +Method14.Volume.MoveBack=0 +Method14.Volume.AirGap=10 +Method14.Distance.ZDrawupDepth=1 +Method14.Distance.ZDropBack=4 +Method14.Delay.DrawupZUp=200 +Method14.Delay.DispenseZUp=200 +Method14.Delay.DispensePBack=200 +Method14.Speed.DetectZ=12800 +Method14.Acce.DetectZ=1000000 +Method14.Speed.DrawupP=4800 +Method14.Speed.DrawupZUp=3200 +Method14.Speed.DispenseP=20000 +Method14.Acceleration.DispenseP=3000000 +Method14.Speed.DispensePBack=12800 +Method14.Speed.DispenseZUp=3200 +Method14.Speed.WasteP=25600 +Method14.Acceleration.WasteP=880000 +Method14.Steps.Compensation=0.0 + + +Method15.Label=吸一打一(试剂-100ul) +Method15.Flag=0x00 +Method15.Volume=300 +Method15.Volume.UnitOver=2 +Method15.Volume.UnitBack=0 +Method15.Volume.MoveBack=0 +Method15.Volume.AirGap=10 +Method15.Distance.ZDrawupDepth=1 +Method15.Distance.ZDropBack=4 +Method15.Delay.DrawupZUp=200 +Method15.Delay.DispenseZUp=200 +Method15.Delay.DispensePBack=200 +Method15.Speed.DetectZ=12800 +Method15.Acce.DetectZ=1000000 +Method15.Speed.DrawupP=4800 +Method15.Speed.DrawupZUp=3200 +Method15.Speed.DispenseP=20000 +Method15.Acceleration.DispenseP=3000000 +Method15.Speed.DispensePBack=12800 +Method15.Speed.DispenseZUp=3200 +Method15.Speed.WasteP=25600 +Method15.Acceleration.WasteP=880000 +Method15.Steps.Compensation=0.0 + + +Method16.Label=吸一打多(试剂-50ul) +Method16.Flag=0x00 +Method16.Volume=300 +Method16.Volume.UnitOver=15 +Method16.Volume.UnitBack=25 +Method16.Volume.MoveBack=0 +Method16.Volume.AirGap=0 +Method16.Distance.ZDrawupDepth=1 +Method16.Distance.ZDropBack=4 +Method16.Delay.DrawupZUp=500 +Method16.Delay.DispenseZUp=200 +Method16.Delay.DispensePBack=200 +Method16.Speed.DetectZ=12800 +Method16.Acce.DetectZ=1000000 +Method16.Speed.DrawupP=4800 +Method16.Speed.DrawupZUp=3200 +Method16.Speed.DispenseP=16000 +Method16.Acceleration.DispenseP=3000000 +Method16.Speed.DispensePBack=12800 +Method16.Speed.DispenseZUp=6400 +Method16.Speed.WasteP=25600 +Method16.Acceleration.WasteP=880000 +Method16.Steps.Compensation=0.005 + + +Method17.Label=吸一打多(试剂-100ul) +Method17.Flag=0x00 +Method17.Volume=300 +Method17.Volume.UnitOver=15 +Method17.Volume.UnitBack=25 +Method17.Volume.MoveBack=0 +Method17.Volume.AirGap=0 +Method17.Distance.ZDrawupDepth=1 +Method17.Distance.ZDropBack=4 +Method17.Delay.DrawupZUp=500 +Method17.Delay.DispenseZUp=200 +Method17.Delay.DispensePBack=200 +Method17.Speed.DetectZ=12800 +Method17.Acce.DetectZ=1000000 +Method17.Speed.DrawupP=4800 +Method17.Speed.DrawupZUp=3200 +Method17.Speed.DispenseP=16000 +Method17.Acceleration.DispenseP=3000000 +Method17.Speed.DispensePBack=12800 +Method17.Speed.DispenseZUp=6400 +Method17.Speed.WasteP=25600 +Method17.Acceleration.WasteP=880000 +Method17.Steps.Compensation=0.005 + + +Method18.Label=吸一打一(试剂-200ul) +Method18.Flag=0x00 +Method18.Volume=300 +Method18.Volume.UnitOver=2 +Method18.Volume.UnitBack=0 +Method18.Volume.MoveBack=0 +Method18.Volume.AirGap=10 +Method18.Distance.ZDrawupDepth=1 +Method18.Distance.ZDropBack=4 +Method18.Delay.DrawupZUp=200 +Method18.Delay.DispenseZUp=200 +Method18.Delay.DispensePBack=200 +Method18.Speed.DetectZ=12800 +Method18.Acce.DetectZ=1000000 +Method18.Speed.DrawupP=4800 +Method18.Speed.DrawupZUp=3200 +Method18.Speed.DispenseP=20000 +Method18.Acceleration.DispenseP=3000000 +Method18.Speed.DispensePBack=12800 +Method18.Speed.DispenseZUp=3200 +Method18.Speed.WasteP=25600 +Method18.Acceleration.WasteP=880000 +Method18.Steps.Compensation=0.01 \ No newline at end of file diff --git a/conf/0x1820_0x0000_dispense.conf.sig b/conf/0x1820_0x0000_dispense.conf.sig new file mode 100644 index 0000000..a6cec4e --- /dev/null +++ b/conf/0x1820_0x0000_dispense.conf.sig @@ -0,0 +1 @@ +c1ec6e0de6c07bbdeba80f7c3dd482ed48f4d72f694ceb48439c092b8c1ff6f9 0x1820_0x0000_dispense.conf diff --git a/conf/0x1820_0x0000_module.conf b/conf/0x1820_0x0000_module.conf new file mode 100644 index 0000000..2bd8da8 --- /dev/null +++ b/conf/0x1820_0x0000_module.conf @@ -0,0 +1,41 @@ +#----------------------------------------------------------------------------------------------------------------------- +# 属性名 权限 作用 +#----------------------------------------------------------------------------------------------------------------------- +# Module.Name 只读 模块名称 +# Module.Config.Arm%d.ResetMode 只读 上电自动机械复位模式: none/safe/normal, 分别表示不复位/仅复位XYZ/复位并洗针 +# 默认不复位 +# Module.Channel.Select 只读 每个通道使用的适配器通道低位, 每位表示一个通道, 与Module.Channel.SelectHigh组合, 0表示使用CAN1或UART0, 1表示使用CAN2或UART1, 2表示使用CAN3或者UART2... +# Module.Channel.SelectHigh 只读 每个通道使用的适配器通道高位, 每位表示一个通道, 详见Module.Channel.Select +# Module.Channel.SelectUART 只读 每个通道使用的适配器类型, 每位表示一个通道, bit0为0表示使用CAN, 为1表示使用UART, ... +# Module.Channel.FixedMask 只读 每个通道是否使用固定地址 +# Module.Channel.FixedAddr%d 只读 每个通道的固定地址(仅在Module.Channel.FixedMask的该通道相应位为1时有效) +#----------------------------------------------------------------------------------------------------------------------- + +Module.Config.Arm0.ResetMode=safe +Module.Config.Arm1.ResetMode=safe + +Module.Name=双臂加样 +#低8bit是8个通道的电机全部CAN2, bit8:液路tx1 bit9:样本tx2 bit10:试剂tx3 101 110 +Module.Channel.Select=0x05ff +Module.Channel.SelectHigh=0x0600 +Module.Channel.SelectUART=0x0700 + +Module.Channel.FixedMask=0x08ff +#left x +Module.Channel.FixedAddr0=0x40 +#left y +Module.Channel.FixedAddr1=0x01 +#left z +Module.Channel.FixedAddr2=0x04 +#left p +Module.Channel.FixedAddr3=0x08 +#right x +Module.Channel.FixedAddr4=0x80 +#right y +Module.Channel.FixedAddr5=0x02 +#right z +Module.Channel.FixedAddr6=0x10 +#right p +Module.Channel.FixedAddr7=0x20 +#right reagent +Module.Channel.FixedAddr11=0x10 diff --git a/conf/0x1820_0x0000_module.conf.sig b/conf/0x1820_0x0000_module.conf.sig new file mode 100644 index 0000000..a59701b --- /dev/null +++ b/conf/0x1820_0x0000_module.conf.sig @@ -0,0 +1 @@ +6115e5a3a361ff8ad37d2dda586dc21f5c23e797fe9bb89527781b664e41d76a 0x1820_0x0000_module.conf diff --git a/conf/0x1820_0x0000_motor.conf b/conf/0x1820_0x0000_motor.conf new file mode 100644 index 0000000..4924617 --- /dev/null +++ b/conf/0x1820_0x0000_motor.conf @@ -0,0 +1,272 @@ +#----------------------------------------------------------------------------------------------------------------------- +# 属性名 权限 作用 默认值 +#----------------------------------------------------------------------------------------------------------------------- +# Motor%d.Config.MicroStep 只读 细分数: 1, 2, 4, 8, 16 8 +# Motor%d.Config.ProtectByBus 只读 是否处理来自数据总线的防撞保护信号(0不处理/1处理) 0 +# Motor%d.Config.StopKeyEnabled 只读 是否启用紧停按钮信号(0不启用/1启用) 0 +# Motor%d.Config.EmmrEnabled 只读 是否启用防撞保护传感器(0不启用/1启用) 0 +# Motor%d.Config.EmmrTriggerLevel 只读 防撞保护传感器触发电平, 0低触发/1高触发 0 +# Motor%d.Config.Rotate 只读 是否旋转自由度(越过最大坐标可回到零点)(0否/1是) 0 +# Motor%d.Config.ZeroSwitch 只读 零位传感器是否具备开关 0 +# Motor%d.Config.ZeroEna 只读 零位传感器使能电平 0 +# Motor%d.Config.ZeroTriggerLevel 只读 零位传感器触发电平, 0低触发/1高触发 0 +# Motor%d.Config.MotorEnableLevel 只读 电机使能电平, 0低使能/1高使能 0 +# Motor%d.Config.MotorCurrent 只读 电机全电流电平 0 +# Motor%d.Config.MotorClockEdge 只读 电机时钟驱动的边沿, 0负边沿/1正边沿 0 +# Motor%d.Config.MotorForwardLevel 只读 电机正方向电平, 0低电平/1高电平 0 + +# Motor%d.DistPerRound 只读 电机每圈行程(毫米) 0 +# Motor%d.Direction 只读 电机正方向的运动方向: North/South/West/East/Up/Down +# Motor%d.Config.Coordinate.Zero 只读 电机零位逻辑坐标(p, 1圈=3200p) 40 +# Motor%d.Config.Coordinate.Limit 读写 电机最大行程(p, 1圈=3200p) 24000 +# Motor%d.Config.LostStepLimit.Forward 读写 电机正向最大允许失步(p, 1圈=3200p) 16 +# Motor%d.Config.LostStepLimit.Reverse 读写 电机反向最大允许失步(p, 1圈=3200p) 16 +# Motor%d.Default.Move.SpeedMax 读写 电机运动默认速度(p/sec, 1圈=3200p) 3200 +# Motor%d.Default.Move.Acceleration 读写 电机运动默认加速度(p/sec^2, 1圈=3200p) 3200 +# Motor%d.Default.Reset.SpeedMax 读写 电机复位默认速度(p/sec, 1圈=3200p) 3200 +# Motor%d.Default.Reset.Acceleration 读写 电机复位默认加速度(p/sec^2, 1圈=3200p) 3200 +#----------------------------------------------------------------------------------------------------------------------- +# left - X +Motor0.DesId=0x0201 +Motor0.Config.MicroStep=16 +Motor0.Config.ProtectByBus=1 +Motor0.Config.StopKeyEnabled=1 +Motor0.Config.EmmrEnabled=0 +Motor0.Config.EmmrTriggerLevel=0 +Motor0.Config.Rotate=0 +Motor0.Config.ZeroSwitch=0 +Motor0.Config.ZeroEna=0 +Motor0.Config.ZeroTriggerLevel=0 +Motor0.Config.MotorEnableLevel=1 +Motor0.Config.MotorCurrent=0 +Motor0.Config.MotorClockEdge=0 +Motor0.Config.MotorForwardLevel=1 +Motor0.Config.Coordinate.Zero=107 +Motor0.Config.Coordinate.Limit=18904 +Motor0.Config.LostStepLimit.Forward=16 +Motor0.Config.LostStepLimit.Reverse=16 +Motor0.DistPerRound=135 +Motor0.Direction=West +Motor0.Default.Move.SpeedMax=25600 +Motor0.Default.Move.Acceleration=25600 +Motor0.Default.Reset.SpeedMax=20000 +Motor0.Default.Reset.Acceleration=20000 + +# left - Y +Motor1.DesId=0x0204 +Motor1.Config.MicroStep=16 +Motor1.Config.ProtectByBus=1 +Motor1.Config.StopKeyEnabled=1 +Motor1.Config.EmmrEnabled=0 +Motor1.Config.EmmrTriggerLevel=0 +Motor1.Config.Rotate=0 +Motor1.Config.ZeroSwitch=0 +Motor1.Config.ZeroEna=0 +Motor1.Config.ZeroTriggerLevel=1 +Motor1.Config.MotorEnableLevel=1 +Motor1.Config.MotorCurrent=0 +Motor1.Config.MotorClockEdge=0 +Motor1.Config.MotorForwardLevel=0 +Motor1.Config.Coordinate.Zero=142 +Motor1.Config.Coordinate.Limit=22542 +Motor1.Config.LostStepLimit.Forward=32 +Motor1.Config.LostStepLimit.Reverse=32 +Motor1.DistPerRound=45 +Motor1.Direction=South +Motor1.Default.Move.SpeedMax=25600 +Motor1.Default.Move.Acceleration=192000 +Motor1.Default.Reset.SpeedMax=26667 +Motor1.Default.Reset.Acceleration=70000 + +# left - Z +Motor2.DesId=0x0208 +Motor2.Config.MicroStep=16 +Motor2.Config.ProtectByBus=1 +Motor2.Config.StopKeyEnabled=1 +Motor2.Config.EmmrEnabled=0 +Motor2.Config.EmmrTriggerLevel=0 +Motor2.Config.Rotate=0 +Motor2.Config.ZeroSwitch=0 +Motor2.Config.ZeroEna=0 +Motor2.Config.ZeroTriggerLevel=1 +Motor2.Config.MotorEnableLevel=1 +Motor2.Config.MotorCurrent=0 +Motor2.Config.MotorClockEdge=0 +Motor2.Config.MotorForwardLevel=0 +Motor2.Config.Coordinate.Zero=131 +Motor2.Config.Coordinate.Limit=11836 +Motor2.Config.LostStepLimit.Forward=40 +Motor2.Config.LostStepLimit.Reverse=40 +Motor2.DistPerRound=36.576 +Motor2.Direction=Down +Motor2.Default.Move.SpeedMax=25600 +Motor2.Default.Move.Acceleration=256000 +Motor2.Default.Reset.SpeedMax=26667 +Motor2.Default.Reset.Acceleration=100000 + +# left - P +Motor3.DesId=0x0202 +Motor3.Config.MicroStep=16 +Motor3.Config.ProtectByBus=1 +Motor3.Config.StopKeyEnabled=1 +Motor3.Config.EmmrEnabled=0 +Motor3.Config.EmmrTriggerLevel=0 +Motor3.Config.Rotate=0 +Motor3.Config.ZeroSwitch=0 +Motor3.Config.ZeroEna=1 +Motor3.Config.ZeroTriggerLevel=1 +Motor3.Config.MotorEnableLevel=1 +Motor3.Config.MotorCurrent=0 +Motor3.Config.MotorClockEdge=0 +Motor3.Config.MotorForwardLevel=1 +Motor3.Config.Coordinate.Zero=300 +Motor3.Config.Coordinate.Limit=32640 +Motor3.Config.LostStepLimit.Forward=300 +Motor3.Config.LostStepLimit.Reverse=300 +Motor3.DistPerRound=1.27 +Motor3.Direction=Down +Motor3.Default.Move.SpeedMax=25600 +Motor3.Default.Move.Acceleration=102400 +Motor3.Default.Reset.SpeedMax=12800 +Motor3.Default.Reset.Acceleration=51200 + +# right - X +Motor4.DesId=0x0210 +Motor4.Config.MicroStep=16 +Motor4.Config.ProtectByBus=1 +Motor4.Config.StopKeyEnabled=1 +Motor4.Config.EmmrEnabled=0 +Motor4.Config.EmmrTriggerLevel=0 +Motor4.Config.Rotate=0 +Motor4.Config.ZeroSwitch=0 +Motor4.Config.ZeroEna=1 +Motor4.Config.ZeroTriggerLevel=0 +Motor4.Config.MotorEnableLevel=1 +Motor4.Config.MotorCurrent=0 +Motor4.Config.MotorClockEdge=0 +Motor4.Config.MotorForwardLevel=0 +Motor4.Config.Coordinate.Zero=107 +Motor4.Config.Coordinate.Limit=21700 +Motor4.Config.LostStepLimit.Forward=16 +Motor4.Config.LostStepLimit.Reverse=16 +Motor4.DistPerRound=135 +Motor4.Direction=West +Motor4.Default.Move.SpeedMax=25600 +Motor4.Default.Move.Acceleration=25600 +Motor4.Default.Reset.SpeedMax=20000 +Motor4.Default.Reset.Acceleration=20000 + +# right - Y +Motor5.DesId=0x0220 +Motor5.Config.MicroStep=16 +Motor5.Config.ProtectByBus=1 +Motor5.Config.StopKeyEnabled=1 +Motor5.Config.EmmrEnabled=0 +Motor5.Config.EmmrTriggerLevel=0 +Motor5.Config.Rotate=0 +Motor5.Config.ZeroSwitch=0 +Motor5.Config.ZeroEna=0 +Motor5.Config.ZeroTriggerLevel=1 +Motor5.Config.MotorEnableLevel=1 +Motor5.Config.MotorCurrent=0 +Motor5.Config.MotorClockEdge=0 +Motor5.Config.MotorForwardLevel=0 +Motor5.Config.Coordinate.Zero=142 +Motor5.Config.Coordinate.Limit=22542 +Motor5.Config.LostStepLimit.Forward=32 +Motor5.Config.LostStepLimit.Reverse=32 +Motor5.DistPerRound=45 +Motor5.Direction=South +Motor5.Default.Move.SpeedMax=25600 +Motor5.Default.Move.Acceleration=192000 +Motor5.Default.Reset.SpeedMax=26667 +Motor5.Default.Reset.Acceleration=70000 + +# right - Z +Motor6.DesId=0x0240 +Motor6.Config.MicroStep=16 +Motor6.Config.ProtectByBus=1 +Motor6.Config.StopKeyEnabled=1 +Motor6.Config.EmmrEnabled=0 +Motor6.Config.EmmrTriggerLevel=0 +Motor6.Config.Rotate=0 +Motor6.Config.ZeroSwitch=0 +Motor6.Config.ZeroEna=0 +Motor6.Config.ZeroTriggerLevel=1 +Motor6.Config.MotorEnableLevel=1 +Motor6.Config.MotorCurrent=0 +Motor6.Config.MotorClockEdge=0 +Motor6.Config.MotorForwardLevel=0 +Motor6.Config.Coordinate.Zero=131 +Motor6.Config.Coordinate.Limit=11297 +Motor6.Config.LostStepLimit.Forward=40 +Motor6.Config.LostStepLimit.Reverse=40 +Motor6.DistPerRound=36.576 +Motor6.Direction=Down +Motor6.Default.Move.SpeedMax=25600 +Motor6.Default.Move.Acceleration=256000 +Motor6.Default.Reset.SpeedMax=26667 +Motor6.Default.Reset.Acceleration=100000 + +# right - P +Motor7.DesId=0x0240 +Motor7.Config.MicroStep=16 +Motor7.Config.ProtectByBus=1 +Motor7.Config.StopKeyEnabled=1 +Motor7.Config.EmmrEnabled=0 +Motor7.Config.EmmrTriggerLevel=0 +Motor7.Config.Rotate=0 +Motor7.Config.ZeroSwitch=0 +Motor7.Config.ZeroEna=0 +Motor7.Config.ZeroTriggerLevel=1 +Motor7.Config.MotorEnableLevel=1 +Motor7.Config.MotorCurrent=0 +Motor7.Config.MotorClockEdge=0 +Motor7.Config.MotorForwardLevel=1 +Motor7.Config.Coordinate.Zero=300 +Motor7.Config.Coordinate.Limit=32640 +Motor7.Config.LostStepLimit.Forward=300 +Motor7.Config.LostStepLimit.Reverse=300 +Motor7.DistPerRound=1.27 +Motor7.Direction=Down +Motor7.Default.Move.SpeedMax=25600 +Motor7.Default.Move.Acceleration=102400 +Motor7.Default.Reset.SpeedMax=12800 +Motor7.Default.Reset.Acceleration=51200 + +#liquid +Motor8.Config.PressureChCnt=0 + +#left capacity liquid level detecter +Motor9.Config.PressureChCnt=1 +Motor9.Config.CapEnabled=1 + +#right capacity liquid level detecter +Motor10.Config.PressureChCnt=1 +Motor10.Config.CapEnabled=1 + +# right - 试剂盘R +Motor11.DesId=0x0240 +Motor11.Config.MicroStep=16 +Motor11.Config.ProtectByBus=0 +Motor11.Config.StopKeyEnabled=1 +Motor11.Config.EmmrEnabled=0 +Motor11.Config.EmmrTriggerLevel=0 +Motor11.Config.Rotate=1 +Motor11.Config.ZeroSwitch=0 +Motor11.Config.ZeroEna=0 +Motor11.Config.ZeroTriggerLevel=1 +Motor11.Config.MotorEnableLevel=1 +Motor11.Config.MotorCurrent=0 +Motor11.Config.MotorClockEdge=0 +Motor11.Config.MotorForwardLevel=1 +Motor11.Config.Coordinate.Zero=300 +Motor11.Config.Coordinate.Limit=57600 +Motor11.Config.LostStepLimit.Forward=135 +Motor11.Config.LostStepLimit.Reverse=135 +Motor11.DistPerRound=1.27 +Motor11.Direction=Down +Motor11.Default.Move.SpeedMax=20000 +Motor11.Default.Move.Acceleration=80000 +Motor11.Default.Reset.SpeedMax=20000 +Motor11.Default.Reset.Acceleration=80000 \ No newline at end of file diff --git a/conf/0x1820_0x0000_motor.conf.sig b/conf/0x1820_0x0000_motor.conf.sig new file mode 100644 index 0000000..3d9eeab --- /dev/null +++ b/conf/0x1820_0x0000_motor.conf.sig @@ -0,0 +1 @@ +ce774bf8d064ad6248494928b077c6600e144e52c50cb04450648383db6a0047 0x1820_0x0000_motor.conf diff --git a/conf/0x1820_0x0000_panel.01aad22119000048.conf b/conf/0x1820_0x0000_panel.01aad22119000048.conf new file mode 100644 index 0000000..283de2b --- /dev/null +++ b/conf/0x1820_0x0000_panel.01aad22119000048.conf @@ -0,0 +1,171 @@ +Panel0.Pipette0.Coordinate0.x=8247 +Panel0.Pipette0.Coordinate0.y=1490 +Panel0.Pipette0.Coordinate0.z=0 +Panel0.Pipette0.Coordinate1.x=8245 +Panel0.Pipette0.Coordinate1.y=2640 +Panel0.Pipette0.Coordinate1.z=0 +Panel0.Pipette0.Coordinate2.x=8247 +Panel0.Pipette0.Coordinate2.y=1490 +Panel0.Pipette0.Coordinate2.z=0 +Panel10.Pipette1.Coordinate0.x=1545 +Panel10.Pipette1.Coordinate0.y=1440 +Panel10.Pipette1.Coordinate0.z=0 +Panel10.Pipette1.Coordinate1.x=1780 +Panel10.Pipette1.Coordinate1.y=2150 +Panel10.Pipette1.Coordinate1.z=0 +Panel10.Pipette1.Coordinate2.x=1545 +Panel10.Pipette1.Coordinate2.y=1440 +Panel10.Pipette1.Coordinate2.z=0 +Panel8.Pipette0.Coordinate0.x=505 +Panel8.Pipette0.Coordinate0.y=420 +Panel8.Pipette0.Coordinate0.z=0 +Panel8.Pipette0.Coordinate1.x=520 +Panel8.Pipette0.Coordinate1.y=22050 +Panel8.Pipette0.Coordinate1.z=0 +Panel8.Pipette0.Coordinate2.x=5225 +Panel8.Pipette0.Coordinate2.y=410 +Panel8.Pipette0.Coordinate2.z=0 +Panel1.Pipette0.Coordinate0.x=10805 +Panel1.Pipette0.Coordinate0.y=400 +Panel1.Pipette0.Coordinate0.z=0 +Panel1.Pipette0.Coordinate1.x=10805 +Panel1.Pipette0.Coordinate1.y=6360 +Panel1.Pipette0.Coordinate1.z=0 +Panel1.Pipette0.Coordinate2.x=12295 +Panel1.Pipette0.Coordinate2.y=400 +Panel1.Pipette0.Coordinate2.z=0 +Panel2.Pipette0.Coordinate2.x=18604 +Panel2.Pipette0.Coordinate2.y=200 +Panel2.Pipette0.Coordinate2.z=0 +Panel2.Pipette0.Coordinate0.x=17111 +Panel2.Pipette0.Coordinate0.y=200 +Panel2.Pipette0.Coordinate0.z=0 +Panel2.Pipette0.Coordinate1.x=17111 +Panel2.Pipette0.Coordinate1.y=6173 +Panel2.Pipette0.Coordinate1.z=0 +Panel13.Pipette1.Coordinate0.x=21340 +Panel13.Pipette1.Coordinate0.y=9200 +Panel13.Pipette1.Coordinate0.z=0 +Panel3.Pipette0.Coordinate0.x=5840 +Panel3.Pipette0.Coordinate0.y=9140 +Panel3.Pipette0.Coordinate0.z=0 +Panel3.Pipette0.Coordinate2.x=6385 +Panel3.Pipette0.Coordinate2.y=9120 +Panel3.Pipette0.Coordinate2.z=0 +Panel3.Pipette0.Coordinate1.x=5860 +Panel3.Pipette0.Coordinate1.y=19800 +Panel3.Pipette0.Coordinate1.z=0 +Panel4.Pipette0.Coordinate0.x=6880 +Panel4.Pipette0.Coordinate0.y=9120 +Panel4.Pipette0.Coordinate0.z=0 +Panel5.Pipette0.Coordinate0.x=7930 +Panel5.Pipette0.Coordinate0.y=9130 +Panel5.Pipette0.Coordinate0.z=0 +Panel6.Pipette0.Coordinate0.x=8955 +Panel6.Pipette0.Coordinate0.y=9120 +Panel6.Pipette0.Coordinate0.z=0 +Panel4.Pipette0.Coordinate2.x=7420 +Panel4.Pipette0.Coordinate2.y=9120 +Panel4.Pipette0.Coordinate2.z=0 +Panel5.Pipette0.Coordinate2.x=8470 +Panel5.Pipette0.Coordinate2.y=9120 +Panel5.Pipette0.Coordinate2.z=0 +Panel6.Pipette0.Coordinate2.x=9485 +Panel6.Pipette0.Coordinate2.y=9120 +Panel6.Pipette0.Coordinate2.z=0 +Panel4.Pipette0.Coordinate1.x=6910 +Panel4.Pipette0.Coordinate1.y=19790 +Panel4.Pipette0.Coordinate1.z=0 +Panel5.Pipette0.Coordinate1.x=7950 +Panel5.Pipette0.Coordinate1.y=19810 +Panel5.Pipette0.Coordinate1.z=0 +Panel6.Pipette0.Coordinate1.x=8990 +Panel6.Pipette0.Coordinate1.y=19800 +Panel6.Pipette0.Coordinate1.z=0 +Panel18.Pipette1.Coordinate0.x=1335 +Panel18.Pipette1.Coordinate0.y=11690 +Panel18.Pipette1.Coordinate0.z=0 +Panel18.Pipette1.Coordinate1.x=1335 +Panel18.Pipette1.Coordinate1.y=11690 +Panel18.Pipette1.Coordinate1.z=0 +Panel18.Pipette1.Coordinate2.x=340 +Panel18.Pipette1.Coordinate2.y=11690 +Panel18.Pipette1.Coordinate2.z=0 +Panel12.Pipette1.Coordinate0.x=10055 +Panel12.Pipette1.Coordinate0.y=500 +Panel12.Pipette1.Coordinate0.z=0 +Panel12.Pipette1.Coordinate2.x=8565 +Panel12.Pipette1.Coordinate2.y=500 +Panel12.Pipette1.Coordinate2.z=0 +Panel12.Pipette1.Coordinate1.x=10065 +Panel12.Pipette1.Coordinate1.y=6450 +Panel12.Pipette1.Coordinate1.z=0 +Panel13.Pipette1.Coordinate1.x=21320 +Panel13.Pipette1.Coordinate1.y=19885 +Panel13.Pipette1.Coordinate1.z=0 +Panel13.Pipette1.Coordinate2.x=20805 +Panel13.Pipette1.Coordinate2.y=9195 +Panel13.Pipette1.Coordinate2.z=0 +Panel14.Pipette1.Coordinate0.x=20300 +Panel14.Pipette1.Coordinate0.y=9205 +Panel14.Pipette1.Coordinate0.z=0 +Panel15.Pipette1.Coordinate0.x=19260 +Panel15.Pipette1.Coordinate0.y=9195 +Panel15.Pipette1.Coordinate0.z=0 +Panel16.Pipette1.Coordinate0.x=18220 +Panel16.Pipette1.Coordinate0.y=9185 +Panel16.Pipette1.Coordinate0.z=0 +Panel14.Pipette1.Coordinate2.x=19770 +Panel14.Pipette1.Coordinate2.y=9195 +Panel14.Pipette1.Coordinate2.z=0 +Panel15.Pipette1.Coordinate2.x=18735 +Panel15.Pipette1.Coordinate2.y=9175 +Panel15.Pipette1.Coordinate2.z=0 +Panel16.Pipette1.Coordinate2.x=17695 +Panel16.Pipette1.Coordinate2.y=9185 +Panel16.Pipette1.Coordinate2.z=0 +Panel14.Pipette1.Coordinate1.x=20270 +Panel14.Pipette1.Coordinate1.y=19855 +Panel14.Pipette1.Coordinate1.z=0 +Panel15.Pipette1.Coordinate1.x=19230 +Panel15.Pipette1.Coordinate1.y=19850 +Panel15.Pipette1.Coordinate1.z=0 +Panel16.Pipette1.Coordinate1.x=18185 +Panel16.Pipette1.Coordinate1.y=19865 +Panel16.Pipette1.Coordinate1.z=0 +Panel7.Pipette0.Coordinate0.x=6400 +Panel7.Pipette0.Coordinate0.y=1680 +Panel7.Pipette0.Coordinate0.z=0 +Panel7.Pipette0.Coordinate2.x=6400 +Panel7.Pipette0.Coordinate2.y=1680 +Panel7.Pipette0.Coordinate2.z=0 +Panel7.Pipette0.Coordinate1.x=6400 +Panel7.Pipette0.Coordinate1.y=1680 +Panel7.Pipette0.Coordinate1.z=0 +Panel11.Pipette1.Coordinate0.x=16460 +Panel11.Pipette1.Coordinate0.y=588 +Panel11.Pipette1.Coordinate0.z=0 +Panel11.Pipette1.Coordinate1.x=16470 +Panel11.Pipette1.Coordinate1.y=6558 +Panel11.Pipette1.Coordinate1.z=0 +Panel11.Pipette1.Coordinate2.x=14970 +Panel11.Pipette1.Coordinate2.y=598 +Panel11.Pipette1.Coordinate2.z=0 +Panel17.Pipette1.Coordinate0.x=20790 +Panel17.Pipette1.Coordinate0.y=1700 +Panel17.Pipette1.Coordinate0.z=0 +Panel17.Pipette1.Coordinate1.x=20790 +Panel17.Pipette1.Coordinate1.y=1700 +Panel17.Pipette1.Coordinate1.z=0 +Panel17.Pipette1.Coordinate2.x=20790 +Panel17.Pipette1.Coordinate2.y=1700 +Panel17.Pipette1.Coordinate2.z=0 +Panel19.Pipette1.Coordinate0.x=1430 +Panel19.Pipette1.Coordinate0.y=11740 +Panel19.Pipette1.Coordinate0.z=0 +Panel19.Pipette1.Coordinate1.x=1430 +Panel19.Pipette1.Coordinate1.y=11740 +Panel19.Pipette1.Coordinate1.z=0 +Panel19.Pipette1.Coordinate2.x=450 +Panel19.Pipette1.Coordinate2.y=11740 +Panel19.Pipette1.Coordinate2.z=0 diff --git a/conf/0x1820_0x0000_panel.conf b/conf/0x1820_0x0000_panel.conf new file mode 100644 index 0000000..c674751 --- /dev/null +++ b/conf/0x1820_0x0000_panel.conf @@ -0,0 +1,90 @@ +#----------------------------------------------------------------------------------------------------------------------- +# 属性名 权限 作用 +#----------------------------------------------------------------------------------------------------------------------- +# Panel.Count 只读 面板总数 +# Panel%d.Label 只读 面板名称 +# Panel%d.Size.{x|y} 只读 面板尺寸(毫米) +# Panel%d.Pipette%d.Coordinate%d.{x|y|z} 读写 面板坐标(p, 1圈=3200p, 需定标) +#----------------------------------------------------------------------------------------------------------------------- + +Panel.Count=19 + +#左臂 + +Panel0.Label=洗针池 +Panel0.Size.x=1 +Panel0.Size.y=16 + +Panel1.Label=加样区 +Panel1.Size.x=70 +Panel1.Size.y=70 + +Panel2.Label=加试剂区 +Panel2.Size.x=70 +Panel2.Size.y=70 + +Panel3.Label=稀释区1 +Panel3.Size.x=22.5 +Panel3.Size.y=150 + +Panel4.Label=稀释区2 +Panel4.Size.x=22.5 +Panel4.Size.y=150 + +Panel5.Label=稀释区3 +Panel5.Size.x=22.5 +Panel5.Size.y=150 + +Panel6.Label=稀释区4 +Panel6.Size.x=22.5 +Panel6.Size.y=150 + +Panel7.Label=特殊洗液区 +Panel7.Size.x=10 +Panel7.Size.y=10 + +Panel8.Label=试管架 +Panel8.Size.x=90 +Panel8.Size.y=190 + +Panel9.Label=左臂预留 +Panel9.Size.x=10 +Panel9.Size.y=10 + +#右臂 + +Panel10.Label=洗针池 +Panel10.Size.x=9.23 +Panel10.Size.y=5.64 + +Panel11.Label=加样区 +Panel11.Size.x=70 +Panel11.Size.y=70 + +Panel12.Label=加试剂区 +Panel12.Size.x=70 +Panel12.Size.y=70 + +Panel13.Label=稀释区1 +Panel13.Size.x=22.5 +Panel13.Size.y=150 + +Panel14.Label=稀释区2 +Panel14.Size.x=22.5 +Panel14.Size.y=150 + +Panel15.Label=稀释区3 +Panel15.Size.x=22.5 +Panel15.Size.y=150 + +Panel16.Label=稀释区4 +Panel16.Size.x=22.5 +Panel16.Size.y=150 + +Panel17.Label=特殊洗液区 +Panel17.Size.x=10 +Panel17.Size.y=10 + +Panel18.Label=转盘试剂区 +Panel18.Size.x=41.6 +Panel18.Size.y=1 \ No newline at end of file diff --git a/conf/0x1820_0x0000_panel.conf.sig b/conf/0x1820_0x0000_panel.conf.sig new file mode 100644 index 0000000..7c46f7c --- /dev/null +++ b/conf/0x1820_0x0000_panel.conf.sig @@ -0,0 +1 @@ +3bc415931e13d8b6f21a94eba92b211ca7372b9ae61275f42bf5ce6fad2d2896 0x1820_0x0000_panel.conf diff --git a/conf/0x1820_0x0000_pipette.conf b/conf/0x1820_0x0000_pipette.conf new file mode 100644 index 0000000..8555633 --- /dev/null +++ b/conf/0x1820_0x0000_pipette.conf @@ -0,0 +1,112 @@ +#----------------------------------------------------------------------------------------------------------------------- +# 属性名 权限 作用 +#----------------------------------------------------------------------------------------------------------------------- +# Pipette.Count 只读 枪数量 +# Pipette%d.Label 只读 枪名称 +# Pipette%d.ArmId 只读 枪所属机械臂(最多两个臂 0\1) +# Pipette%d.Type 只读 枪类型: 0 加样枪, 1 冲洗枪, 2 废液枪, 3 反应杯抓取枪, 4 注射泵(从后面瓶子里吸) +# Pipette%d.Flag 只读 枪标志: +# bit0: 保留 +# bit1: 1表示带吸头传感器, 0表示不带吸头传感器 +# bit2: 1表示打完吸头要从原位置返回 +# bit3: 1表示取完吸头要回到零位才能检测 +# bit4: 保留 +# bit5: 1表示吸头传感器只有当Z在零位时才起作用 +# bit6: 1表示排枪, 0表示单枪 +# bit7: 1表示带逻辑或吸头传感器(bit6为1的情况下才使用bit7的信息) +# bit8: 1表示带压力传感器, 0表示不带压力传感器 +# bit9: 1表示带电容传感器, 0表示不带电容传感器 +# bit10: 1表示ZP之间带同步信号线, 0表示不带同步信号线 +# bit11: 1表示带吸头, 0表示不带吸头 +# bit12: 1表示带冲洗泵, 0表示不带冲洗泵 +# bit13: 1表示复位时需要冲洗液路, 0表示复位时不需要冲洗液路(仅废液枪或注射泵) +# bit14: 1表示探测液面使用外置气泵, 0表示探测液面使用活塞 +# 使用外置气泵时外置气路控制阀通道由Pipette%d.Channel.ExtDetectValve指定, 必须为Pipette%d.Channel.z或Pipette%d.Channel.Pressure之一 +# bit15: 1表示带反应杯释放电磁铁, 释放电磁铁通道由Pipette%d.Channel.CuvetteRelease指定 +# bit16: 1表示电容传感器使用数字接口, 0表示使用单个IO(兼容旧模式) +# bit17: 1表示复位时进行吸废液泵自检(仅废液枪) + +# Pipette%d.Channel.{x|y|z} 只读 X/Y/Z电机通道编号, 必填 +# Pipette%d.Channel.p 只读 P电机通道编号,只有加样枪需要(类型0) +# Pipette%d.Channel.Cap 只读 电容传感器通道编号 +# Pipette%d.Channel.Pump 只读 冲洗泵或吸废液泵通道编号(仅针式加样枪和废液枪, 枪类型0或2) +# Pipette%d.Wash.TargetId 只读 打废液的target +# Pipette%d.Wash.TargetIndexId 只读 打废液的target的idx + +# Pipette%d.Piston.AirGap 读写 system airgap(p, 1圈=3200p) +# Pipette%d.Piston.Diameter 只读 活塞直径(毫米) +# Pipette%d.Piston.CoordinateMax 读写 活塞最大行程(p, 1圈=3200p), 液面检测时P的启动位置 + +# Pipette%d.Volume.PerStep 读写 1步对应的体积ul +# Pipette%d.Step.PerVolume 读写 1ul对应的步数p +# Pipette1%d.System.AirGap 读写 洗针空气柱 + +# Pipette%d.Speed.FetchTip 读写 取吸头时Z的速度(p/sec, 1圈=3200p) +# Pipette%d.Speed.DropTip 读写 打吸头时Z的速度(p/sec, 1圈=3200p) +# Pipette%d.Acceleration.FetchTip 读写 取吸头时Z的加速度(p/sec^2, 1圈=3200p) +# Pipette%d.Acceleration.DropTip 读写 打吸头时Z的加速度(p/sec^2, 1圈=3200p) +# Pipette.MaxDistance.X 读写 X臂防撞区间 + +# Pipette%d.Press.SwitchUp 读写 压力上限检测开关 +# Pipette%d.Press.LimitUp 读写 压力上限检测阈值 +# Pipette%d.Press.SwitchLow 读写 压力下限检测开关 +# Pipette%d.Press.LimitLow 读写 压力下限检测阈值 +# Pipette%d.Press.IdleLow1 读写 非预处理压力建立时间 +# Pipette%d.Press.IdleLow2 读写 预处理压力建立时间 +# CollsisionAvoidanceFuntion 读写 防撞功能软件逻辑开关,(PS硬件有部分防撞功能,仅关闭软件逻辑是无法屏蔽硬件层面的防撞的。本参数仅给老机器使用) +#----------------------------------------------------------------------------------------------------------------------- + +Pipette.Count=2 + +Pipette0.Label=leftArm +Pipette0.ArmId=0 +Pipette0.Type=0 +Pipette0.Flag=0x11200 +Pipette0.Channel.x=0 +Pipette0.Channel.y=1 +Pipette0.Channel.z=2 +Pipette0.Channel.p=3 +Pipette0.Channel.Cap=9 +Pipette0.Channel.InjectPump=8 +Pipette0.Wash.SrcId=0 +Pipette0.Wash.RouteId=0 +Pipette0.System.AirGap=10 +Pipette0.Step.PerVolume=128 +Pipette0.Wash.TargetId=2 +Pipette0.Wash.TargetIndexId=0 +Pipette0.Press.SwitchUp=1 +Pipette0.Press.LimitUp=3520 +Pipette0.Press.SwitchLow=1 +Pipette0.Press.LimitLow=1500 +Pipette0.Press.IdleLow1=700 +Pipette0.Press.IdleLow2=11000 + +#试剂 +Pipette1.Label=rightArm +Pipette1.ArmId=1 +Pipette1.Type=0 +Pipette1.Flag=0x11200 +Pipette1.Channel.x=4 +Pipette1.Channel.y=5 +Pipette1.Channel.z=6 +Pipette1.Channel.p=7 +Pipette1.Channel.Cap=10 +Pipette1.Channel.Dial=11 +Pipette1.Channel.InjectPump=8 +Pipette1.Wash.SrcId=0 +Pipette1.Wash.RouteId=0 +Pipette1.System.AirGap=10 +Pipette1.Step.PerVolume=64 +Pipette1.Wash.TargetId=15 +Pipette1.Wash.TargetIndexId=0 +Pipette1.Press.SwitchUp=1 +Pipette1.Press.LimitUp=3520 +Pipette1.Press.SwitchLow=1 +Pipette1.Press.LimitLow=1500 +Pipette1.Press.IdleLow1=700 +Pipette1.Press.IdleLow2=11000 + +Pipette.MaxDistance.X=23500 + +#防撞逻辑启动开关 +CollsisionAvoidanceFuntion = 1 \ No newline at end of file diff --git a/conf/0x1820_0x0000_pipette.conf.sig b/conf/0x1820_0x0000_pipette.conf.sig new file mode 100644 index 0000000..f66294a --- /dev/null +++ b/conf/0x1820_0x0000_pipette.conf.sig @@ -0,0 +1 @@ +dd6c2bc414b852ac6cc06fd085a6b098e0b77f0e7bdf2bab16ee1367e17cdef5 0x1820_0x0000_pipette.conf diff --git a/conf/0x1820_0x0000_target.01aad22119000048.conf b/conf/0x1820_0x0000_target.01aad22119000048.conf new file mode 100644 index 0000000..179bae8 --- /dev/null +++ b/conf/0x1820_0x0000_target.01aad22119000048.conf @@ -0,0 +1,9 @@ +Target24.AttachMotor.start2=0 +Target25.AttachMotor.start2=0 +Target26.AttachMotor.start2=0 +Target24.AttachMotor.start1=43200 +Target25.AttachMotor.start1=43200 +Target26.AttachMotor.start1=43200 +Target24.AttachMotor.start0=21600 +Target25.AttachMotor.start0=21600 +Target26.AttachMotor.start0=21600 diff --git a/conf/0x1820_0x0000_target.conf b/conf/0x1820_0x0000_target.conf new file mode 100644 index 0000000..f19604f --- /dev/null +++ b/conf/0x1820_0x0000_target.conf @@ -0,0 +1,373 @@ +#----------------------------------------------------------------------------------------------------------------------- +# 属性名 权限 作用 +#----------------------------------------------------------------------------------------------------------------------- +# Target.Count 只读 目标区总数 +# Target%d.Label 只读 目标区名称 +# Target%d.Flag 只读 目标区标志: 1 吸液区域, 2 加液区域, 3 吸/加液区域, 4 吸头, 8 废液孔 +# bit0: 1表示该区域可以吸液 +# bit1: 1表示该区域可以加液 +# bit2: 1表示该区域为吸头区域 +# bit3: 1表示该区域为废液孔 +# bit4: 1表示该区域可以取反应杯 +# bit5: 1表示该区域可以放反应杯 +# Target%d.Param 只读 目标区子类型: +# 加样区域: 0 样本架, 1 标准品, 2 质控品, 3 试剂, 4 辅助试剂, 5 稀释板, 6 96孔板, 7 48孔板, 8 384孔板, 9 NAP吸废液液位置, 10 NAP吸液位置, 11 NAP加液位置, 12 玻片 +# 吸头: 吸头类型索引号 +# 废液孔: 枪头索引号(lica800废液池target填写枪号,指明每根加样枪的废液池) +# Target%d.PanelId 只读 所在面板索引号 +# Target%d.RowCount 只读 行数 +# Target%d.ColumnCount 只读 列数 +# Target%d.Coordinate.{x|y|z} 只读 左上角相对面板坐标(毫米) +# Target%d.Distance.{x|y} 只读 目标点间隔距离(毫米) +# Target%d.TipDrop.{x|y|z} 只读 打吸头位置(毫米) +# Target%d.Safe.z 读写 相对目标区面板的安全高度(毫米), 向下为正方向, 必须小于等于40.0 +# TargetType.Count 只读 支持的目标区类型总数 +# TargetType%d.Id 只读 目标区类型编号 +# TargetType%d.Label 只读 目标区类型名称 +# TargetType%d.ContainerFlag 只读 目标区支持的容器类型, bit0表示容器0, bit1表示容器1... +#----------------------------------------------------------------------------------------------------------------------- + +Target.Count=27 + +# 左臂 + +Target0.Label=清水孔 +Target0.Flag=3 +Target0.Param=6 +Target0.PanelId=0 +Target0.RowCount=1 +Target0.ColumnCount=1 +Target0.Coordinate.x=0 +Target0.Coordinate.y=0 +Target0.Coordinate.z=33 +Target0.Distance.x=0 +Target0.Distance.y=0 +Target0.Safe.z=-33 + +Target1.Label=洗液孔 +Target1.Flag=3 +Target1.Param=6 +Target1.PanelId=0 +Target1.RowCount=1 +Target1.ColumnCount=1 +Target1.Coordinate.x=0 +Target1.Coordinate.y=8 +Target1.Coordinate.z=33 +Target1.Distance.x=0 +Target1.Distance.y=0 +Target1.Safe.z=-33 + +Target2.Label=废液孔 +Target2.Flag=3 +Target2.Param=0 +Target2.PanelId=0 +Target2.RowCount=1 +Target2.ColumnCount=1 +Target2.Coordinate.x=0 +Target2.Coordinate.y=16 +Target2.Coordinate.z=21 +Target2.Distance.x=0 +Target2.Distance.y=0 +Target2.Safe.z=-21 + +Target3.Label=加样区 +Target3.Flag=2 +Target3.Param=102 +Target3.PanelId=1 +Target3.RowCount=8 +Target3.ColumnCount=8 +Target3.Coordinate.x=0 +Target3.Coordinate.y=0 +Target3.Coordinate.z=0 +Target3.Distance.x=10 +Target3.Distance.y=10 +Target3.Safe.z=-3 + +Target4.Label=加试剂区 +Target4.Flag=2 +Target4.Param=103 +Target4.PanelId=2 +Target4.RowCount=8 +Target4.ColumnCount=8 +Target4.Coordinate.x=0 +Target4.Coordinate.y=0 +Target4.Coordinate.z=0 +Target4.Distance.x=10 +Target4.Distance.y=10 +Target4.Safe.z=-3 + +Target5.Label=稀释区1 +Target5.Flag=3 +Target5.Param=104 +Target5.PanelId=3 +Target5.RowCount=21 +Target5.ColumnCount=4 +Target5.Coordinate.x=0 +Target5.Coordinate.y=0 +Target5.Coordinate.z=0 +Target5.Distance.x=7.5 +Target5.Distance.y=7.5 +Target5.Safe.z=-5 + +Target6.Label=精度测试 +Target6.Flag=3 +Target6.Param=105 +Target6.PanelId=3 +Target6.RowCount=8 +Target6.ColumnCount=2 +Target6.Coordinate.x=11 +Target6.Coordinate.y=7 +Target6.Coordinate.z=0 +Target6.Distance.x=44 +Target6.Distance.y=21.6 +Target6.Safe.z=-20 + +Target7.Label=稀释区2 +Target7.Flag=3 +Target7.Param=104 +Target7.PanelId=4 +Target7.RowCount=21 +Target7.ColumnCount=4 +Target7.Coordinate.x=0 +Target7.Coordinate.y=0 +Target7.Coordinate.z=0 +Target7.Distance.x=7.5 +Target7.Distance.y=7.5 +Target7.Safe.z=-5 + +Target8.Label=稀释区3 +Target8.Flag=3 +Target8.Param=104 +Target8.PanelId=5 +Target8.RowCount=21 +Target8.ColumnCount=4 +Target8.Coordinate.x=0 +Target8.Coordinate.y=0 +Target8.Coordinate.z=0 +Target8.Distance.x=7.5 +Target8.Distance.y=7.5 +Target8.Safe.z=-5 + +Target9.Label=稀释区4 +Target9.Flag=3 +Target9.Param=104 +Target9.PanelId=6 +Target9.RowCount=21 +Target9.ColumnCount=4 +Target9.Coordinate.x=0 +Target9.Coordinate.y=0 +Target9.Coordinate.z=0 +Target9.Distance.x=7.5 +Target9.Distance.y=7.5 +Target9.Safe.z=-5 + +Target10.Label=特殊洗液 +Target10.Flag=3 +Target10.Param=106 +Target10.PanelId=7 +Target10.RowCount=1 +Target10.ColumnCount=1 +Target10.Coordinate.x=0 +Target10.Coordinate.y=0 +Target10.Coordinate.z=0 +Target10.Distance.x=0 +Target10.Distance.y=0 + +Target11.Label=试管架 +Target11.Flag=1 +Target11.Param=101 +Target11.PanelId=8 +Target11.RowCount=20 +Target11.ColumnCount=10 +Target11.Coordinate.x=0 +Target11.Coordinate.y=0 +Target11.Coordinate.z=0 +Target11.Distance.x=10 +Target11.Distance.y=10 +Target11.Safe.z=-55 + +Target12.Label=日立杯架 +Target12.Flag=3 +Target12.Param=107 +Target12.PanelId=8 +Target12.RowCount=18 +Target12.ColumnCount=10 +Target12.Coordinate.x=0 +Target12.Coordinate.y=0 +Target12.Coordinate.z=0 +Target12.Distance.x=10 +Target12.Distance.y=11.2 +Target12.Safe.z=0 + +#右臂 + +Target14.Label=洗液孔 +Target14.Flag=3 +Target14.Param=6 +Target14.PanelId=10 +Target14.RowCount=1 +Target14.ColumnCount=1 +Target14.Coordinate.x=9.23 +Target14.Coordinate.y=5.64 +Target14.Coordinate.z=33 +Target14.Distance.x=0 +Target14.Distance.y=0 +Target14.Safe.z=-35 + +Target15.Label=废液孔 +Target15.Flag=3 +Target15.Param=1 +Target15.PanelId=10 +Target15.RowCount=1 +Target15.ColumnCount=1 +Target15.Coordinate.x=0 +Target15.Coordinate.y=0 +Target15.Coordinate.z=21 +Target15.Distance.x=0 +Target15.Distance.y=0 +Target15.Safe.z=-21 + +Target16.Label=加样区 +Target16.Flag=3 +Target16.Param=114 +Target16.PanelId=11 +Target16.RowCount=8 +Target16.ColumnCount=8 +Target16.Coordinate.x=0 +Target16.Coordinate.y=0 +Target16.Coordinate.z=0 +Target16.Distance.x=10 +Target16.Distance.y=10 +Target16.Safe.z=-3 + +Target17.Label=加试剂区 +Target17.Flag=3 +Target17.Param=115 +Target17.PanelId=12 +Target17.RowCount=8 +Target17.ColumnCount=8 +Target17.Coordinate.x=0 +Target17.Coordinate.y=0 +Target17.Coordinate.z=0 +Target17.Distance.x=10 +Target17.Distance.y=10 +Target17.Safe.z=-3 + +Target18.Label=稀释区1 +Target18.Flag=3 +Target18.Param=116 +Target18.PanelId=13 +Target18.RowCount=21 +Target18.ColumnCount=4 +Target18.Coordinate.x=0 +Target18.Coordinate.y=0 +Target18.Coordinate.z=0 +Target18.Distance.x=7.5 +Target18.Distance.y=7.5 +Target18.Safe.z=-5 + +Target19.Label=稀释区2 +Target19.Flag=3 +Target19.Param=116 +Target19.PanelId=14 +Target19.RowCount=21 +Target19.ColumnCount=4 +Target19.Coordinate.x=0 +Target19.Coordinate.y=0 +Target19.Coordinate.z=0 +Target19.Distance.x=7.5 +Target19.Distance.y=7.5 +Target19.Safe.z=-5 + +Target20.Label=稀释区3 +Target20.Flag=3 +Target20.Param=116 +Target20.PanelId=15 +Target20.RowCount=21 +Target20.ColumnCount=4 +Target20.Coordinate.x=0 +Target20.Coordinate.y=0 +Target20.Coordinate.z=0 +Target20.Distance.x=7.5 +Target20.Distance.y=7.5 +Target20.Safe.z=-5 + +Target21.Label=稀释区4 +Target21.Flag=3 +Target21.Param=116 +Target21.PanelId=16 +Target21.RowCount=21 +Target21.ColumnCount=4 +Target21.Coordinate.x=0 +Target21.Coordinate.y=0 +Target21.Coordinate.z=0 +Target21.Distance.x=7.5 +Target21.Distance.y=7.5 +Target21.Safe.z=-5 + +Target22.Label=精度测试 +Target22.Flag=3 +Target22.Param=117 +Target22.PanelId=16 +Target22.RowCount=8 +Target22.ColumnCount=2 +Target22.Coordinate.x=-33 +Target22.Coordinate.y=7 +Target22.Coordinate.z=0 +Target22.Distance.x=44 +Target22.Distance.y=21.6 +Target22.Safe.z=-20 + +Target23.Label=特殊洗液 +Target23.Flag=3 +Target23.Param=118 +Target23.PanelId=17 +Target23.RowCount=1 +Target23.ColumnCount=1 +Target23.Coordinate.x=0 +Target23.Coordinate.y=0 +Target23.Coordinate.z=0 +Target23.Distance.x=0 +Target23.Distance.y=0 + +Target24.Label=试剂区R1 +Target24.Flag=3 +Target24.Param=111 +Target24.PanelId=18 +Target24.RowCount=1 +Target24.ColumnCount=24 +Target24.Coordinate.x=0 +Target24.Coordinate.y=0 +Target24.Coordinate.z=0 +Target24.Distance.x=0 +Target24.Distance.y=0 +Target24.AttachMotor.ch=11 +Target24.AttachMotor.interval=2400 + +Target25.Label=试剂区R2 +Target25.Flag=3 +Target25.Param=112 +Target25.PanelId=18 +Target25.RowCount=1 +Target25.ColumnCount=24 +Target25.Coordinate.x=19.7 +Target25.Coordinate.y=0 +Target25.Coordinate.z=0 +Target25.Distance.x=0 +Target25.Distance.y=0 +Target25.AttachMotor.ch=11 +Target25.AttachMotor.interval=2400 + +Target26.Label=试剂区R3 +Target26.Flag=3 +Target26.Param=113 +Target26.PanelId=18 +Target26.RowCount=1 +Target26.ColumnCount=24 +Target26.Coordinate.x=41.6 +Target26.Coordinate.y=0 +Target26.Coordinate.z=0 +Target26.Distance.x=0 +Target26.Distance.y=0 +Target26.AttachMotor.ch=11 +Target26.AttachMotor.interval=2400 \ No newline at end of file diff --git a/conf/0x1820_0x0000_target.conf.sig b/conf/0x1820_0x0000_target.conf.sig new file mode 100644 index 0000000..c99c41e --- /dev/null +++ b/conf/0x1820_0x0000_target.conf.sig @@ -0,0 +1 @@ +f21086bc7d6f55d136e522663ac5c70c943521d1a0a6d1ddbccafc0a8dac79f0 0x1820_0x0000_target.conf diff --git a/conf/0x1820_0x0000_wash.conf b/conf/0x1820_0x0000_wash.conf new file mode 100644 index 0000000..8ae56f9 --- /dev/null +++ b/conf/0x1820_0x0000_wash.conf @@ -0,0 +1,61 @@ +#------------------------------------------------------------------------------- +#Wash.TargetWater.Pipette%d 读写 清水孔TargetID +#Wash.TargetIndexWater.Pipette%d 读写 清水孔索引 +#Wash.TargetWash.Pipette%d 读写 洗液孔TargetID +#Wash.TargetIndexWash.Pipette%d 读写 洗液孔索引 +#Wash.Speed.ZUp.Pipette%d 读写 洗针后Z抬起的速度 +#Wash.Acce.ZUp.Pipette%d 读写 洗针后Z抬起的加速度 +#Wash.Speed.ZDown.Pipette%d 读写 洗针Z下降的速度 +#Wash.Acce.ZDown.Pipette%d 读写 洗针Z下降的加速度 +#Wash.Speed.PMix.Pipette%d 读写 洗针过程中P电机抽打的速度 +#Wash.Acce.PMix.Pipette%d 读写 洗针过程中P电机抽打的加速度 +#Wash.Speed.PDrawBack.Pipette%d 读写 洗针过程中P回吸抽打的速度 +#Wash.Acce.PDrawBack.Pipette%d 读写 洗针过程中P回吸抽打的加速度 +#Wash.TargetWasteDepth.Pipette%d 读写 洗针最深位置 +#Wash.Delay.Pipette1.Wait%d 读写负压等待时间ms +#Wash.wastePumpIntervalMins%d 读写抽冷凝水间隔时间min +#Wash.wastePumpOnMs%d 读写每次抽冷凝水的时间ms +# +#------------------------------------------------------------------------------- + +# 左臂 +Wash.TargetWater.Pipette0=0 +Wash.TargetIndexWater.Pipette0=0 +Wash.TargetWash.Pipette0=1 +Wash.TargetIndexWash.Pipette0=0 +Wash.Speed.ZUp.Pipette0=3200 +Wash.Acce.ZUp.Pipette0=6400 +Wash.Delay.Pipette0.AfterZUp=1000 +Wash.Speed.ZDown.Pipette0=25600 +Wash.Acce.ZDown.Pipette0=256000 +Wash.Delay.Pipette0.AfterZDown=1000 +Wash.Speed.PMix.Pipette0=26667 +Wash.Acce.PMix.Pipette0=512000 +Wash.Speed.PDrawBack.Pipette0=25600 +Wash.Acce.PDrawBack.Pipette0=102400 +Wash.delay.LiquidWash.BeforeDraw.Pipette0=500 +Wash.delay.LiquidWash.BeforeDispense.Pipette0=100 +Wash.TargetWasteDepth.Pipette0=25.0 +Wash.Delay.Pipette0.Wait=500 + +# 右臂 +Wash.TargetWater.Pipette1=13 +Wash.TargetIndexWater.Pipette1=0 +Wash.TargetWash.Pipette1=14 +Wash.TargetIndexWash.Pipette1=0 +Wash.Speed.ZUp.Pipette1=2560 +Wash.Acce.ZUp.Pipette1=12800 +Wash.Delay.Pipette1.AfterZUp=0 +Wash.Speed.ZDown.Pipette1=25600 +Wash.Acce.ZDown.Pipette1=256000 +Wash.Delay.Pipette1.AfterZDown=0 +Wash.Speed.PMix.Pipette1=12800 +Wash.Acce.PMix.Pipette1=512000 +Wash.Speed.PDrawBack.Pipette1=25600 +Wash.Acce.PDrawBack.Pipette1=102400 +Wash.TargetWasteDepth.Pipette1=25.0 +Wash.Delay.Pipette1.Wait=1500 + + +Wash.wastePumpIntervalMins=20 +Wash.wastePumpOnMs=30000 \ No newline at end of file diff --git a/conf/0x1820_0x0000_wash.conf.sig b/conf/0x1820_0x0000_wash.conf.sig new file mode 100644 index 0000000..fcb7495 --- /dev/null +++ b/conf/0x1820_0x0000_wash.conf.sig @@ -0,0 +1 @@ +2bdca6f27ba28d5ed015de2b46e4dac05fc0ab139fdd34a30e309f59be597490 0x1820_0x0000_wash.conf diff --git a/conf/0x1830_0x0000_location.0177ab2119000058.conf b/conf/0x1830_0x0000_location.0177ab2119000058.conf new file mode 100644 index 0000000..5f09624 --- /dev/null +++ b/conf/0x1830_0x0000_location.0177ab2119000058.conf @@ -0,0 +1,13 @@ +LAS.Position19.Coordinate.Motor6=22710 +LAS.Position12.Coordinate.Motor5=1175 +LAS.Position16.Coordinate.Motor9=585 +LAS.Position22.Coordinate.Motor7=17145 +LAS.Position20.Coordinate.Motor6=17145 +LAS.Position17.Coordinate.Motor4=2965 +LAS.Position18.Coordinate.Motor4=21155 +LAS.Position15.Coordinate.Motor8=8939 +LAS.Position21.Coordinate.Motor7=17145 +LAS.Position11.Coordinate.Motor0=75124 +LAS.Position14.Coordinate.Motor1=19820 +LAS.Position10.Coordinate.Motor0=9077 +LAS.Position13.Coordinate.Motor1=9938 diff --git a/conf/0x1830_0x0000_location.conf b/conf/0x1830_0x0000_location.conf new file mode 100644 index 0000000..a73ef85 --- /dev/null +++ b/conf/0x1830_0x0000_location.conf @@ -0,0 +1,111 @@ +#参考LICA800定标方式-反应区模块.Word +#MOTOR_STACK = 0, /* 0 */ +#MOTOR_GET, /* 1 */ +#MOTOR_L1, /* 2 */ +#MOTOR_L2, /* 3 */ +#MOTOR_L3, /* 4 */ +#MOTOR_ROTATE, /* 5 */ +#MOTOR_T1, /* 6 */ +#MOTOR_T2, /* 7 */ +#MOTOR_PUSH_X, /* 8 */ +#MOTOR_PUSH_Y, /* 9 */ +#MOTOR_P1, /* 10 */ +#MOTOR_P2, /* 11 */ + +#LAS.Position0.Coordinate.Motor1 //抓手电机每个板条间距,只读参数. +#LAS.Position1.Coordinate.Motor5 //转盘电机每个板条间距,只读参数. +#LAS.Position2.Coordinate.Motor2 //板条推入转盘,只读参数。 +#LAS.Position3.Coordinate.Motor6 //温育1,2每个板条间距,只读参数。 +#LAS.Position4.Coordinate.Motor3 //板条推入温育1,只读参数。 +#LAS.Position5.Coordinate.Motor6 //T1扫描位置 +#LAS.Position6.Coordinate.Motor7 //T2扫描位置 +#LAS.Position7.Coordinate.Motor1 //取板架初始点离取板架距离 +#LAS.Position8.Coordinate.Motor1 //扫描位置离取板架距离 +#LAS.Position9.Coordinate.Motor4 //推入检测中间点,只读 +#LAS.Position30.Coordinate.Motor4 //推入T2,只读 +#LAS.Position31.Coordinate.Motor4 //加通用液孔间距,只读 +#LAS.Position32.Coordinate.Motor0 //板架数量 +#LAS.Position33.Coordinate.Motor2 //板条推入转盘停顿点 + +#LAS.Position10.Coordinate.Motor0 //S定标点1:加载10个板架时,第10个板架到A10位置,值为a +#LAS.Position11.Coordinate.Motor0 //S定标点2:加载1个板架时,第1个板架到A10位置,值为b +#LAS.Position12.Coordinate.Motor5 //R定标点1:1号位工作位,横平竖直状态时,值为a +#LAS.Position13.Coordinate.Motor1 //G定标点1:推入转盘位置,板条1对准板条1,值为a +#LAS.Position14.Coordinate.Motor1 //G定标点2:取板架位置,抓手刚好取到板架时,值为b +#LAS.Position15.Coordinate.Motor8 //LX定标点1:推板条位置:推片对着转盘第1条中心,值为a +#LAS.Position16.Coordinate.Motor9 //LY定标点1:推板条位置:推片对着转盘第1条中心,值为a +#LAS.Position17.Coordinate.Motor4 //L3定标点1:加感光液第一孔位置,值为a +#LAS.Position18.Coordinate.Motor4 //L3定标点2:推入检测模块点,值为b +#LAS.Position19.Coordinate.Motor6 //T1定标点1:推板条位置:T1的第1条对着转盘第1条,值为a +#LAS.Position20.Coordinate.Motor6 //T1定标点2:板条推入T2:T1对准推杆中心,值为b +#LAS.Position21.Coordinate.Motor7 //T2定标点1:对接检测模块:第1条对准检测模块,值为a +#LAS.Position22.Coordinate.Motor7 //T2定标点2:推板条位置:T1第一条对准T2第一条,值为b + +#MotorL1.ToR.Speed //板条推入转盘的速度 +#MotorL1.ToR.Acce //板条推入转盘的加速度 +#MotorL1.SafeToR.Speed //板条推入转盘中间点的速度 +#MotorL1.SafeToR.Acce //板条推入转盘中间点的加速度 +#MotorL2.ToT1.Speed //板条推入T1的速度 +#MotorL2.ToT1.Acce //板条推入T1的加速度 +#MotorL3.ToT2.Speed //板条推入T2的速度 +#MotorL3.ToT2.Acce //板条推入T2的加速度 +#MotorL3.ToReader.Speed //板条推入读数模块的速度 +#MotorL3.ToReader.Acce //板条推入读数模块的加速度 +#MotorL4.ToT2.Speed //板条推回T2的速度 +#MotorL4.ToT2.Acce //板条推回T2的加速度 +#LAS.Position34.Coordinate.Motor12 //板条推回T2的给定点2 +#LAS.Position33.Coordinate.Motor12 //板条推回T2的给定点1 +#MotorG.Get.Speed //板取板架的速度 +#MotorG.Get.Acce //板取板架的加速度 + +#L1MiddleDelay +#stackInSensorDelay +#stackOutSensorDelay +#getQuerySensorDelay +#rotateQuerySensorDelay +#rotateWorkPosSensorDelay +#T1QuerySensorDelay +#T2QuerySensorDelay + +------------------------------------------------------------------------- + +LAS.Position0.Coordinate.Motor1=875 +LAS.Position1.Coordinate.Motor5=1050 +LAS.Position2.Coordinate.Motor2=10149 +LAS.Position3.Coordinate.Motor6=853 +LAS.Position4.Coordinate.Motor3=13036 +LAS.Position5.Coordinate.Motor6=22720 +LAS.Position6.Coordinate.Motor7=23147 +LAS.Position7.Coordinate.Motor1=11374 +LAS.Position8.Coordinate.Motor1=1007 +LAS.Position9.Coordinate.Motor4=10367 +LAS.Position30.Coordinate.Motor4=10630 +LAS.Position31.Coordinate.Motor4=787 +LAS.Position32.Coordinate.Motor0=11 +LAS.Position33.Coordinate.Motor2=2000 + +MotorL1.SafeToR.Speed=3200 +MotorL1.SafeToR.Acce=6400 +MotorL1.ToR.Speed=25600 +MotorL1.ToR.Acce=25600 +MotorL2.ToT1.Speed=12800 +MotorL2.ToT1.Acce=25600 +MotorL3.ToT2.Speed=6400 +MotorL3.ToT2.Acce=12800 +MotorL3.ToReader.Speed=6400 +MotorL3.ToReader.Acce=12800 +MotorL4.ToT2.Speed=6400 +MotorL4.ToT2.Acce=12800 +LAS.Position34.Coordinate.Motor12=9500 +LAS.Position33.Coordinate.Motor12=20967 +MotorG.Get.Speed=12800 +MotorG.Get.Acce=12800 + +L1MiddleDelay=0 +stackInSensorDelay=100 +stackOutSensorDelay=100 +getQuerySensorDelay=200 +rotateQuerySensorDelay=150 +rotateWorkPosSensorDelay=150 +T1QuerySensorDelay=100 +T2QuerySensorDelay=100 \ No newline at end of file diff --git a/conf/0x1830_0x0000_location.conf.sig b/conf/0x1830_0x0000_location.conf.sig new file mode 100644 index 0000000..fd375cf --- /dev/null +++ b/conf/0x1830_0x0000_location.conf.sig @@ -0,0 +1 @@ +93dd196578e07b08da9c6dbe2c54da454e336bdf0fed4c4de78ea73b6862c054 0x1830_0x0000_location.conf diff --git a/conf/0x1830_0x0000_module.conf b/conf/0x1830_0x0000_module.conf new file mode 100644 index 0000000..a181915 --- /dev/null +++ b/conf/0x1830_0x0000_module.conf @@ -0,0 +1,32 @@ +#----------------------------------------------------------------------------------------------------------------------- +# 属性名 权限 作用 +#----------------------------------------------------------------------------------------------------------------------- +# Module.Name 只读 模块名称 +# Module.Channel.Select 只读 每个通道使用的CAN网络适配器号, 每位表示一个通道, 0表示使用CAN1, 1表示使用CAN2 +# Module.Channel.FixedMask 只读 每个通道是否使用固定地址 +# Module.Channel.FixedAddr%d 只读 每个通道的固定地址(仅在Module.Channel.FixedMask的该通道相应位为1时有效) +# Module.RedMode 只读 红色灯初始化状态(0关闭/1开启/2闪烁模式0/3闪烁模式1/4闪烁模式2) +# Module.GreenMode 只读 绿色灯初始化状态(0关闭/1开启/2闪烁模式0/3闪烁模式1/4闪烁模式2) +# Module.BlueMode 只读 蓝色灯初始化状态(0关闭/1开启/2闪烁模式0/3闪烁模式1/4闪烁模式2) +#----------------------------------------------------------------------------------------------------------------------- +# 0 +# 1 +# 2 +# 3 +# 4 +# 5 + +Module.Name=反应区 +Module.Channel.Select=0x000000ff +Module.Channel.FixedMask=0x00000000 + +Module.Channel.FixedAddr0=10 +Module.Channel.FixedAddr1=11 +Module.Channel.FixedAddr2=12 +Module.Channel.FixedAddr3=13 +Module.Channel.FixedAddr4=14 +Module.Channel.FixedAddr5=15 + +Module.RedMode=1 +Module.GreenMode=1 +Module.BlueMode=1 diff --git a/conf/0x1830_0x0000_module.conf.sig b/conf/0x1830_0x0000_module.conf.sig new file mode 100644 index 0000000..509e7c5 --- /dev/null +++ b/conf/0x1830_0x0000_module.conf.sig @@ -0,0 +1 @@ +08865f20b7f200588c9824ea018b20d2bf27e8fe37e0b0a979f261d73bc8c91e 0x1830_0x0000_module.conf diff --git a/conf/0x1830_0x0000_motor.conf b/conf/0x1830_0x0000_motor.conf new file mode 100644 index 0000000..48a2432 --- /dev/null +++ b/conf/0x1830_0x0000_motor.conf @@ -0,0 +1,328 @@ +#----------------------------------------------------------------------------------------------------------------------- +# 属性名 权限 作用 默认值 +#----------------------------------------------------------------------------------------------------------------------- +# Motor%d.Config.MicroStep 只读 细分数: 1, 2, 4, 8, 16 8 +# Motor%d.Config.ProtectByBus 只读 是否处理来自数据总线的防撞保护信号(0不处理/1处理) 0 +# Motor%d.Config.StopKeyEnabled 只读 是否启用紧停按钮信号(0不启用/1启用) 0 +# Motor%d.Config.EmmrEnabled 只读 是否启用防撞保护传感器(0不启用/1启用) 0 +# Motor%d.Config.EmmrTriggerLevel 只读 防撞保护传感器触发电平, 0低触发/1高触发 0 +# Motor%d.Config.Rotate 只读 是否旋转自由度(越过最大坐标可回到零点)(0否/1是) 0 +# Motor%d.Config.ZeroSwitch 只读 零位传感器是否具备开关 0 +# Motor%d.Config.ZeroEna 只读 零位传感器使能电平 0 +# Motor%d.Config.ZeroTriggerLevel 只读 零位传感器触发电平, 0低触发/1高触发 0 +# Motor%d.Config.MotorEnableLevel 只读 电机使能电平, 0低使能/1高使能 0 +# Motor%d.Config.MotorCurrent 只读 电机全电流电平 0 +# Motor%d.Config.MotorClockEdge 只读 电机时钟驱动的边沿, 0负边沿/1正边沿 0 +# Motor%d.Config.MotorForwardLevel 只读 电机正方向电平, 0低电平/1高电平 0 + +# Motor%d.DistPerRound 只读 电机每圈行程(毫米) 0 +# Motor%d.Direction 只读 电机正方向的运动方向: North/South/West/East/Up/Down +# Motor%d.Config.Coordinate.Zero 只读 电机零位逻辑坐标(p, 1圈=3200p) 40 +# Motor%d.Config.Coordinate.Limit 读写 电机最大行程(p, 1圈=3200p) 24000 +# Motor%d.Config.LostStepLimit.Forward 读写 电机正向最大允许失步(p, 1圈=3200p) 16 +# Motor%d.Config.LostStepLimit.Reverse 读写 电机反向最大允许失步(p, 1圈=3200p) 16 +# Motor%d.Default.Move.SpeedMax 读写 电机运动默认速度(p/sec, 1圈=3200p) 3200 +# Motor%d.Default.Move.Acceleration 读写 电机运动默认加速度(p/sec^2, 1圈=3200p) 3200 +# Motor%d.Default.Reset.SpeedMax 读写 电机复位默认速度(p/sec, 1圈=3200p) 3200 +# Motor%d.Default.Reset.Acceleration 读写 电机复位默认加速度(p/sec^2, 1圈=3200p) 3200 +#----------------------------------------------------------------------------------------------------------------------- + +# 堆栈S +Motor0.Config.MicroStep=16 +Motor0.Config.ProtectByBus=0 +Motor0.Config.StopKeyEnabled=1 +Motor0.Config.EmmrEnabled=0 +Motor0.Config.EmmrTriggerLevel=0 +Motor0.Config.Rotate=0 +Motor0.Config.ZeroSwitch=0 +Motor0.Config.ZeroEna=0 +Motor0.Config.ZeroTriggerLevel=1 +Motor0.Config.MotorEnableLevel=1 +Motor0.Config.MotorCurrent=0 +Motor0.Config.MotorClockEdge=0 +Motor0.Config.MotorForwardLevel=0 +Motor0.Config.Coordinate.Zero=630 +Motor0.Config.Coordinate.Limit=76535 +Motor0.Config.LostStepLimit.Forward=100 +Motor0.Config.LostStepLimit.Reverse=100 +Motor0.DistPerRound=10.16 +Motor0.Direction=5 +Motor0.Default.Move.SpeedMax=13333 +Motor0.Default.Move.Acceleration=33333 +Motor0.Default.Reset.SpeedMax=13333 +Motor0.Default.Reset.Acceleration=33333 + +# 取板架G +Motor1.Config.MicroStep=16 +Motor1.Config.ProtectByBus=0 +Motor1.Config.StopKeyEnabled=1 +Motor1.Config.EmmrEnabled=0 +Motor1.Config.EmmrTriggerLevel=0 +Motor1.Config.Rotate=0 +Motor1.Config.ZeroSwitch=0 +Motor1.Config.ZeroEna=1 +Motor1.Config.ZeroTriggerLevel=1 +Motor1.Config.MotorEnableLevel=1 +Motor1.Config.MotorCurrent=0 +Motor1.Config.MotorClockEdge=0 +Motor1.Config.MotorForwardLevel=1 +Motor1.Config.Coordinate.Zero=175 +Motor1.Config.Coordinate.Limit=19948 +Motor1.Config.LostStepLimit.Forward=40 +Motor1.Config.LostStepLimit.Reverse=40 +Motor1.DistPerRound=36.576 +Motor1.Direction=1 +Motor1.Default.Move.SpeedMax=12800 +Motor1.Default.Move.Acceleration=51200 +Motor1.Default.Reset.SpeedMax=25600 +Motor1.Default.Reset.Acceleration=51200 + +# 推杆L1 +Motor2.Config.MicroStep=16 +Motor2.Config.ProtectByBus=0 +Motor2.Config.StopKeyEnabled=1 +Motor2.Config.EmmrEnabled=0 +Motor2.Config.EmmrTriggerLevel=0 +Motor2.Config.Rotate=0 +Motor2.Config.ZeroSwitch=0 +Motor2.Config.ZeroEna=1 +Motor2.Config.ZeroTriggerLevel=1 +Motor2.Config.MotorEnableLevel=1 +Motor2.Config.MotorCurrent=0 +Motor2.Config.MotorClockEdge=0 +Motor2.Config.MotorForwardLevel=1 +Motor2.Config.Coordinate.Zero=175 +Motor2.Config.Coordinate.Limit=10149 +Motor2.Config.LostStepLimit.Forward=40 +Motor2.Config.LostStepLimit.Reverse=40 +Motor2.DistPerRound=36.576 +Motor2.Direction=3 +Motor2.Default.Move.SpeedMax=25600 +Motor2.Default.Move.Acceleration=51200 +Motor2.Default.Reset.SpeedMax=25600 +Motor2.Default.Reset.Acceleration=51200 + +# 推杆L2 +Motor3.Config.MicroStep=16 +Motor3.Config.ProtectByBus=0 +Motor3.Config.StopKeyEnabled=1 +Motor3.Config.EmmrEnabled=0 +Motor3.Config.EmmrTriggerLevel=0 +Motor3.Config.Rotate=0 +Motor3.Config.ZeroSwitch=0 +Motor3.Config.ZeroEna=0 +Motor3.Config.ZeroTriggerLevel=1 +Motor3.Config.MotorEnableLevel=1 +Motor3.Config.MotorCurrent=0 +Motor3.Config.MotorClockEdge=0 +Motor3.Config.MotorForwardLevel=0 +Motor3.Config.Coordinate.Zero=175 +Motor3.Config.Coordinate.Limit=13036 +Motor3.Config.LostStepLimit.Forward=40 +Motor3.Config.LostStepLimit.Reverse=40 +Motor3.DistPerRound=36.576 +Motor3.Direction=2 +Motor3.Default.Move.SpeedMax=25600 +Motor3.Default.Move.Acceleration=51200 +Motor3.Default.Reset.SpeedMax=25600 +Motor3.Default.Reset.Acceleration=51200 + +# 推杆L3 +Motor4.Config.MicroStep=16 +Motor4.Config.ProtectByBus=0 +Motor4.Config.StopKeyEnabled=1 +Motor4.Config.EmmrEnabled=0 +Motor4.Config.EmmrTriggerLevel=0 +Motor4.Config.Rotate=0 +Motor4.Config.ZeroSwitch=0 +Motor4.Config.ZeroEna=0 +Motor4.Config.ZeroTriggerLevel=1 +Motor4.Config.MotorEnableLevel=1 +Motor4.Config.MotorCurrent=0 +Motor4.Config.MotorClockEdge=0 +Motor4.Config.MotorForwardLevel=0 +Motor4.Config.Coordinate.Zero=175 +Motor4.Config.Coordinate.Limit=21260 +Motor4.Config.LostStepLimit.Forward=40 +Motor4.Config.LostStepLimit.Reverse=40 +Motor4.DistPerRound=36.576 +Motor4.Direction=2 +Motor4.Default.Move.SpeedMax=25600 +Motor4.Default.Move.Acceleration=51200 +Motor4.Default.Reset.SpeedMax=25600 +Motor4.Default.Reset.Acceleration=51200 + +# 转盘R +Motor5.Config.MicroStep=16 +Motor5.Config.ProtectByBus=0 +Motor5.Config.StopKeyEnabled=1 +Motor5.Config.EmmrEnabled=0 +Motor5.Config.EmmrTriggerLevel=0 +Motor5.Config.Rotate=1 +Motor5.Config.ZeroSwitch=0 +Motor5.Config.ZeroEna=0 +Motor5.Config.ZeroTriggerLevel=1 +Motor5.Config.MotorEnableLevel=1 +Motor5.Config.MotorCurrent=0 +Motor5.Config.MotorClockEdge=0 +Motor5.Config.MotorForwardLevel=0 +Motor5.Config.Coordinate.Zero=107 +Motor5.Config.Coordinate.Limit=51200 +Motor5.Config.LostStepLimit.Forward=40 +Motor5.Config.LostStepLimit.Reverse=40 +Motor5.DistPerRound=60 +Motor5.Direction=9 +Motor5.Default.Move.SpeedMax=20000 +Motor5.Default.Move.Acceleration=80000 +Motor5.Default.Reset.SpeedMax=10000 +Motor5.Default.Reset.Acceleration=80000 + +# 温育T1 +Motor6.Config.MicroStep=16 +Motor6.Config.ProtectByBus=0 +Motor6.Config.StopKeyEnabled=1 +Motor6.Config.EmmrEnabled=0 +Motor6.Config.EmmrTriggerLevel=0 +Motor6.Config.Rotate=0 +Motor6.Config.ZeroSwitch=0 +Motor6.Config.ZeroEna=0 +Motor6.Config.ZeroTriggerLevel=1 +Motor6.Config.MotorEnableLevel=1 +Motor6.Config.MotorCurrent=0 +Motor6.Config.MotorClockEdge=0 +Motor6.Config.MotorForwardLevel=1 +Motor6.Config.Coordinate.Zero=142 +Motor6.Config.Coordinate.Limit=28871 +Motor6.Config.LostStepLimit.Forward=20 +Motor6.Config.LostStepLimit.Reverse=20 +Motor6.DistPerRound=45 +Motor6.Direction=4 +Motor6.Default.Move.SpeedMax=25600 +Motor6.Default.Move.Acceleration=51200 +Motor6.Default.Reset.SpeedMax=25600 +Motor6.Default.Reset.Acceleration=51200 + +# 温育T2 +Motor7.Config.MicroStep=16 +Motor7.Config.ProtectByBus=0 +Motor7.Config.StopKeyEnabled=1 +Motor7.Config.EmmrEnabled=0 +Motor7.Config.EmmrTriggerLevel=0 +Motor7.Config.Rotate=0 +Motor7.Config.ZeroSwitch=0 +Motor7.Config.ZeroEna=0 +Motor7.Config.ZeroTriggerLevel=1 +Motor7.Config.MotorEnableLevel=1 +Motor7.Config.MotorCurrent=0 +Motor7.Config.MotorClockEdge=0 +Motor7.Config.MotorForwardLevel=1 +Motor7.Config.Coordinate.Zero=142 +Motor7.Config.Coordinate.Limit=28871 +Motor7.Config.LostStepLimit.Forward=20 +Motor7.Config.LostStepLimit.Reverse=20 +Motor7.DistPerRound=45 +Motor7.Direction=4 +Motor7.Default.Move.SpeedMax=25600 +Motor7.Default.Move.Acceleration=51200 +Motor7.Default.Reset.SpeedMax=25600 +Motor7.Default.Reset.Acceleration=51200 + +# 推杆LX +Motor8.Config.MicroStep=16 +Motor8.Config.ProtectByBus=0 +Motor8.Config.StopKeyEnabled=1 +Motor8.Config.EmmrEnabled=0 +Motor8.Config.EmmrTriggerLevel=0 +Motor8.Config.Rotate=0 +Motor8.Config.ZeroSwitch=0 +Motor8.Config.ZeroEna=0 +Motor8.Config.ZeroTriggerLevel=1 +Motor8.Config.MotorEnableLevel=1 +Motor8.Config.MotorCurrent=0 +Motor8.Config.MotorClockEdge=0 +Motor8.Config.MotorForwardLevel=0 +Motor8.Config.Coordinate.Zero=175 +Motor8.Config.Coordinate.Limit=9449 +Motor8.Config.LostStepLimit.Forward=40 +Motor8.Config.LostStepLimit.Reverse=40 +Motor8.DistPerRound=36.576 +Motor8.Direction=2 +Motor8.Default.Move.SpeedMax=25600 +Motor8.Default.Move.Acceleration=51200 +Motor8.Default.Reset.SpeedMax=25600 +Motor8.Default.Reset.Acceleration=51200 + +# 推杆LY +Motor9.Config.MicroStep=16 +Motor9.Config.ProtectByBus=0 +Motor9.Config.StopKeyEnabled=1 +Motor9.Config.EmmrEnabled=0 +Motor9.Config.EmmrTriggerLevel=0 +Motor9.Config.Rotate=0 +Motor9.Config.ZeroSwitch=0 +Motor9.Config.ZeroEna=0 +Motor9.Config.ZeroTriggerLevel=1 +Motor9.Config.MotorEnableLevel=1 +Motor9.Config.MotorCurrent=0 +Motor9.Config.MotorClockEdge=0 +Motor9.Config.MotorForwardLevel=1 +Motor9.Config.Coordinate.Zero=175 +Motor9.Config.Coordinate.Limit=8749 +Motor9.Config.LostStepLimit.Forward=40 +Motor9.Config.LostStepLimit.Reverse=40 +Motor9.DistPerRound=36.576 +Motor9.Direction=4 +Motor9.Default.Move.SpeedMax=25600 +Motor9.Default.Move.Acceleration=51200 +Motor9.Default.Reset.SpeedMax=25600 +Motor9.Default.Reset.Acceleration=51200 + +# 通用液母液P1 +Motor10.Config.MicroStep=16 +Motor10.Config.ProtectByBus=0 +Motor10.Config.StopKeyEnabled=1 +Motor10.Config.EmmrEnabled=0 +Motor10.Config.EmmrTriggerLevel=0 +Motor10.Config.Rotate=0 +Motor10.Config.ZeroSwitch=0 +Motor10.Config.ZeroEna=0 +Motor10.Config.ZeroTriggerLevel=1 +Motor10.Config.MotorEnableLevel=1 +Motor10.Config.MotorCurrent=0 +Motor10.Config.MotorClockEdge=0 +Motor10.Config.MotorForwardLevel=1 +Motor10.Config.Coordinate.Zero=300 +Motor10.Config.Coordinate.Limit=40960 +Motor10.Config.LostStepLimit.Forward=160 +Motor10.Config.LostStepLimit.Reverse=160 +Motor10.DistPerRound=1.27 +Motor10.Direction=6 +Motor10.Default.Move.SpeedMax=20000 +Motor10.Default.Move.Acceleration=200000 +Motor10.Default.Reset.SpeedMax=20000 +Motor10.Default.Reset.Acceleration=200000 + +# 推杆L4 +Motor12.Config.MicroStep=16 +Motor12.Config.ProtectByBus=0 +Motor12.Config.StopKeyEnabled=1 +Motor12.Config.EmmrEnabled=0 +Motor12.Config.EmmrTriggerLevel=0 +Motor12.Config.Rotate=0 +Motor12.Config.ZeroSwitch=0 +Motor12.Config.ZeroEna=0 +Motor12.Config.ZeroTriggerLevel=0 +Motor12.Config.MotorEnableLevel=1 +Motor12.Config.MotorCurrent=0 +Motor12.Config.MotorClockEdge=0 +Motor12.Config.MotorForwardLevel=1 +Motor12.Config.Coordinate.Zero=131 +Motor12.Config.Coordinate.Limit=20997 +Motor12.Config.LostStepLimit.Forward=40 +Motor12.Config.LostStepLimit.Reverse=40 +Motor12.DistPerRound=36.576 +Motor12.Direction=2 +Motor12.Default.Move.SpeedMax=25600 +Motor12.Default.Move.Acceleration=51200 +Motor12.Default.Reset.SpeedMax=25600 +Motor12.Default.Reset.Acceleration=51200 \ No newline at end of file diff --git a/conf/0x1830_0x0000_motor.conf.sig b/conf/0x1830_0x0000_motor.conf.sig new file mode 100644 index 0000000..ed92d8a --- /dev/null +++ b/conf/0x1830_0x0000_motor.conf.sig @@ -0,0 +1 @@ +701bf9ba5d1fe2ced7781759e9b6b9ba0aefb3f2931b7ad6888009047c61c16b 0x1830_0x0000_motor.conf diff --git a/conf/0x1830_0x0000_pump.conf b/conf/0x1830_0x0000_pump.conf new file mode 100644 index 0000000..380a45d --- /dev/null +++ b/conf/0x1830_0x0000_pump.conf @@ -0,0 +1,62 @@ +#suckSpeed 吸液速度 +#suckAcce 吸液加速度 +#dropSpeed 打液速度 +#dropAcce 打液加速度 +#backSuckSpeed 回吸速度(读不到用默认配置) +#backSuckAcce 回吸加速度(读不到用默认配置) +#suckDelay 吸液后延时(ms) +#dropDelay 打液后延时(ms) +#suckMaxStep 吸液最大行程(P) +#volPerStep 1ul对应的步数(P) +#backSuckVol 回吸量(ul) +#bottleVol 瓶子体积(70000ul) +#dropEmptyVol 排空量(35000ul) +#preDropVol 预打量(ul) +#inOutValSwiDelay 输入输出阀切换后的延时(ms) +#3waySwiDelay 三通阀切换后的延时(ms) + +#uppLmtSuck 吸液压力上限 +#lowLmtSuck 吸液压力下限 +#uppLmtPreDrop 预打压力上限 +#lowLmtPreDrop 预打压力下限 +#uppLmtDrop 打液压力上限 +#lowLmtDrop 打液压力下限 +--------------------------------------------------------------------------- +suckSpeed=10000 +suckAcce=200000 +dropSpeed=7000 +dropAcce=500000 +backSuckSpeed=20000 +backSuckAcce=500000 + +suckDelay=200 +dropDelay=0 + +suckMaxStep=35776 +volPerStep=14.3 +backSuckVol=10 + +bottleVol=70000 +dropEmptyVol=35000 +preDropVol=175 +inOutValSwiDelay=1000 +3waySwiDelay=1000 + +uppLmtSuck=1000 +lowLmtSuck=-100 +uppLmtPreDrop=300000 +lowLmtPreDrop=30000 +uppLmtDrop=300000 +lowLmtDrop=110000 + + +globalPresEna=1 +suckPresEna=1 +preDropPresEna=1 +dropPresEna=1 +suckPresUpEna=1 +suckPresLowEna=1 +preDropPresUpEna=1 +preDropPresLowEna=1 +dropPresUpEna=1 +dropPresLowEna=1 \ No newline at end of file diff --git a/conf/0x1830_0x0000_pump.conf.sig b/conf/0x1830_0x0000_pump.conf.sig new file mode 100644 index 0000000..c32a8ef --- /dev/null +++ b/conf/0x1830_0x0000_pump.conf.sig @@ -0,0 +1 @@ +03a23bd03d61dc73526ff6d27c28a7206369d2bfd5e3ea0e994bc133954c10fa 0x1830_0x0000_pump.conf diff --git a/conf/0x1830_0x0000_shake.conf b/conf/0x1830_0x0000_shake.conf new file mode 100644 index 0000000..79c83b3 --- /dev/null +++ b/conf/0x1830_0x0000_shake.conf @@ -0,0 +1,234 @@ +#------------------------------------------------------------------------------- +#Shake%d.Mode 读写 温1/温2震荡模式,0:只有常规震荡;1:两种震荡 +#Shake%d.GridCnt 读写 温1/温2震荡半个周期运动次数 +#Shake%d.Grid%d.Dist 读写 震荡距离,单位(步数) +#Shake%d.Grid%d.Speed 读写 震荡速度 +#Shake%d.Grid%d.Acce 读写 震荡加速度 +#Shake%d.Grid%d.Delay 读写 震荡一次之后延时时间,单位(毫秒) +#------------------------------------------------------------------------------------- + +Shake0.Label=温育1震荡参数配置 +Shake0.Mode=0 +Shake0.GridCnt=18 + +Shake0.Grid0.Label=T1电机运动到第1个格点 +Shake0.Grid0.Dist=5000 +Shake0.Grid0.Speed=26667 +Shake0.Grid0.Acce=300000 +Shake0.Grid0.Delay=0 + +Shake0.Grid1.Label=T1电机运动到第2个格点 +Shake0.Grid1.Dist=2500 +Shake0.Grid1.Speed=26667 +Shake0.Grid1.Acce=300000 +Shake0.Grid1.Delay=0 + +Shake0.Grid2.Label=T1电机运动到第3个格点 +Shake0.Grid2.Dist=5000 +Shake0.Grid2.Speed=26667 +Shake0.Grid2.Acce=300000 +Shake0.Grid2.Delay=1000 + +Shake0.Grid3.Label=T1电机运动到第4个格点 +Shake0.Grid3.Dist=7500 +Shake0.Grid3.Speed=26667 +Shake0.Grid3.Acce=300000 +Shake0.Grid3.Delay=0 + +Shake0.Grid4.Label=T1电机运动到第5个格点 +Shake0.Grid4.Dist=5000 +Shake0.Grid4.Speed=26667 +Shake0.Grid4.Acce=300000 +Shake0.Grid4.Delay=0 + +Shake0.Grid5.Label=T1电机运动到第6个格点 +Shake0.Grid5.Dist=7500 +Shake0.Grid5.Speed=26667 +Shake0.Grid5.Acce=300000 +Shake0.Grid5.Delay=1000 + +Shake0.Grid6.Label=T1电机运动到第7个格点 +Shake0.Grid6.Dist=10000 +Shake0.Grid6.Speed=26667 +Shake0.Grid6.Acce=300000 +Shake0.Grid6.Delay=0 + +Shake0.Grid7.Label=T1电机运动到第8个格点 +Shake0.Grid7.Dist=7500 +Shake0.Grid7.Speed=26667 +Shake0.Grid7.Acce=300000 +Shake0.Grid7.Delay=0 + +Shake0.Grid8.Label=T1电机运动到第9个格点 +Shake0.Grid8.Dist=10000 +Shake0.Grid8.Speed=26667 +Shake0.Grid8.Acce=300000 +Shake0.Grid8.Delay=1000 + +Shake0.Grid9.Label=T1电机运动到第10个格点 +Shake0.Grid9.Dist=7500 +Shake0.Grid9.Speed=26667 +Shake0.Grid9.Acce=300000 +Shake0.Grid9.Delay=0 + +Shake0.Grid10.Label=T1电机运动到第11个格点 +Shake0.Grid10.Dist=10000 +Shake0.Grid10.Speed=26667 +Shake0.Grid10.Acce=300000 +Shake0.Grid10.Delay=0 + +Shake0.Grid11.Label=T1电机运动到第12个格点 +Shake0.Grid11.Dist=7500 +Shake0.Grid11.Speed=26667 +Shake0.Grid11.Acce=300000 +Shake0.Grid11.Delay=1000 + +Shake0.Grid12.Label=T1电机运动到第13个格点 +Shake0.Grid12.Dist=5000 +Shake0.Grid12.Speed=26667 +Shake0.Grid12.Acce=300000 +Shake0.Grid12.Delay=0 + +Shake0.Grid13.Label=T1电机运动到第14个格点 +Shake0.Grid13.Dist=7500 +Shake0.Grid13.Speed=26667 +Shake0.Grid13.Acce=300000 +Shake0.Grid13.Delay=0 + +Shake0.Grid14.Label=T1电机运动到第15个格点 +Shake0.Grid14.Dist=5000 +Shake0.Grid14.Speed=26667 +Shake0.Grid14.Acce=300000 +Shake0.Grid14.Delay=1000 + +Shake0.Grid15.Label=T1电机运动到第16个格点 +Shake0.Grid15.Dist=2500 +Shake0.Grid15.Speed=26667 +Shake0.Grid15.Acce=300000 +Shake0.Grid15.Delay=0 + +Shake0.Grid16.Label=T1电机运动到第17个格点 +Shake0.Grid16.Dist=5000 +Shake0.Grid16.Speed=26667 +Shake0.Grid16.Acce=300000 +Shake0.Grid16.Delay=0 + +Shake0.Grid17.Label=T1电机运动到第18个格点 +Shake0.Grid17.Dist=2500 +Shake0.Grid17.Speed=26667 +Shake0.Grid17.Acce=300000 +Shake0.Grid17.Delay=1000 + + + +Shake1.Label=温育2震荡参数配置 +Shake1.Mode=0 +Shake1.GridCnt=18 + +Shake1.Grid0.Label=T2电机运动到第1个格点 +Shake1.Grid0.Dist=5000 +Shake1.Grid0.Speed=26667 +Shake1.Grid0.Acce=300000 +Shake1.Grid0.Delay=0 + +Shake1.Grid1.Label=T2电机运动到第2个格点 +Shake1.Grid1.Dist=2500 +Shake1.Grid1.Speed=26667 +Shake1.Grid1.Acce=300000 +Shake1.Grid1.Delay=0 + +Shake1.Grid2.Label=T2电机运动到第3个格点 +Shake1.Grid2.Dist=5000 +Shake1.Grid2.Speed=26667 +Shake1.Grid2.Acce=300000 +Shake1.Grid2.Delay=1000 + +Shake1.Grid3.Label=T2电机运动到第4个格点 +Shake1.Grid3.Dist=7500 +Shake1.Grid3.Speed=26667 +Shake1.Grid3.Acce=300000 +Shake1.Grid3.Delay=0 + +Shake1.Grid4.Label=T2电机运动到第5个格点 +Shake1.Grid4.Dist=5000 +Shake1.Grid4.Speed=26667 +Shake1.Grid4.Acce=300000 +Shake1.Grid4.Delay=0 + +Shake1.Grid5.Label=T2电机运动到第6个格点 +Shake1.Grid5.Dist=7500 +Shake1.Grid5.Speed=26667 +Shake1.Grid5.Acce=300000 +Shake1.Grid5.Delay=1000 + +Shake1.Grid6.Label=T2电机运动到第7个格点 +Shake1.Grid6.Dist=10000 +Shake1.Grid6.Speed=26667 +Shake1.Grid6.Acce=300000 +Shake1.Grid6.Delay=0 + +Shake1.Grid7.Label=T2电机运动到第8个格点 +Shake1.Grid7.Dist=7500 +Shake1.Grid7.Speed=26667 +Shake1.Grid7.Acce=300000 +Shake1.Grid7.Delay=0 + +Shake1.Grid8.Label=T2电机运动到第9个格点 +Shake1.Grid8.Dist=10000 +Shake1.Grid8.Speed=26667 +Shake1.Grid8.Acce=300000 +Shake1.Grid8.Delay=1000 + +Shake1.Grid9.Label=T2电机运动到第10个格点 +Shake1.Grid9.Dist=7500 +Shake1.Grid9.Speed=26667 +Shake1.Grid9.Acce=300000 +Shake1.Grid9.Delay=0 + +Shake1.Grid10.Label=T2电机运动到第11个格点 +Shake1.Grid10.Dist=10000 +Shake1.Grid10.Speed=26667 +Shake1.Grid10.Acce=300000 +Shake1.Grid10.Delay=0 + +Shake1.Grid11.Label=T2电机运动到第12个格点 +Shake1.Grid11.Dist=7500 +Shake1.Grid11.Speed=26667 +Shake1.Grid11.Acce=300000 +Shake1.Grid11.Delay=1000 + +Shake1.Grid12.Label=T2电机运动到第13个格点 +Shake1.Grid12.Dist=5000 +Shake1.Grid12.Speed=26667 +Shake1.Grid12.Acce=300000 +Shake1.Grid12.Delay=0 + +Shake1.Grid13.Label=T2电机运动到第14个格点 +Shake1.Grid13.Dist=7500 +Shake1.Grid13.Speed=26667 +Shake1.Grid13.Acce=300000 +Shake1.Grid13.Delay=0 + +Shake1.Grid14.Label=T2电机运动到第15个格点 +Shake1.Grid14.Dist=5000 +Shake1.Grid14.Speed=26667 +Shake1.Grid14.Acce=300000 +Shake1.Grid14.Delay=1000 + +Shake1.Grid15.Label=T2电机运动到第16个格点 +Shake1.Grid15.Dist=2500 +Shake1.Grid15.Speed=26667 +Shake1.Grid15.Acce=300000 +Shake1.Grid15.Delay=0 + +Shake1.Grid16.Label=T2电机运动到第17个格点 +Shake1.Grid16.Dist=5000 +Shake1.Grid16.Speed=26667 +Shake1.Grid16.Acce=300000 +Shake1.Grid16.Delay=0 + +Shake1.Grid17.Label=T2电机运动到第18个格点 +Shake1.Grid17.Dist=2500 +Shake1.Grid17.Speed=26667 +Shake1.Grid17.Acce=300000 +Shake1.Grid17.Delay=1000 diff --git a/conf/0x1830_0x0000_shake.conf.sig b/conf/0x1830_0x0000_shake.conf.sig new file mode 100644 index 0000000..48a9a79 --- /dev/null +++ b/conf/0x1830_0x0000_shake.conf.sig @@ -0,0 +1 @@ +49b9b16024f695d71a383e79daef68dc0e0e52b71c08802ca6f8834c7650c8f2 0x1830_0x0000_shake.conf diff --git a/conf/product.info.conf b/conf/product.info.conf new file mode 100644 index 0000000..de8d6ca --- /dev/null +++ b/conf/product.info.conf @@ -0,0 +1 @@ +Product.Serial=201900010 diff --git a/conf/sha2sum.exe b/conf/sha2sum.exe new file mode 100644 index 0000000..0b1a179 Binary files /dev/null and b/conf/sha2sum.exe differ diff --git a/conf/sig.cmd b/conf/sig.cmd new file mode 100644 index 0000000..348dc92 --- /dev/null +++ b/conf/sig.cmd @@ -0,0 +1,18 @@ +sha2sum 0x10A0_0x0001_lica_read.conf > 0x10A0_0x0001_lica_read.conf.sig +sha2sum 0x0100_0x0000_sysconfig.conf > 0x0100_0x0000_sysconfig.conf.sig +sha2sum 0x0100_0x0000_vusart.conf > 0x0100_0x0000_vusart.conf.sig +sha2sum 0x0120_0x0000_pwrconfig.conf > 0x0120_0x0000_pwrconfig.conf.sig +sha2sum 0x0208_0x0000_temp.conf > 0x0208_0x0000_temp.conf.sig +sha2sum 0x1820_0x0000_container.conf > 0x1820_0x0000_container.conf.sig +sha2sum 0x1820_0x0000_dispense.conf > 0x1820_0x0000_dispense.conf.sig +sha2sum 0x1820_0x0000_module.conf > 0x1820_0x0000_module.conf.sig +sha2sum 0x1820_0x0000_motor.conf > 0x1820_0x0000_motor.conf.sig +sha2sum 0x1820_0x0000_panel.conf > 0x1820_0x0000_panel.conf.sig +sha2sum 0x1820_0x0000_pipette.conf > 0x1820_0x0000_pipette.conf.sig +sha2sum 0x1820_0x0000_target.conf > 0x1820_0x0000_target.conf.sig +sha2sum 0x1820_0x0000_wash.conf > 0x1820_0x0000_wash.conf.sig +sha2sum 0x1830_0x0000_location.conf > 0x1830_0x0000_location.conf.sig +sha2sum 0x1830_0x0000_module.conf > 0x1830_0x0000_module.conf.sig +sha2sum 0x1830_0x0000_motor.conf > 0x1830_0x0000_motor.conf.sig +sha2sum 0x1830_0x0000_shake.conf > 0x1830_0x0000_shake.conf.sig +sha2sum 0x1830_0x0000_pump.conf >0x1830_0x0000_pump.conf.sig \ No newline at end of file diff --git a/errcode_inc.h b/errcode_inc.h new file mode 100644 index 0000000..d92a39e --- /dev/null +++ b/errcode_inc.h @@ -0,0 +1,3581 @@ +#ifndef __ERRCODE_INC_H +#define __ERRCODE_INC_H +/*! \file errcode_inc.h + \brief 错误代码文档. +*/ + + +/** + * \defgroup other 其他代码 + * @{ + */ + +/*! \def RET_EXT_NO_ERROR + \remark 指令正常返回. + \note 指令正常返回. +*/ + +#define RET_EXT_NO_ERROR 0x00000000 +/**@}*/ + +// 0x00000001 - 0x000000ff: uC/OS-II + +// 0x80010001 - 0x800100ff: 旧协议错误代码, 保留 + +/** + * \defgroup general 0x80011001 - 0x80011fff: 通用系统错误代码 + * @{ + */ + +/*! \def RET_OS_INVALID_PARAM + \remark 指令参数无效. + \note 调用指令接口的参数不正确,请检查软件接口使用时参数是否正确。 + + \def RET_OS_NO_AVAILABLE_EVENT_CTRL_BLK + \remark TODO 建立任务时创建信号量失败. + \note TODO 1.检查报错指令是否为有效指令 + + \def RET_OS_NOT_IMPLEMENT + \remark TODO 指令未实现. + \note TODO 1.检查报错指令是否为有效指令 + + \def RET_OS_SYNC_OBJ_FAILED + \remark TODO 属性库同步对象失败. + \note TODO 1.软件错误,联系技术支持 + + \def RET_OS_TASK_CREATE_FAILED + \remark TODO 创建任务失败. + \note TODO 1.软件错误,联系技术支持 + + \def RET_OS_MODULE_BUSY + \remark TODO 该模块在执行指令时又接收到下一条指令. + \note TODO 1.检查是否在多线程中对改模块发指令 + + \def RET_OS_MODULE_NOT_FOUND + \remark TODO 模块节点未找到. + \note TODO 1.检测模块通信是否正常 + + \def RET_OS_DATATYPE_MISMATCH + \remark TODO 数据类型不匹配. + \note TODO 1.检查指令参数类型 + + \def RET_OS_HEAP_FULL + \remark TODO 堆满,内存分配失败. + \note TODO 1.软件错误,联系技术支持 + + \def RET_OS_NOT_ENOUGH_OUT_BUFFER + \remark TODO 指令接口返回缓冲区空间不足. + \note TODO 1.软件错误,联系技术支持 + + \def RET_OS_STACK_OVERFLOW + \remark TODO 栈溢出,任务栈空间不足. + \note TODO 1.软件错误,联系技术支持 + + \def RET_OS_OPERATION_UNSUPPORTED + \remark TODO 不支持的操作. + \note TODO 1.检查指令参数类型 + \n 2.检查sd相关参数 + + \def RET_OS_HEAP_CORRUPTED + \remark TODO 堆冲突. + \note TODO 1.软件错误,联系技术支持 + + \def RET_OS_FLOAT_TEST_FAILED + \remark TODO 浮点测试失败,未满足AAPCS函数调用规则 + \note TODO 1.软件错误,联系技术支持 + + \def RET_OS_SYSMGR_NOT_FOUND + \remark 未找到系统管理模块 + \note 1:初始化未完成 + 2:该板找到不到系统管理模块 + + \def RET_OS_PART_NOT_INIT + \remark 该部件刚上电尚未完成初始化 + \note 1:间隔一定时间再次操作 + +*/ +#define RET_OS_INVALID_PARAM 0x80011001 +#define RET_OS_NO_AVAILABLE_EVENT_CTRL_BLK 0x80011002 +#define RET_OS_NOT_IMPLEMENT 0x80011003 +#define RET_OS_SYNC_OBJ_FAILED 0x80011004 +#define RET_OS_TASK_CREATE_FAILED 0x80011005 +#define RET_OS_MODULE_BUSY 0x80011006 +#define RET_OS_MODULE_NOT_FOUND 0x80011007 +#define RET_OS_DATATYPE_MISMATCH 0x80011008 +#define RET_OS_HEAP_FULL 0x80011009 +#define RET_OS_NOT_ENOUGH_OUT_BUFFER 0x8001100a +#define RET_OS_STACK_OVERFLOW 0x8001100b +#define RET_OS_OPERATION_UNSUPPORTED 0x8001100c +#define RET_OS_HEAP_CORRUPTED 0x8001100d +#define RET_OS_FLOAT_TEST_FAILED 0x8001100e +#define RET_OS_FLASH_ERASE_FAILED 0x8001100f +#define RET_OS_FLASH_PROGRAM_FAILED 0x80011010 +#define RET_OS_SYSMGR_NOT_FOUND 0x80011011 +#define RET_OS_PART_NOT_INIT 0x80011012 +/**@}*/ + +/** + * \defgroup middleware 0x80011101 - 0x800111ff: JNI, .NET中间层错误代码 + */ +/**@{ +*/ +/*! \def RET_JNI_OBJECT_NULL + \remark TODO [.NET中间层错误]JNI对象为空. + \note TODO 1.软件错误,联系技术支持 + + \def RET_JNI_OBJECT_ERROR + \remark TODO [.NET中间层错误]JNI对象错误. + \note TODO 1.软件错误,联系技术支持 + + \def RET_DOTNET_OBJECT_NULL + \remark TODO [.NET中间层错误].NET对象为空. + \note TODO 1.软件错误,联系技术支持 + + \def RET_JNI_RETCODE_EXCEPTION + \remark TODO [.NET中间层错误]错误类型无法被java识别. + \note TODO 1.软件错误,联系技术支持 + + \def RET_VALVEFLOAT_INIT_FAILED + \remark 泵阀驱动初始化失败 + \note TODO 1.软件错误,联系技术支持 + + \def RET_VALVEFLOAT_GET_FAILED + \remark 泵阀外设读取状态不一致 + \note TODO 1.软件错误,联系技术支持 +*/ +#define RET_JNI_OBJECT_NULL 0x80011101 +#define RET_JNI_OBJECT_ERROR 0x80011102 +#define RET_DOTNET_OBJECT_NULL 0x80011103 +#define RET_JNI_RETCODE_EXCEPTION 0x80011104 // 错误类型无法被java识别 +#define RET_VALVEFLOAT_INIT_FAILED 0x80011105 +#define RET_VALVEFLOAT_GET_FAILED 0x80011106 +/**@}*/ + +/** + * \defgroup Peripheral 0x80011201 - 0x8001123f: 通用外部设备错误代码 + */ +/**@{ +*/ +/*! \def RET_SPI_ACCESS_FAILED + \remark TODO 报错原因. + \note TODO 建议操作 + + \def RET_EEPROM_READ_FAILED + \remark TODO eeprom读错误. + \note TODO 1.软件错误,联系技术支持 + + \def RET_EEPROM_WRITE_FAILED + \remark TODO eeprom读错误. + \note TODO 1.软件错误,联系技术支持 +*/ +#define RET_SPI_ACCESS_FAILED 0x80011201 +#define RET_EEPROM_READ_FAILED 0x80011202 +#define RET_EEPROM_WRITE_FAILED 0x80011203 +/**@}*/ + +/** + * \defgroup Bootloader 0x80011240 - 0x8001127f: Bootloader错误代码 + */ +/**@{ +*/ +/*! + \def RET_BOOTLOADER_IAP_FAILED + \remark TODO IAP命令失败. + \note TODO 1.软件错误,联系技术支持 + + \def RET_BOOTLOADER_FLASH_RANGE_ERROR + \remark TODO flash操作地址越界(0~504KB). + \note TODO 1.软件错误,联系技术支持 + + \def RET_BOOTLOADER_BOUNDARY_ERROR + \remark TODO flash操作地址边界错误,需要256B的整数倍. + \note TODO 1.软件错误,联系技术支持 + + \def RET_BOOTLOADER_UNKNOWN_PARTID + \remark TODO 无效的flash ID. + \note TODO 1.软件错误,联系技术支持 + + \def RET_BOOTLOADER_NOT_BEGIN_OF_SECTOR + \remark TODO flash操作地址不是扇区的起始地址. + \note TODO 1.软件错误,联系技术支持 + + \def RET_BOOTLOADER_VERIFY_FAILED + \remark TODO BL校验失败. + \note TODO 1.检查用户程序编译是否正确(程序入口地址、头部信息) + + \def RET_BOOTLOADER_FILE_OPEN_ERR + \remark TODO 打开用户程序文件失败. + \note TODO 1.检查用户程序是否存在 + + \def RET_BOOTLOADER_FILE_READ_ERR + \remark TODO 读用户程序文件失败. + \note TODO 1.检查用户程序是否存在 + + \def RET_BOOTLOADER_FILE_FORMATE_ERR + \remark TODO 用户程序文件格式错误. + \note TODO 1.检查用户程序编译是否正确(程序入口地址、头部信息等) + + \def RET_BOOTLOADER_HEAP_FULL + \remark TODO 堆满,内存分配空间不足. + \note TODO 1.软件错误,联系技术支持 + + \def RET_BOOTLOADER_RAM_RANGE_ERROR + \remark TODO 用户程序超出RAM空间大小. + \note TODO 1.检查用户程序大小是否满足RAM大小 + + \def RET_BOOTLOADER_DECOMPRESS_FAILED + \remark TODO 用户程序解压缩失败. + \note TODO 1.软件错误,联系技术支持 + + \def RET_BOOTLOADER_DECRYPT_FAILED + \remark TODO 用户程序解密失败. + \note TODO 1.检查用户程序是否被正确加密 +*/ +#define RET_BOOTLOADER_IAP_FAILED 0x80011240 +#define RET_BOOTLOADER_FLASH_RANGE_ERROR 0x80011241 +#define RET_BOOTLOADER_BOUNDARY_ERROR 0x80011242 +#define RET_BOOTLOADER_UNKNOWN_PARTID 0x80011243 +#define RET_BOOTLOADER_NOT_BEGIN_OF_SECTOR 0x80011244 +#define RET_BOOTLOADER_VERIFY_FAILED 0x80011245 +#define RET_BOOTLOADER_FILE_OPEN_ERR 0x80011246 +#define RET_BOOTLOADER_FILE_READ_ERR 0x80011247 +#define RET_BOOTLOADER_FILE_FORMATE_ERR 0x80011248 +#define RET_BOOTLOADER_HEAP_FULL 0x80011249 +#define RET_BOOTLOADER_RAM_RANGE_ERROR 0x8001124a +#define RET_BOOTLOADER_DECOMPRESS_FAILED 0x8001124b +#define RET_BOOTLOADER_DECRYPT_FAILED 0x8001124c +/**@}*/ + +/** + * \defgroup fsys 0x80011280 - 0x800112ff: 文件系统错误代码 + */ +/**@{ +*/ +/*! + \def RET_FILE_STAT_ERR + \remark 读文件状态错误 + \note 1.检查SD卡接触是否良好 + \n 2.检查SD卡文件是否存在 + + \def RET_FILE_DIR_OPEN_ERR + \remark 打开目录错误 + \note 1.检查SD卡接触是否良好 + \n 2.检查目录路径是否正确 + + \def RET_FILE_DIR_READ_ERR + \remark 读目录失败 + \note 1.检查SD卡接触是否良好 + + \def RET_FILE_DIR_NO_FILE_ERR + \remark 目录下所有文件已被读取。 + \note 1.遍历目录时返回该错误代码表示目录已被遍历完。 +*/ +#define RET_FILE_STAT_ERR 0x80011280 +#define RET_FILE_DIR_OPEN_ERR 0x80011281 +#define RET_FILE_DIR_READ_ERR 0x80011282 +#define RET_FILE_DIR_NO_FILE_ERR 0x80011283 +/**@}*/ + +/** + * \defgroup sys 0x80011301 - 0x8001133f: 系统错误代码 + */ +/**@{ +*/ +/*! + \def RET_SYS_STOP_PRESSED + \remark 停止按钮被按下. + \note 1.检查停止按钮是否被按下 + + \def RET_SYS_MOTOR_PROTECTED_TYPE1 + \remark 防撞传感器, 触发后任何电机操作都无法执行 + \note 1.检查防撞传感器是否触发 + + \def RET_SYS_MOTOR_PROTECTED_TYPE2 + \remark 两臂防撞传感器, 触发后可执行电机复位指令 + \note 1.检查两臂防撞传感器是否触发 +*/ +#define RET_SYS_STOP_PRESSED 0x80011301 +#define RET_SYS_MOTOR_PROTECTED_TYPE1 0x80011302 // 防撞触发, 防撞解除后方可恢复 +#define RET_SYS_MOTOR_PROTECTED_TYPE2 0x80011303 // 两臂防撞触发, 可执行复位指令恢复 +/**@}*/ + +/** + * \defgroup i2c 0x80011340 - 0x8001137f: 通讯错误代码 + */ +/**@{ +*/ +/*! + \def RET_I2C_COMM_FAILED + \remark TODO 报错原因. + \note TODO 建议操作 +*/ +#define RET_I2C_COMM_FAILED 0x80011340 + + + +/*! \def RET_BVCTRL_LEFT_PUSH_CARDS_FULL + \remark 左推导轨上板卡满 + \note TODO 1.上位机时序错误,联系技术支持 + + \def RET_BVCTRL_RIGHT_PUSH_CARDS_NONE + \remark 右推导轨上无卡 + \note TODO 1.上位机时序错误,联系技术支持 + + \def RET_BVCTRL_RIGHT_PUSH_CARDS_FULL + \remark 右推导轨上卡满 + \note TODO 1.上位机时序错误,联系技术支持 + + \def RET_BVCTRL_LEFT_PUSH_COORDINATE_WRONG + \remark TODO 左推电机坐标错误 + \note TODO 1.上位机时序错误,联系技术支持 + 2. 坐标点错误,检查板卡推送电机1最大距离 + + \def RET_BVCTRL_RIGHT_PUSH_COORDINATE_WRONG + \remark 右推电机坐标错误 + \note TODO 1.上位机时序错误,联系技术支持 + 2. 坐标点错误,检查板卡推送电机3最大距离 + + \def RET_BVCTRL_CHANGE_TRACK_CARD_WRONG + \remark 换轨电机动作失败 + \note TODO 1.检查是否卡板 + + \def RET_BVCTRL_LEFT_PUSH_CARD_F + \remark 左推电机动作失败 + \note TODO 1.检查是否卡板 + 2.检查加样位传感器是否正常 + + \def RET_BVCTRL_NOT_INIT + \remark BV主控初始化失败 + \note TODO 1.检查CAN通信是否异常 + 2.检查 + + \def RET_BVCTRL_MOTOR_NOT_RESET + \remark 异常关机中电机未复位 + \note TODO 1.上次实验中异常关机,复位机器 + + \def RET_BVCTRL_CLEAR_CARDS + \remark 需清理板卡的异常 + \note TODO 1.检查机械结构是否正常 + + \def RET_BVCTRL_LEFT_ADDING_FAILED + \remark 取卡失败 + \note TODO 1.检查机械结构是否正常 + + \def RET_BVCTRL_CARD_STUCKED + \remark 卡板后失步 + \note TODO 1.检查机械结构是否正常 + 2.检查实验过程中是否发生卡板 + + \def RET_BVCTRL_SENSOR_FAILED + \remark 样本架传感器异常 + \note TODO 1.检查样本架传感器接线是否正常 + + \def RET_BVCTRL_TEMP_SENSOR_FAILED + \remark 温度传感器异常 + \note TODO 1.检查温度传感器接线是否正常 + + \def RET_BVCTRL_MOTOR_INIT_FAILED + \remark 电机初始化失败 + \note TODO 1.检查是否存在机械故障 + + \def RET_BVCTRL_PARAM_FAILED + \remark 参数读取失败 + \note TODO 1.检查臂组模块是否初始化成功 + 2.检查底板CAN通信是否正常 + + \def RET_BVCTRL_RESET_FAILED + \remark 复位失败 + \note TODO 1.检查是否存在机械故障 + +*/ + +#define RET_BVCTRL_LEFT_PUSH_CARDS_FULL 0x80011601 //左推导轨上板卡满 +#define RET_BVCTRL_RIGHT_PUSH_CARDS_NONE 0x80011602 //右推导轨上无卡 +#define RET_BVCTRL_RIGHT_PUSH_CARDS_FULL 0X80011603 //右推导轨上卡满 +#define RET_BVCTRL_LEFT_PUSH_COORDINATE_WRONG 0x80011604 //左推电机坐标错误 +#define RET_BVCTRL_RIGHT_PUSH_COORDINATE_WRONG 0x80011605 //右推电机坐标错误 +#define RET_BVCTRL_CHANGE_TRACK_CARD_WRONG 0x80011606 //换轨电机动作失败 +#define RET_BVCTRL_LEFT_PUSH_CARD_F 0x80011607 //左推电机动作失败 +#define RET_BVCTRL_NOT_INIT 0x80011608 //BV主控初始化失败 +#define RET_BVCTRL_MOTOR_NOT_RESET 0x80011609 //异常关机中电机未复位 +#define RET_BVCTRL_CLEAR_CARDS 0x8001160A //需清理板卡的异常 +#define RET_BVCTRL_LEFT_ADDING_FAILED 0x8001160B //取卡失败 +#define RET_BVCTRL_CARD_STUCKED 0x8001160C //卡板后失步 +#define RET_BVCTRL_SENSOR_FAILED 0x8001160D //样本架传感器异常 +#define RET_BVCTRL_TEMP_SENSOR_FAILED 0x8001160E //温度传感器异常 +#define RET_BVCTRL_MOTOR_INIT_FAILED 0x8001160F //电机初始化失败 +#define RET_BVCTRL_PARAM_FAILED 0x80011610 //参数读取失败 +#define RET_BVCTRL_RESET_FAILED 0x80011611 //复位失败 + +#define RET_BVCTRL_MOTOR1_LOST_STEP_FWD 0x80011612 //电机1向前失步 +#define RET_BVCTRL_MOTOR1_LOST_STEP_RVS 0x80011613 //电机1向后失步 +#define RET_BVCTRL_MOTOR2_LOST_STEP_FWD 0x80011614 //电机2向前失步 +#define RET_BVCTRL_MOTOR2_LOST_STEP_RVS 0x80011615 //电机2向后失步 +#define RET_BVCTRL_MOTOR3_LOST_STEP_FWD 0x80011616 //电机3向前失步 +#define RET_BVCTRL_MOTOR3_LOST_STEP_RVS 0x80011617 //电机3向后失步 +#define RET_BVCTRL_MOTOR4_LOST_STEP_FWD 0x80011618 //电机4向前失步 +#define RET_BVCTRL_MOTOR4_LOST_STEP_RVS 0x80011619 //电机4向后失步 + +#define RET_BVCTRL_MAGNET_FEEDBACK_WRONG 0x8001161A //电磁铁反馈电平错误 +#define RET_BVCTRL_MAGNET_SENSOR_WRONG 0x8001161B //电磁铁反馈传感器错误 +#define RET_BVCTRL_NOT_RESET 0x8001161C //主控模块电机未复位 +#define RET_BVCTRL_LEFT_ADDING_SURFACE 0X8001161D //取卡过冲 + + +/**@}*/ + +/** + * \defgroup bus 0x80012001 - 0x80012fff: 总线模块错误代码 + */ +/**@{ +*/ +/*! + \def RET_BUS_NOT_INIT + \remark 总线未初始化. + \note 1.软件错误,联系技术支持 + + \def RET_BUS_STACK_OVERFLOW + \remark 总线任务栈溢出 + \note 1.软件错误,联系技术支持 + + \def RET_BUS_NO_AVAILABLE_ADAPTER + \remark 总线适配器数目超出最大值. + \note 1.软件错误,联系技术支持 + + \def RET_BUS_ADAPTER_INIT_FAILED + \remark 总线适配器初始化失败. + \note 1.软件错误,联系技术支持 + + \def RET_BUS_INVALID_ADAPTER + \remark 总线适配器无效,回调函数未空. + \note 1.软件错误,联系技术支持 + + \def RET_BUS_BUFFER_RX_FULL + \remark 总线接受缓冲区已满,BUS_QUEUE_RX_MAX太小. + \note 1.软件错误,联系技术支持 + + \def RET_BUS_DUPLICATE_PACKET + \remark 接收到重复包. + \note 1.软件错误,联系技术支持 + + \def RET_BUS_OBJECT_NOT_FOUND + \remark 节点对象未找到. + \note 1.软件错误,联系技术支持 + + \def RET_BUS_SESSION_FULL + \remark 会话id已满 + \note 1.软件错误,联系技术支持 + + \def RET_BUS_FUNC_UNSUPPORTED + \remark 总线功能不支持 + \note 1.软件错误,联系技术支持 + + \def RET_BUS_REQ_TX_FAILED + \remark 总线请求发送失败.超出发送错误次数 + \note 1.检查PC端CAN发送是否正常,可以尝试给其他模块发送指令 + \n 2.重试操作,给报错节点重发指令是否正常 + \n 3.联系技术支持 + + \def RET_BUS_SUBNET_NOT_FOUND + \remark 子网号不识别 + \note 1.检查节点地址子网号是否有效 + \n 2.软件错误,联系技术支持 + + \def RET_BUS_CMD_MULTI_EXCEED_MAX + \remark 同时执行的指令数超出最大值 + \note 1.软件错误,联系技术支持 + + \def RET_BUS_HEAP_FULL + \remark 堆空间已满,内存分配失败 + \note 1.软件错误,联系技术支持 + + \def RET_BUS_SUBNET_CONFLICT + \remark 子网冲突 + \note 1.软件错误,联系技术支持 + + \def RET_BUS_SUBNET_ID_NOT_INIT + \remark 节点地址为广播地址,不能发送指令,只能广播 + \note 1.检查节点地址是否有效 + + \def RET_BUS_SUBNET_INVALID + \remark 适配器安装时子网无效 + \note 1.软件错误,联系技术支持 + + \def RET_BUS_ADAPTER_OPEN_FAILED + \remark TODO 报错原因. + \note TODO 建议操作 + + \def RET_BUS_ADAPTER_NOT_OPEN + \remark TODO 报错原因. + \note TODO 建议操作 + + \def RET_BUS_ADAPTER_ERROR + \remark TODO 报错原因. + \note TODO 建议操作 + + \def RET_BUS_ADAPTER_OPENED + \remark TODO 报错原因. + \note TODO 建议操作 + + \def RET_BUS_ADAPTER_CLOSE_FAILED + \remark TODO 报错原因. + \note TODO 建议操作 + + \def RET_BUS_CLOSED + \remark TODO 报错原因. + \note TODO 建议操作 + + \def RET_BUS_SESSION_CONFLICT + \remark TODO 报错原因. + \note TODO 建议操作 + + \def RET_BUS_INVALID_PACKET + \remark 数据包无效,不满足指令包和结果包字节数 + \note 1.软件错误,联系技术支持 + + \def RET_BUS_INVALID_RET_FORMAT + \remark 指令返回参数格式无效(字节数不满足要求). + \note 1.软件错误,联系技术支持 + + \def RET_BUS_BUFFER_TX_FULL + \remark 发送缓冲区已满,BUS_QUEUE_TX_MAX太小. + \note 1.软件错误,联系技术支持 + + \def RET_BUS_BUFFER_CMDHOST_FULL + \remark 指令主机缓冲区已满,BUS_SESSION_CMD_MAX太小. + \note 1.软件错误,联系技术支持 + + \def RET_BUS_BUFFER_CMDSLAVE_FULL + \remark 指令从机缓冲区已满,BUS_SESSION_CMD_MAX太小.. + \note 1.软件错误,联系技术支持 + + \def RET_BUS_BUFFER_EVENT_FULL + \remark 事件缓冲区已满, BUS_SESSION_EVENT_MAX太小. + \note 1.软件错误,联系技术支持 + + \def RET_BUS_BUFFER_NODEMGR_FULL + \remark 节点管理缓冲区已满,BUS_NODE_MAX太小. + \note 1.软件错误,联系技术支持 + + \def RET_BUS_LOG_BUFFER_NOT_INIT + \remark TODO 报错原因. + \note TODO 建议操作 + +*/ +#define RET_BUS_NOT_INIT 0x80012001 +#define RET_BUS_STACK_OVERFLOW 0x80012002 +#define RET_BUS_NO_AVAILABLE_ADAPTER 0x80012003 +#define RET_BUS_ADAPTER_INIT_FAILED 0x80012004 +#define RET_BUS_INVALID_ADAPTER 0x80012005 +#define RET_BUS_BUFFER_RX_FULL 0x80012006 // BUS_QUEUE_RX_MAX太小 +#define RET_BUS_DUPLICATE_PACKET 0x80012007 +#define RET_BUS_OBJECT_NOT_FOUND 0x80012008 +#define RET_BUS_SESSION_FULL 0x80012009 +#define RET_BUS_FUNC_UNSUPPORTED 0x8001200a +#define RET_BUS_REQ_TX_FAILED 0x8001200b +#define RET_BUS_SUBNET_NOT_FOUND 0x8001200c +#define RET_BUS_CMD_MULTI_EXCEED_MAX 0x8001200d +#define RET_BUS_HEAP_FULL 0x8001200e +#define RET_BUS_SUBNET_CONFLICT 0x8001200f +#define RET_BUS_SUBNET_ID_NOT_INIT 0x80012010 +#define RET_BUS_SUBNET_INVALID 0x80012011 +#define RET_BUS_ADAPTER_OPEN_FAILED 0x80012012 +#define RET_BUS_ADAPTER_NOT_OPEN 0x80012013 +#define RET_BUS_ADAPTER_ERROR 0x80012014 +#define RET_BUS_ADAPTER_OPENED 0x80012015 +#define RET_BUS_ADAPTER_CLOSE_FAILED 0x80012016 +#define RET_BUS_CLOSED 0x80012017 +#define RET_BUS_SESSION_CONFLICT 0x80012018 +#define RET_BUS_INVALID_PACKET 0x80012019 +#define RET_BUS_INVALID_RET_FORMAT 0x8001201a +#define RET_BUS_BUFFER_TX_FULL 0x8001201b // BUS_QUEUE_TX_MAX太小 +#define RET_BUS_BUFFER_CMDHOST_FULL 0x8001201c // BUS_SESSION_CMD_MAX太小 +#define RET_BUS_BUFFER_CMDSLAVE_FULL 0x8001201d // BUS_SESSION_CMD_MAX太小 +#define RET_BUS_BUFFER_EVENT_FULL 0x8001201e // BUS_SESSION_EVENT_MAX太小 +#define RET_BUS_BUFFER_NODEMGR_FULL 0x8001201f // BUS_NODE_MAX太小 + +//总线日志错误代码定义 0x80012100~ +#define RET_BUS_LOG_BUFFER_NOT_INIT 0x80012100 +/**@}*/ + +/** + * \defgroup canbus 0x80012101 - 0x800121ff: CAN模块错误代码 + */ +/**@{ +*/ +/*! + \def RET_CAN_BUFFER_FULL + \remark CAN缓冲区已满. + \note 1.软件错误,联系技术支持 + + \def RET_CAN_PACKET_TOO_LARGE + \remark CAN包帧数超出了所支持的最大数据包的帧数. + \note 1.软件错误,联系技术支持 + + \def RET_CAN_TX_NO_ACK + \remark 发送无应答. + \note 1.检查CAN通信线路是否收到干扰 + + \def RET_CAN_TX_ARB_LOST + \remark ALI 仲裁丢失. + \note 1.检查CAN通信线路是否收到干扰 + + \def RET_CAN_TX_ERR + \remark BEI总线错误. + \note 1.检查CAN通信线路是否收到干扰 + + \def RET_CAN_TX_TIMEOUT + \remark CAN发送超时(1s). + \note 1.检查CAN通信线路是否收到干扰 + + \def RET_CAN_TX_RETRY_FAILED + \remark 重试发送失败. + \note 1.检查CAN通信线路是否收到干扰 + + \def RET_CAN_RX_DESTID_MISMATCH + \remark 接收到的包不是广播也不是给本节点发的. + \note 1.软件错误,联系技术支持 + + \def RET_CAN_RX_INVALID_FRAME + \remark 接收到的帧无效,数据长度不符合要求. + \note 1.软件错误,联系技术支持 + + \def RET_CAN_RX_DUPLICATED_FRAME + \remark 接收到了重复帧. + \note 1.软件错误,联系技术支持 + + \def RET_CAN_RX_INVALID_FRAMEID + \remark 接收到的帧索引无效. + \note 1.软件错误,联系技术支持 + + \def RET_CAN_RX_ERR + \remark TODO 报错原因. + \note TODO 建议操作 + + \def RET_CAN_CANSEND_HAL_FAILED + \remark HAL层发送失败. + \note 1.检查CAN通信线路是否收到干扰 + + \def RET_CAN_TX_HAL_SENDMAIL_FULL + \remark stm32硬件发送邮箱满, + \note 1.请排除软件bug + + \def RET_CAN_ADDR_CONFLICT + \remark CAN 地址冲突, + \note 1.请更换本节点的CAN地址 +*/ +#define RET_CAN_BUFFER_FULL 0x80012101 +#define RET_CAN_PACKET_TOO_LARGE 0x80012102 +#define RET_CAN_TX_NO_ACK 0x80012103 // no acknowledge +#define RET_CAN_TX_ARB_LOST 0x80012104 // arbitration lost +#define RET_CAN_TX_ERR 0x80012105 // other error +#define RET_CAN_TX_TIMEOUT 0x80012106 +#define RET_CAN_TX_RETRY_FAILED 0x80012107 +#define RET_CAN_RX_DESTID_MISMATCH 0x80012108 +#define RET_CAN_RX_INVALID_FRAME 0x80012109 +#define RET_CAN_RX_DUPLICATED_FRAME 0x8001210a +#define RET_CAN_RX_INVALID_FRAMEID 0x8001210b +#define RET_CAN_RX_ERR 0x8001210c +#define RET_CAN_CANSEND_HAL_FAILED 0x8001210d +#define RET_CAN_TX_HAL_SENDMAIL_ERROR 0x8001210e +#define RET_CAN_ADDR_CONFLICT 0x8001210f +/**@}*/ + +/** + * \defgroup uartbus 0x80012201 - 0x800122ff: UART模块错误代码 + */ +/**@{ +*/ +/*! + \def RET_UART_BUFFER_FULL + \remark 串口缓冲区已满. + \note 1.软件错误,联系技术支持 + + \def RET_UART_TX_TIMEOUT + \remark 串口发送超时. + \note 1.检查CAN通信线路是否收到干扰 + + \def RET_UART_TX_RETRY_FAILED + \remark 串口重试发送失败. + \note 1.检查CAN通信线路是否收到干扰 + + \def RET_UART_RX_ERR + \remark TODO 报错原因. + \note TODO 建议操作 +*/ +#define RET_UART_BUFFER_FULL 0x80012201 +#define RET_UART_TX_TIMEOUT 0x80012206 +#define RET_UART_TX_RETRY_FAILED 0x80012207 +#define RET_UART_RX_ERR 0x8001220c +/**@}*/ + +/** + * \defgroup i2cbus 0x80012201 - 0x800122ff: I2C模块错误代码 + */ +/**@{ +*/ +/*! + \def RET_I2C_BUFFER_FULL + \remark TODO 报错原因. + \note TODO 建议操作 + + \def RET_I2C_TX_TIMEOUT + \remark TODO 报错原因. + \note TODO 建议操作 + + \def RET_I2C_TX_RETRY_FAILED + \remark TODO 报错原因. + \note TODO 建议操作 + + \def RET_I2C_RX_ERR + \remark TODO 报错原因. + \note TODO 建议操作 + + \def RET_I2C_BUFFER_EMPTY + \remark TODO 报错原因. + \note TODO 建议操作 + + \def RET_I2C_TX_NO_ACK + \remark TODO 报错原因. + \note TODO 建议操作 + + \def RET_I2C_PACK_TOO_LONG + \remark TODO 报错原因. + \note TODO 建议操作 +*/ +#define RET_I2C_BUFFER_FULL 0x8001220d +#define RET_I2C_TX_TIMEOUT 0x8001220e +#define RET_I2C_TX_RETRY_FAILED 0x8001220f +#define RET_I2C_RX_ERR 0x800122a0 +#define RET_I2C_BUFFER_EMPTY 0x800122a1 +#define RET_I2C_TX_NO_ACK 0x800122a2 +#define RET_I2C_PACK_TOO_LONG 0x800122a3 +/**@}*/ + +/** + * \defgroup socketbus 0x80012300 - 0x800123f: socket 模块错误代码 + */ +/**@{ +*/ +/*! + \def RET_SOCKET_ERR + \remark unknow socket error + \note + + \def RET_SOCKET_ADDR_ALREADY_IN_USE + \remark application attempts to bind a socket to an IP address/port that has already been used for an existing socket, or a socket that was not closed properly, or one that is still in the process of closing(msdn winsock:10048; ) + \note 1. + + \def RET_SOCKET_WINSOCK_NOT_INT + \remark application has not called WSAStartup or WSAStartup failed(msdn winsock:10093; ) + \note 1. + + \def RET_SOCKET_NETWORK_UNREACH + \remark (msdn winsock:10051; ) + \note 1. + + \def RET_SOCEKT_PERMISSION_DENIED + \remark operate is forbidden(msdn winsock:10013;). send broadcast without broadcast permission. + \note 1. + + \def RET_SOCKET_BAD_ADDRESS + \remark (msdn winsock:10014;). + \note 1. + + \def RET_SOCKET_MESSAGE_TOO_LONG + \remark (msdn winsock:10040;). + \note 1. +*/ +#define RET_SOCKET_ERR 0x80012300 +#define RET_SOCKET_ADDR_ALREADY_IN_USE 0x80012301 +#define RET_SOCKET_WINSOCK_NOT_INT 0x80012302 +#define RET_SOCKET_NETWORK_UNREACH 0x80012303 +#define RET_SOCEKT_PERMISSION_DENIED 0x80012304 +#define RET_SOCKET_BAD_ADDRESS 0x80012305 +#define RET_SOCKET_MESSAGE_TOO_LONG 0x80012306 + +/** + * \defgroup cmdsys 0x80013001 - 0x80013fff: 指令系统错误代码 + */ +/**@{ +*/ +/*! + \def RET_COMMAND_ABORTED + \remark 指令被取消. + \note 1.检查CAN通信线路是否收到干扰 + + \def RET_COMMAND_NO_RESPONSE + \remark 指令无响应,未收到从机的ACK包. + \note 1.检查指令发送方接收是否正常 + \n 2.检查指令接收方发送是否正常 + \n 3.重试指令是否正常 + + \def RET_COMMAND_TIMEOUT + \remark 指令超时,长时间未收到数据包. + \note 1.检查指令发送方接收是否正常 + \n 2.检查指令接收方发送是否正常 + \n 3.重试指令是否正常 + + \def RET_COMMAND_INVALID + \remark 无效指令. + \note 1.软件错误,联系技术支持 + + \def RET_COMMAND_INVALID_FORMAT + \remark 指令格式无效. + \note 1.软件错误,联系技术支持 +*/ +#define RET_COMMAND_ABORTED 0x80013001 +#define RET_COMMAND_NO_RESPONSE 0x80013002 +#define RET_COMMAND_TIMEOUT 0x80013003 +#define RET_COMMAND_INVALID 0x80013004 +#define RET_COMMAND_INVALID_FORMAT 0x80013005 +/**@}*/ + +/** + * \defgroup motor 0x80013010 - 0x8001301f: 电机模块错误代码 + */ +/**@{ +*/ +/*! + \def RET_MOTOR_BUSY + \remark 电机忙,电机运动指令执行过程中又接收到一条运动指令. + \note 1.是否连续对电机发送了运动指令 + \n 2.软件错误,联系技术支持 + + \def RET_MOTOR_START_TIMEOUT + \remark 等待同步信号的超时(1s). + \note 1.检查同步线通信是否正常 + + \def RET_MOTOR_SENSOR_FAILED + \remark 传感器检测失败. + \note 1.检查传感器工作是否正常 + + \def RET_MOTOR_LOST_STEP_FWD + \remark 电机正向失步. + \note 1.检查电机失步数是否满足失步条件 + \n 2.检查电机安装是否正确 + + \def RET_MOTOR_LOST_STEP_RVS + \remark 电机反向失步. + \note 1.检查电机失步数是否满足失步条件 + \n 2.检查电机安装是否正确 + + \def RET_MOTOR_ABORTED + \remark 电机运动被终止. + \note 1.检查电机运动过程中指令是否被取消 + \n 2.如果是同步过程中报了该错误,表示触发条件已满足 + + \def RET_MOTOR_TC_OVERFLOW + \remark 电机计数溢出. + \note 1.更新电机固件至r5901以上 + \n 2.修改电机细分至8细分,降低计数频率 + + \def RET_MOTOR_SEQUENCE_EXCEED_MAX + \remark 电机运动序列次数超出最大值(4). + \note 1.软件错误,联系技术支持 + + \def RET_MOTOR_COORD_OUT_BOUND + \remark 电机坐标越界. + \note 1.检查电机运动坐标是否已超出最大行程参数 + + \def RET_MOTOR_COORD_MUST_ABS_WHEN_BUSY + \remark 电机坐标必须为绝对坐标. + \note 1.软件错误,联系技术支持 + + \def RET_MOTOR_AREA_CNT_EXCEED_MAX + \remark 区域坐标设置时区域数超出最大值(4). + \note 1.软件错误,联系技术支持 + + \def RET_MOTOR_MULTI_EXCEED_MAX + \remark 同时运动的电机数超出最大值(4). + \note 1.软件错误,联系技术支持 + + \def RET_MOTOR_ERR + \remark 多电机运动时有电机执行失败. + \note 1.检查执行失败的电机工作是否正常 +*/ +#define RET_MOTOR_BUSY 0x80013010 +#define RET_MOTOR_START_TIMEOUT 0x80013011 +#define RET_MOTOR_SENSOR_FAILED 0x80013012 +#define RET_MOTOR_LOST_STEP_FWD 0x80013013 +#define RET_MOTOR_LOST_STEP_RVS 0x80013014 +#define RET_MOTOR_ABORTED 0x80013015 +#define RET_MOTOR_TC_OVERFLOW 0x80013016 +#define RET_MOTOR_SEQUENCE_EXCEED_MAX 0x80013017 +#define RET_MOTOR_COORD_OUT_BOUND 0x80013018 +#define RET_MOTOR_COORD_MUST_ABS_WHEN_BUSY 0x80013019 +#define RET_MOTOR_AREA_CNT_EXCEED_MAX 0x8001301a +#define RET_MOTOR_MULTI_EXCEED_MAX 0x8001301b +#define RET_MOTOR_CONFLICT 0x8001301c +#define RET_MOTOR_NOT_CONFIG 0x8001301d +#define RET_MOTOR_NOT_INIT 0x8001301e +#define RET_MOTOR_ERR 0x8001301f +/**@}*/ + +/** + * \defgroup multi.motor 0x80013600 - 0x800136ff: 新电机错误代码 + */ +/**@{ +*/ +/*! + \def RET_MULTI_MOTOR_RVS_SCHMITT_FAILED + \remark 施密特检查错误,电机从触发到不触发行程小于零位坐标 + \note 1.电机在触发零位后反向失步 + 2.检查零位装置是否安装正确 + + \def RET_MULTI_MOTOR_FWD_SCHMITT_FAILED + \remark 施密特检查错误 + \note 1.电机从0坐标到传感器跳变期间正向失步 + 2.检查零位装置是否安装正确 + + \def RET_MULTI_MOTOR_SPITASK_TIMEOUT + \remark 动作任务等待SPI通信任务执行超时 + \note 1.检查SPI通信任务是否正常 + \note 1.固件错误,联系研发 + + \def RET_MULTI_MOTOR_WPARAM_FORBIDDEN + \remark 写芯片参数条件不符,拒绝修改 + \note 1.确保写参数指令在允许条件下发送 + + \def RET_MULTI_MOTOR_WPARAM_INVALID + \remark 写参数时值超出允许范围 + \note 1.确保参数写入允许范围内的值 + + \def RET_MULTI_MOTOR_ZERO_LOST_STEP_FWD + \remark 复位时第二次检测到的正向跳变点大于零位坐标+7p + \note 1.确保0坐标到零位没有拉住挡片运动 + + \def RET_MULTI_MOTOR_ZERO_LOST_STEP_RVS + \remark 复位时第二次检测到的正向跳变点小于零位坐标+1p + \note 1.确保零位到0坐标没有挡住挡片运动 + + \def RET_MULTI_MOTOR_CHAIN_EXCEED_MAX + \remark 开机自检,连接数超出6 + \note 1.确保电路板连接数不超过6个 + + \def RET_MULTI_MOTOR_STATUS_ERROR + \remark 运行过程中状态错误,电机一直处于busy的状态但是abspos一直不变 + \note 1.检查速度是否过小 + + \def RET_MULTI_MOTOR_SENSOR_STABLE_ERROR + \remark 回零跳变后零位传感器信号不稳定(稳定的条件,采集最多50次,且有连续5次状态一致) + \note 1.检查速度是否过大,机械臂晃动产生 + + \def RET_MULTI_MOTOR_SPI_ABNORMAL + \remark SPI读到了异常值 + \note 1.固件错误,联系研发 + + \def RET_MULTI_MOTOR_SPI_BUSY + \remark 当前通道电机正在执行spi通信,不可并发. + \note 固件错误,联系研发 + + \def RET_MULTI_MOTOR_SPI_CMD_ERROR + \remark SPI通信时指令类型错误. + \note 固件错误,联系研发 + + \def RET_MULTI_MOTOR_CMD_BUSY + \remark 当前通道的电机指令正在处理,等待返回。 + \note 调用错误,联系研发 + + \def RET_MULTI_MOTOR_RUN_BUSY + \remark 当前通道的电机在发送spi指令前读到busy信号为忙。 + \note 固件错误,联系研发 + + \def RET_MULTI_MOTOR_CMD_BUFFER_FULL + \remark 可并行执行的指令缓冲已满(电机数)。 + \note 调用错误,联系研发 + +*/ + +#define RET_MULTI_MOTOR_RVS_SCHMITT_FAILED 0x80013600 +#define RET_MULTI_MOTOR_FWD_SCHMITT_FAILED 0x80013601 //已取消 +#define RET_MULTI_MOTOR_SPITASK_TIMEOUT 0x80013602 //已取消 +#define RET_MULTI_MOTOR_WPARAM_FORBIDDEN 0x80013603 +#define RET_MULTI_MOTOR_WPARAM_INVALID 0x80013604 +#define RET_MULTI_MOTOR_ZERO_LOST_STEP_FWD 0x80013605 //已取消 +#define RET_MULTI_MOTOR_ZERO_LOST_STEP_RVS 0x80013606 //已取消 +#define RET_MULTI_MOTOR_CHAIN_EXCEED_MAX 0x80013607 +#define RET_MULTI_MOTOR_STATUS_ERROR 0x80013608 +#define RET_MULTI_MOTOR_SENSOR_STABLE_ERROR 0x80013609 +#define RET_MULTI_MOTOR_SPI_ABNORMAL 0x8001360a +#define RET_MULTI_MOTOR_DIR_ERROR 0x8001360b +#define RET_MULTI_MOTOR_SPI_BUSY 0x8001360c +#define RET_MULTI_MOTOR_SPI_CMD_ERROR 0x8001360d +#define RET_MULTI_MOTOR_CMD_BUSY 0x8001360e +#define RET_MULTI_MOTOR_RUN_BUSY 0x8001360f +#define RET_MULTI_MOTOR_CMD_BUFFER_FULL 0x80013610 +#define RET_MULTI_MOTOR_MOVE_TIMEOUT 0x80013611 +/**@}*/ + +/** + * \defgroup property 0x80013020 - 0x8001302f: 存储系统错误代码 + */ +/**@{ +*/ +/*! + \def RET_PROPERTY_NOT_INIT + \remark 属性库未初始化. + \note 1.软件错误,联系技术支持 + + \def RET_PROPERTY_FILE_OPEN_ERR + \remark 配置文件打开失败. + \note 1.检查配置文件是否存在 + \n 2.检查SD接触是否良好 + + \def RET_PROPERTY_FILE_CLOSE_ERR + \remark TODO 报错原因. + \note TODO 建议操作 + + \def RET_PROPERTY_FILE_READ_ERR + \remark 配置文件读失败. + \note 1.检查配置文件是否存在 + \n 2.检查SD接触是否良好 + + \def RET_PROPERTY_FILE_WRITE_ERR + \remark 配置文件写失败. + \note 1.检查配置文件是否存在 + \n 2.检查SD接触是否良好 + \n 3.检查SD是否写保护了 + + \def RET_PROPERTY_NOT_FOUND + \remark 配置未找到,配置文件中未设置该参数. + \note 1.检查该参数是否未设置 + + \def RET_PROPERTY_OUT_OF_VAL_BUF + \remark 参数值缓冲区溢出,读取到的参数值超出了预期类型的数据大小. + \note 1.检查该参数值设置是否正确 + \n 2.软件错误,联系技术支持 + + \def RET_PROPERTY_HEAP_FULL + \remark 属性库堆溢出. + \note 1.软件错误,联系技术支持 + + \def RET_PROPERTY_INVALID_STORE_ID + \remark 本地参数文件读写时ID为空. + \note 1.软件错误,联系技术支持 + + \def RET_PROPERTY_EFORMAT + \remark 参数值无效,非数字或字母开头,无法做转换. + \note 1.检查该参数值设置是否正确 + + \def RET_PROPERTY_ERANGE + \remark 参数值超出了其类型的最大值. + \note 1.检查该参数值设置是否正确 + + \def RET_PROPERTY_SETP_LIST_EXCEED_MAX + \remark 批量设置属性时,属性数超出了最大值(0xff). + \note TODO 建议操作 + + \def RET_PROPERTY_INVALID_SIGNATURE + \remark 签名出错. + \note 1.签名文件是否存在 + \n 2.SD卡接触是否良好 + \n 3.签名文件是否正确 + + \def RET_PROPERTY_INVALID_KEY + \remark 属性key不符合要求(必须为字母、数字、下划线、-、[、]、.组成). + \note 1.软件错误,联系技术支持 + +*/ +#define RET_PROPERTY_NOT_INIT 0x80013020 +#define RET_PROPERTY_FILE_OPEN_ERR 0x80013021 +#define RET_PROPERTY_FILE_CLOSE_ERR 0x80013022 +#define RET_PROPERTY_FILE_READ_ERR 0x80013023 +#define RET_PROPERTY_FILE_WRITE_ERR 0x80013024 +#define RET_PROPERTY_NOT_FOUND 0x80013025 +#define RET_PROPERTY_OUT_OF_VAL_BUF 0x80013026 +#define RET_PROPERTY_HEAP_FULL 0x80013027 +#define RET_PROPERTY_INVALID_STORE_ID 0x80013028 +#define RET_PROPERTY_EFORMAT 0x80013029 +#define RET_PROPERTY_ERANGE 0x8001302a +#define RET_PROPERTY_SETP_LIST_EXCEED_MAX 0x8001302b +#define RET_PROPERTY_INVALID_SIGNATURE 0x8001302c +#define RET_PROPERTY_INVALID_KEY 0x8001302d +/**@}*/ + +/** + * \defgroup sysmgr 0x80013030 - 0x8001303f: 系统管理模块错误代码 + */ +/**@{ +*/ + +/*! + \def RET_SYSMGR_NOT_INIT + \remark 系统管理未初始化. + \note 1. 软件错误, 联系技术支持 + + \def RET_SYSMGR_BEEP_BUSY + \remark 蜂鸣器忙(正在执行指令又收到一条指令) + \note 1.若调试软件出现此错误则等待上一个指令执行完成后再发送新指令 + \n 2.若用户软件出现此错误则为软件错误, 联系技术支持 + + \def RET_SYSMGR_BEEP_EXCEED_LIMIT + \remark 蜂鸣器控制超出时间限制 + \note 1.调整指令参数使(on+off)*repeat < 6s + + \def RET_SYSMGR_PROP_BUFFER_FULL + \remark 配置缓冲已满 + \note 1. 软件错误, 联系技术支持 + + \def RET_SYSMGR_HEAP_FULL + \remark 堆溢出 + \note 1.固件错误, 联系技术支持 + + \def RET_SYSMGR_FILE_BUFFER_FULL + \remark 文件缓冲已满 + \note 1. 软件错误, 联系技术支持 + + \def RET_SYSMGR_FSTATUS_BUFFER_FULL + \remark 写文件时锁队列已满 + \note 1.固件错误, 联系技术支持 + + \def RET_SYSMGR_FWRITE_LOCKED + \remark 写文件时文件被锁 + \note 1.对同一文件操作时,写文件指令结束后再发送下一条指令 + + \def RET_SYSMGR_FWRITE_FAILED + \remark 写文件失败 + \note 1.检查SD卡接触是否良好 + \n 2.是否写保护 + + \def RET_SYSMGR_FSEEK_FAILED + \remark 文件指针定位失败 + \note 1.检查SD卡接触是否良好 + + \def RET_SYSMGR_FOPEN_FAILED + \remark 文件打开失败 + \note 1.检查SD卡接触是否良好 + \n 2.如果是可写方式打开文件则检查SD是否写保护 + \n 3.如果是可写方式打开文件则检查SD是否写保护 + \n 4.如果是打开已存在文件的方式则检查SD中该文件是否存在 + + \def RET_SYSMGR_DIR_NOT_EMPTY + \remark 删除目录时目录非空 + \note 1.检查SD卡中该目录是否为空 + + \def RET_SYSMGR_FUNLINK_FAILED + \remark 文件删除失败 + \note 1.检查SD卡接触是否良好 + \n 2.检查SD是否写保护 + \n 3.检查SD中待删文件是否存在 + + \def RET_SYSMGR_FWRITE_DISK_FULL + \remark 写文件时实际写入的字节数小于所要求的字节数则认为磁盘空间不足 + \note 1.检查SD卡存储空间是否已满 + + \def RET_SYSMGR_FTRUNCATE_FAILED + \remark 裁剪文件内容失败 + \note 1.检查SD卡接触是否良好 + \n 2.检查SD卡是否写保护 + + \def RET_SYSMGR_STAT_FAILED + \remark 查询文件状态失败 + \note 1.检查SD卡接触是否良好 + \n 2.检查SD卡文件是否存在 + +*/ +#define RET_SYSMGR_NOT_INIT 0x80013030 +#define RET_SYSMGR_BEEP_BUSY 0x80013031 +#define RET_SYSMGR_BEEP_EXCEED_LIMIT 0x80013032 +#define RET_SYSMGR_PROP_BUFFER_FULL 0x80013033 //属性队列满 +#define RET_SYSMGR_HEAP_FULL 0x80013034 //堆栈申请失败 +#define RET_SYSMGR_FILE_BUFFER_FULL 0x80013035 //指令队列满 +#define RET_SYSMGR_FSTATUS_BUFFER_FULL 0x80013036 //文件锁定状态队列满 +#define RET_SYSMGR_FWRITE_LOCKED 0x80013037 //待写文件已被某节点锁定 +#define RET_SYSMGR_FWRITE_FAILED 0x80013038 //写文件失败 +#define RET_SYSMGR_FSEEK_FAILED 0x80013039 //文件指针重定向失败 +#define RET_SYSMGR_FOPEN_FAILED 0x8001303a //文件打开失败 +#define RET_SYSMGR_DIR_NOT_EMPTY 0x8001303b //待删除目录为非空 +#define RET_SYSMGR_FUNLINK_FAILED 0x8001303c //文件或者目录删除失败 +#define RET_SYSMGR_FWRITE_DISK_FULL 0x8001303d //写文件时磁盘已满 +#define RET_SYSMGR_FTRUNCATE_FAILED 0x8001303e //裁剪文件失败 +#define RET_SYSMGR_STAT_FAILED 0x8001303f //获取文件信息失败 +/**@}*/ + +// 0x80013040 - 0x8001307f: 血培养模块错误代码 +/*#define RET_BCC_SERVICE_NOT_OPEN 0x80013040 +#define RET_BCC_SET_STATE_PID_BUSY 0x80013041 +#define RET_BCC_GET_STATE_PID_BUSY 0x80013042 +#define RET_BCC_SET_PARAM_PID_BUSY 0x80013043 +#define RET_BCC_GET_PARAM_PID_BUSY 0x80013044 +#define RET_BCC_SET_TIME_BUSY 0x80013045 +#define RET_BCC_MODULE_POST_NOT_PASSED 0x80013046 +#define RET_BCC_MODULE_NOT_INITIALIZED 0x80013047 +#define RET_BCC_MODULE_CH0_POST_NOT_PASSED 0x80013048 +#define RET_BCC_MODULE_CH1_POST_NOT_PASSED 0x80013049 +#define RET_BCC_MODULE_CH2_POST_NOT_PASSED 0x80013050 +#define RET_BCC_MODULE_NOT_RUNNING 0x80013051 +#define RET_BCC_NTP_FAILED 0x80013052 +#define RET_BCC_SAVE_PID_PARAM_FAILED 0x80013053 + +#define RET_BCR_SERVICE_NOT_OPEN 0x80013060 +#define RET_BCR_GET_TEMP_BUSY 0x80013061 +#define RET_BCR_GET_AIR_TEMP_BUSY 0x80013062 +#define RET_BCR_ASYN_GET_RGB_BUSY 0x80013063 +#define RET_BCR_SYN_GET_RGB_BUSY 0x80013064 +#define RET_BCR_SET_RESULT_LED_BUSY 0x80013065 +#define RET_BCR_GET_POS_STATE_BUSY 0x80013066 +#define RET_BCR_DEVIATION_CORRECT_BUSY 0x80013067 +#define RET_BCR_GET_MODE_BUSY 0x80013068 +#define RET_BCR_SET_MODE_BUSY 0x80013069 +#define RET_BCR_SET_DEVIATION_MODE_BUSY 0x80013070 +#define RET_BCR_SET_TIME_BUSY 0x80013071 +#define RET_BCR_DETECT_CH_PHY_ERR 0x80013072 +#define RET_BCR_NO_CONTAINER_IN_POS 0x80013073 +#define RET_BCR_SLOT_CORRECT_NOT_DONE 0x80013074 +#define RET_BCR_NOT_SUPPORTED_COMMAND 0x80013075 +#define RET_BCR_DEVIATION_STAT_NOT_ENTER 0x80013076 +#define RET_BCR_NOT_IN_OPEN_DRAWER_MODE 0x80013077 +#define RET_BCR_NOT_IN_DETECT_MODE 0x80013078 +#define RET_BCR_DEVIATION_STAT_ENTER 0x80013079*/ + +/** + * \defgroup pressure 0x80013080 - 0x8001308f: 液面探测模块错误代码 + */ +/**@{ +*/ +/*! + \def RET_PRESSURE_BUSY + \remark 压力控制忙,压力控制过程中又接收到控制指令. + \note 1.是否连续对压力模块发送了控制指令 + \n 2.软件错误,联系技术支持 + + \def RET_PRESSURE_NOT_READY + \remark 未采集过参考压力. + \note 1.压力控制前先采集参考压力 + + \def RET_PRESSURE_INVALID_CH + \remark 压力通道无效. + \note 1.检查软件中指令参数的通道号是否正确 + + \def RET_PRESSURE_CAP_DISABLED + \remark TODO 报错原因. + \note TODO 建议操作 + + \def RET_PRESSURE_OVERFLOW + \remark 压力值溢出了(0xffff). + \note 1.检查AD信号是否正常 + + \def RET_PRESSURE_TIMEOUT + \remark 采集平均电容指令(motPresAve) 在指定的timeout内没有完成要采集的条件(次数、时间、条件与/或关系). + \note 1.检查AD信号输出是否正常 + 2.检查指令调用参数 + + \def RET_PRESSURE_CUTOFF_CNT_EXCEED_MAX + \remark 压力控制时,压力阈值数超出最大值(4). + \note 1.软件错误,联系技术支持 + + \def RET_PRESSURE_ERR_CNT_EXCEED_MAX + \remark 压力采集错误次数超出最大值(8). + \note 1.检查AD信号是否正常 + +*/ +#define RET_PRESSURE_BUSY 0x80013080 +#define RET_PRESSURE_NOT_READY 0x80013081 +#define RET_PRESSURE_INVALID_CH 0x80013082 +#define RET_PRESSURE_CAP_DISABLED 0x80013083 +#define RET_PRESSURE_OVERFLOW 0x80013084 +#define RET_PRESSURE_TIMEOUT 0x80013085 +#define RET_PRESSURE_CUTOFF_CNT_EXCEED_MAX 0x80013086 +#define RET_PRESSURE_ERR_CNT_EXCEED_MAX 0x80013087 // 触发器模式连续读压力或者电容出错达到指定次数而自动关闭触发器 +/**@}*/ + +/** + * \defgroup armgrp 0x80013090 - 0x800130bf: 加样臂模块错误代码 + */ +/**@{ +*/ +/*! + \def RET_ARMGRP_INVALID_CONFIG + \remark 加样臂配置参数错误 + \note 1.使用调试软件的参数检查功能进行检查 + + \def RET_ARMGRP_INVALID_BASIS + \remark Panel%d.Size.{x|y}参数错误 + \note 1.使用调试软件的参数检查功能进行检查 + + \def RET_ARMGRP_INVALID_DIRECTION + \remark 电机运动指令参数错误 + \note 1.调试软件错误, 联系技术支持 + + \def RET_ARMGRP_BUSY + \remark 加样臂忙(正在执行上一个指令时又收到新指令) + \note 1.若调试软件出现此错误则等待上一个指令执行完成后再发送新指令 + \n 2.若用户软件出现此错误则为软件错误, 联系技术支持 + + \def DEPRECATED_RET_ARMGRP_PROPERTY_INVALID + \remark TODO 报错原因. + \note TODO 建议操作 + + \def DEPRECATED_RET_ARMGRP_PROPERTY_READONLY + \remark TODO 报错原因. + \note TODO 建议操作 + + \def DEPRECATED_RET_ARMGRP_PROPERTY_NOT_COORDINATE + \remark TODO 报错原因. + \note TODO 建议操作 + + \def DEPRECATED_RET_ARMGRP_PROPERTY_INCOMPATIBLE + \remark TODO 报错原因. + \note TODO 建议操作 + + \def DEPRECATED_RET_ARMGRP_INVALID_PROPERTYLIST + \remark TODO 报错原因. + \note TODO 建议操作 + + \def DEPRECATED_RET_ARMGRP_INVALID_KEY_FMTSTRING + \remark TODO 报错原因. + \note TODO 建议操作 + + \def RET_ARMGRP_HEAP_FULL + \remark 堆溢出 + \note 1.固件错误, 联系技术支持 + + \def RET_ARMGRP_CALIBRATE_HAS_TIP_CUVETTE + \remark 定标时加样枪带有吸头或反应杯 + \note 1.打掉吸头或反应杯后重新定标 + + \def RET_ARMGRP_OTHER_PIPETTE_HAS_TIP_CUVETTE + \remark 操作某个加样枪时其他加样枪上的吸头或反应杯未打掉 + \note 1.打掉其他加样枪上的吸头或反应杯, 然后重新执行本操作 + + \def RET_ARMGRP_COORD_OUT_BOUND + \remark 电机运动超出允许范围 + \note 1.使用调试软件的参数检查功能进行检查 + \n 2.重新定标 + + \def RET_ARMGRP_MOTOR_NOT_INIT + \remark 电机尚未机械复位 + \note 1.对单个电机或整个加样臂进行机械复位, 然后重新执行本操作 + + \def RET_ARMGRP_TARGET_WASTE_NOT_FOUND + \remark 打废液时找不到废液孔 + \note 1.使用调试软件的参数检查功能进行检查 + + \def RET_ARMGRP_NO_TIP_CUVETTE_ON_PIPETTE + \remark 执行吸液或者其他需要吸头(或反应杯)的指令时加样枪没有吸头(或反应杯) + \note 1.先取吸头(或反应杯)然后重新执行本操作 + + \def RET_ARMGRP_DROP_TIP_CUVETTE_FAILED + \remark 打吸头(或反应杯)失败(打吸头(或反应杯)动作完成后仍然检测到吸头(或反应杯)) + \note 1.重试打吸头(或反应杯) + \n 2.观察打吸头(或反应杯)过程中是否有碰撞, 卡槽是否到位, 若不正常则重新定标 + \n 3.检查吸头(或反应杯)传感器是否正常 + + \def RET_ARMGRP_NO_TIP_CUVETTE_TYPE_MATCH + \remark 找不到与加样枪匹配的吸头或反应杯 + \note 1.使用调试软件的参数检查功能进行检查 + + \def RET_ARMGRP_TIP_CUVETTE_TYPE_MISMATCH + \remark 指定的加样配置与吸头或反应杯类型不匹配 + \note 1.使用调试软件的参数检查功能进行检查 + \n 2.软件错误, 联系技术支持 + + \def RET_ARMGRP_TARGET_TIP_NOT_FOUND + \remark 找不到指定类型的吸头架 + \note 1.使用调试软件的参数检查功能进行检查 + + \def RET_ARMGRP_HAS_TIP_ALREADY + \remark 取吸头时枪头上已经带有吸头 + \note 1.先打掉吸头再取 + \n 2.检查吸头传感器是否正常 + + \def RET_ARMGRP_SOME_TIP_FETCH_FAILED + \remark 排枪取吸头时只有部分吸头取成功(有部分吸头没取到) + \note 1.先打掉已取到的吸头然后重试取吸头 + \n 2.重新定标 + \n 3.检查吸头传感器 + + \def RET_ARMGRP_ALL_TIP_FETCH_FAILED + \remark 单枪(或排枪)取吸头时失败(或全部没有取到) + \note 1.重试取吸头 + \n 2.重新定标 + \n 3.检查吸头传感器 + + \def RET_ARMGRP_TIP_DROP + \remark 吸头脱落 + \note 1.检查吸头与枪头结合是否太松, 必要时重新定标 + \n 2.检查吸头传感器 + + \def RET_ARMGRP_DROP_WASTE_UNAVAILABLE + \remark 打回废液到原容器指令无法打回废液(枪头内无废液) + \note 1.若用户软件出现此错误则为软件错误, 联系技术支持 + + \def RET_ARMGRP_NO_LIQUID_IN_TIP + \remark 加液指令或打回废液到原容器指令执行时吸头内无液体 + \note 1.流程错误, 未吸液的状态下加液或打回会报告此错误, 若用户软件出现此情况则联系技术支持 + \n 2.吸头发生脱落(或吸头传感器发生异常跳变)后液体状态会自动清除, 此时调用加液或打回会报告此错误 + \n 3.相关加样配置的”最后一枪打空所有液体”功能开启的情况下, 吸头内液体打完后调用打回会报告此错误 + + \def RET_ARMGRP_NO_ENOUGH_LIQUID_IN_CONTAINER + \remark 液面到容器下液面计算得出的液体体积不足本次吸取的量 + \note 1.检查液体余量是否足够 + \n 2.检查容器下液面参数是否正确 + \n 3.检查定标点是否准确 + \n 4.检查液面探测是否准确 + + \def RET_ARMGRP_PRESSURE_REF_INVALID + \remark 参考压力无效 + \note 1.不带吸头时检查压力传感器读数是否正常, 若偏高或偏低则可能需要更换相关器件 + \n 2.检查相关压力阈值参数是否正确(是否过大) + + \def RET_ARMGRP_LIQUID_DETECT_FAILED + \remark 液面探测失败 + \note 1.检查液体是否正常(是否有足够余量, 是否有气泡, 是否有血凝块) + \n 2.检查压力传感器是否正常 + \n 3.检查加样枪气密性 + \n 4.检查加样枪与吸头结合的气密性 + + \def RET_ARMGRP_INVALID_TIP + \remark 无效吸头 + \note 1.检查吸头是否正常(是否是旧吸头, 吸头是否堵塞) + \n 2.检查压力传感器是否正常 + \n 3.检查吸头检测阈值是否正常(若太小可适当调大) + + \def RET_ARMGRP_BUBBLE_DETECTED + \remark 液面探测时探测到气泡 + \note 1.检查液体是否有气泡 + \n 2.检查压力传感器是否正常 + \n 3.检查加样枪气密性 + \n 4.检查加样枪与吸头结合的气密性 + \n 5.检查气泡检测阈值是否正常(若过大可适当调小或调至0) + + \def RET_ARMGRP_TARGET_NOT_FOUND + \remark 找不到目标区 + \note 1.使用调试软件的参数检查功能进行检查 + \n 2.软件错误, 联系技术支持 + + \def RET_ARMGRP_LIQUID_IN_TIP + \remark 执行吸液指令时吸头内已有液体(或原来残留的废液没打空) + \note 1.打废液后重新吸液 + \n 2.换吸头后重新吸液 + + \def RET_ARMGRP_NO_ENOUGH_LIQUID_IN_TIP + \remark 执行加液指令时吸头内已无足够液体 + \note 1.加液的份数已超过吸液的份数, 若用户软件出现此情况则联系技术支持 + \n 2.之前的加样指令是否发生RET_ARMGRP_NO_PRESSURE_IN_TIP0或者RET_ARMGRP_NO_PRESSURE_IN_TIP1, 若发生此错误则液体份数会自动清零, 需要打废液或换吸头后重新吸液 + + \def RET_ARMGRP_CLOT_DETECTED + \remark 吸液时检测到凝块 + \note 1.检查液体是否有凝块 + \n 2.检查压力传感器是否正常 + \n 3.检查血凝块检测阈值是否正常(若过小可适当调大或调至0) + + \def RET_ARMGRP_DRAWUP_LIQUID_FAILED + \remark 吸液失败(吸液完成后吸头内检测不到足够负压) + \note 1.检查压力传感器是否正常 + \n 2.检查加样枪气密性 + \n 3.检查加样枪与吸头结合的气密性 + \n 4.检查容器上下液面, 容器直径, 活塞直径参数是否正常 + \n 5.检查液面高度是否超过容器上液面 + \n 6.检查吸头内液体阈值是否正常(若过大可适当调小或调至0) + + \def RET_ARMGRP_NO_PRESSURE_IN_TIP0 + \remark 加液前吸头内检测不到足够负压(加液动作尚未执行) + \note 1.检查压力传感器是否正常 + \n 2.检查加样枪气密性 + \n 3.检查加样枪与吸头结合的气密性 + \n 4.检查吸头内液体阈值是否正常(若过大可适当调小或调至0) + \n 5.检查Method%d.PresCO.TipHasLiquidStepMin参数(可适当调大) + + \def RET_ARMGRP_NO_PRESSURE_IN_TIP1 + \remark 加液后吸头内检测不到足够负压(加液动作已执行但加液量可能不足) + \note 同RET_ARMGRP_NO_PRESSURE_IN_TIP0 + + \def DEPRECATED_RET_ARMGRP_LENGTH_OF_KEY_EXCEED_MAX + \remark TODO 报错原因. + \note TODO 建议操作 + + \def DEPRECATED_RET_ARMGRP_LENGTH_OF_STORE_EXCEED_MAX + \remark TODO 报错原因. + \note TODO 建议操作 + + \def RET_ARMGRP_CAP_STATE_INVALID + \remark 电容传感器状态不正确(尚未进入液面就处于触发状态) + \note 1.检查电容传感器是否正常 + + \def RET_ARMGRP_DEVMAPPING_NOT_FOUND + \remark 传感器映射没有找到 + \note 1.使用调试软件的参数检查功能进行检查 + + \def RET_ARMGRP_SCAN_FAILED + \remark 细胞扫描失败 + \note 1.检查玻片及上面的细胞是否正常 + \n 2.检查细胞扫描传感器是否正常 + + \def RET_ARMGRP_REF_POSITION_UNAVAILABLE + \remark 细胞扫描位置不正确(在对细胞扫描位置进行操作时) + \note 1.先调用细胞扫描指令然后再重试本操作 + + \def RET_ARMGRP_REF_POSITION_BUFFER_FULL + \remark 细胞扫描位置缓冲区满 + \note 1.联系技术支持, 需要修改固件 + + \def RET_ARMGRP_CONTAINER_TYPE_UNSUPPORTED + \remark 容器类型不支持 + \note 1.使用调试软件的参数检查功能检查TargetType%d.*参数 + + \def RET_ARMGRP_OUT_OF_TIP + \remark 自动取吸头指令找不到吸头(吸头已用完) + \note 1.加载新吸头架 + \n 2.检查吸头架传感器是否正常 +*/ +#define RET_ARMGRP_INVALID_CONFIG 0x80013090 +#define RET_ARMGRP_INVALID_BASIS 0x80013091 +#define RET_ARMGRP_INVALID_DIRECTION 0x80013092 +#define RET_ARMGRP_BUSY 0x80013093 +#define DEPRECATED_RET_ARMGRP_PROPERTY_INVALID 0x80013094 // 已改为RET_PROPERTY_INVALID, 为与旧版本兼容, Java中保留此错误代码定义, Java定义时去掉前面的DEPRECATED_ +#define DEPRECATED_RET_ARMGRP_PROPERTY_READONLY 0x80013095 // 已改为RET_PROPERTY_READONLY, 为与旧版本兼容, Java中保留此错误代码定义, Java定义时去掉前面的DEPRECATED_ +#define DEPRECATED_RET_ARMGRP_PROPERTY_NOT_COORDINATE 0x80013096 // 已改为RET_PROPERTY_NOT_COORDINATE, 为与旧版本兼容, Java中保留此错误代码定义, Java定义时去掉前面的DEPRECATED_ +#define DEPRECATED_RET_ARMGRP_PROPERTY_INCOMPATIBLE 0x80013097 // 已改为RET_PROPERTY_INCOMPATIBLE, 为与旧版本兼容, Java中保留此错误代码定义, Java定义时去掉前面的DEPRECATED_ +#define DEPRECATED_RET_ARMGRP_INVALID_PROPERTYLIST 0x80013098 // 已改为RET_PROPERTY_INVALID_PROPERTYLIST, 为与旧版本兼容, Java中保留此错误代码定义, Java定义时去掉前面的DEPRECATED_ +#define DEPRECATED_RET_ARMGRP_INVALID_KEY_FMTSTRING 0x80013099 // 已改为RET_PROPERTY_INVALID_KEY_FMTSTRING, 为与旧版本兼容, Java中保留此错误代码定义, Java定义时去掉前面的DEPRECATED_ +#define RET_ARMGRP_HEAP_FULL 0x8001309a +#define RET_ARMGRP_CALIBRATE_HAS_TIP_CUVETTE 0x8001309b +#define RET_ARMGRP_OTHER_PIPETTE_HAS_TIP_CUVETTE 0x8001309c +#define RET_ARMGRP_COORD_OUT_BOUND 0x8001309d +#define RET_ARMGRP_MOTOR_NOT_INIT 0x8001309e +#define RET_ARMGRP_TARGET_WASTE_NOT_FOUND 0x8001309f +#define RET_ARMGRP_NO_TIP_CUVETTE_ON_PIPETTE 0x800130a0 +#define RET_ARMGRP_DROP_TIP_CUVETTE_FAILED 0x800130a1 +#define RET_ARMGRP_NO_TIP_CUVETTE_TYPE_MATCH 0x800130a2 +#define RET_ARMGRP_TIP_CUVETTE_TYPE_MISMATCH 0x800130a3 +#define RET_ARMGRP_TARGET_TIP_NOT_FOUND 0x800130a4 +#define RET_ARMGRP_HAS_TIP_ALREADY 0x800130a5 +#define RET_ARMGRP_SOME_TIP_FETCH_FAILED 0x800130a6 +#define RET_ARMGRP_ALL_TIP_FETCH_FAILED 0x800130a7 +#define RET_ARMGRP_TIP_DROP 0x800130a8 +#define RET_ARMGRP_DROP_WASTE_UNAVAILABLE 0x800130a9 +#define RET_ARMGRP_NO_LIQUID_IN_TIP 0x800130aa +#define RET_ARMGRP_NO_ENOUGH_LIQUID_IN_CONTAINER 0x800130ab // 容器上液面到下液面计算得出的液体总量不足本次指令请求吸取的量 +#define RET_ARMGRP_PRESSURE_REF_INVALID 0x800130ac +#define RET_ARMGRP_LIQUID_DETECT_FAILED 0x800130ad +#define RET_ARMGRP_INVALID_TIP 0x800130ae +#define RET_ARMGRP_BUBBLE_DETECTED 0x800130af +#define RET_ARMGRP_TARGET_NOT_FOUND 0x800130b0 +#define RET_ARMGRP_LIQUID_IN_TIP 0x800130b1 +#define RET_ARMGRP_NO_ENOUGH_LIQUID_IN_TIP 0x800130b2 +#define RET_ARMGRP_CLOT_DETECTED 0x800130b3 +#define RET_ARMGRP_DRAWUP_LIQUID_FAILED 0x800130b4 +#define RET_ARMGRP_NO_PRESSURE_IN_TIP0 0x800130b5 // before P down +#define RET_ARMGRP_NO_PRESSURE_IN_TIP1 0x800130b6 // after P move back +#define DEPRECATED_RET_ARMGRP_LENGTH_OF_KEY_EXCEED_MAX 0x800130b7 // 已改为RET_PROPERTY_LEN_OF_KEY_EXCEED, 为与旧版本兼容, Java中保留此错误代码定义, Java定义时去掉前面的DEPRECATED_ +#define DEPRECATED_RET_ARMGRP_LENGTH_OF_STORE_EXCEED_MAX 0x800130b8 // 已改为RET_PROPERTY_LEN_OF_STORE_EXCEED, 为与旧版本兼容, Java中保留此错误代码定义, Java定义时去掉前面的DEPRECATED_ +#define RET_ARMGRP_CAP_STATE_INVALID 0x800130b9 +#define RET_ARMGRP_DEVMAPPING_NOT_FOUND 0x800130ba +#define RET_ARMGRP_SCAN_FAILED 0x800130bb +#define RET_ARMGRP_REF_POSITION_UNAVAILABLE 0x800130bc +#define RET_ARMGRP_REF_POSITION_BUFFER_FULL 0x800130bd +#define RET_ARMGRP_CONTAINER_TYPE_UNSUPPORTED 0x800130be +#define RET_ARMGRP_OUT_OF_TIP 0x800130bf +/**@}*/ + +/** + * \addtogroup property1 0x800130c0 - 0x800130df: 存储系统错误代码(续) + */ +/**@{ +*/ +/*! + \def RET_PROPERTY_INVALID + \remark 参数未定义. + \note 1.软件错误,联系技术支持 + + \def RET_PROPERTY_READONLY + \remark 参数值只读. + \note 1.软件错误,联系技术支持 + + \def RET_PROPERTY_NOT_COORDINATE + \remark 该参数不可用于电机. + \note 1.软件错误,联系技术支持 + + \def RET_PROPERTY_INCOMPATIBLE + \remark 写参数的类型不匹配. + \note 1.软件错误,联系技术支持 + + \def RET_PROPERTY_LEN_OF_KEY_EXCEED + \remark 参数的key长度超出最大值(64). + \note 1.软件错误,联系技术支持 + + \def RET_PROPERTY_LEN_OF_STORE_EXCEED + \remark 参数的store长度超出最大值(32). + \note 1.软件错误,联系技术支持 + + \def RET_PROPERTY_INVALID_PROPERTYLIST + \remark 无效的属性列表. + \note 1.软件错误,联系技术支持 + + \def RET_PROPERTY_INVALID_KEY_FMTSTRING + \remark 无效的key格式字符串,有且只有一个%d, %D, %x, %X. + \note 1.软件错误,联系技术支持 + +*/ +#define RET_PROPERTY_INVALID 0x800130c0 +#define RET_PROPERTY_READONLY 0x800130c1 +#define RET_PROPERTY_NOT_COORDINATE 0x800130c2 +#define RET_PROPERTY_INCOMPATIBLE 0x800130c3 +#define RET_PROPERTY_LEN_OF_KEY_EXCEED 0x800130c4 +#define RET_PROPERTY_LEN_OF_STORE_EXCEED 0x800130c5 +#define RET_PROPERTY_INVALID_PROPERTYLIST 0x800130c6 +#define RET_PROPERTY_INVALID_KEY_FMTSTRING 0x800130c7 +/**@}*/ + +/** + * \addtogroup armgrp1 0x800130e0 - 0x800130ff: 加样臂模块错误代码(续) + */ +/**@{ +*/ +/*! + \def RET_ARMGRP_TIP_STATE_NOT_INIT + \remark 吸头架状态未经初始化 + \note 1.固件错误, 联系技术支持 + + \def RET_ARMGRP_INVALID_TIP_TYPE + \remark 吸头类型错误 + \note 1.使用调试软件的参数检查功能进行检查 + \n 2.软件错误, 联系技术支持 + + \def RET_ARMGRP_METHOD_TYPE_MISMATCH + \remark 指定的加样配置与当前的枪或者吸头不匹配 + \note 1.使用调试软件的参数检查功能进行检查 + \n 2.若用户软件发生此情况则软件错误, 联系技术支持 + + \def RET_ARMGRP_BLOCKED_TIP + \remark 取吸头时检测到吸头已堵塞 + \note 1.检查吸头是否正常(是否是旧吸头, 吸头是否堵塞) + \n 2.检查压力传感器是否正常 + \n 3.检查吸头检测阈值是否正常(若太小可适当调大) + + \def RET_ARMGRP_INVALID_EXTVALVE_SETTING + \remark 外置液面检测气路控制阀配置错误 + \n Pipette%d.Channel.ExtDetectValve必须与z或者Pressure之一相等 + \note 1.使用调试软件的参数检查功能进行检查 + + \def RET_ARMGRP_INVALID_EXTPORT_SETTING + \remark Pipette%d.ExtDetectPump.*或Pipette%d.CuvetteRelease.*配置错误 + \note 1.使用调试软件的参数检查功能进行检查 + + \def RET_ARMGRP_INVALID_PRESSURE_CAP_SETTING + \remark 液面探测模式配置错误(压力传感器和电容传感器至少要有一个才能进行液面探测) + \note 1.使用调试软件的参数检查功能进行检查 + + \def RET_ARMGRP_INVALID_WASTEPUMP_SETTING + \remark Pipette%d.DrawupWaste.*配置错误 + \note 1.使用调试软件的参数检查功能进行检查 + + \def RET_ARMGRP_PATH_NOT_FOUND + \remark 带污染的枪头没有找到正确的运动路径 + \note 1.使用调试软件的参数检查功能对div.conf进行检查 + + \def RET_ARMGRP_INVALID_DIV_SETTING + \remark 仪器面板分区配置参数(div.conf)错误 + \note 1.使用调试软件的参数检查功能对div.conf进行检查 + + \def RET_ARMGRP_PIPETTE_TYPE_MISMATCH + \remark 指定的加样配置与当前的枪不匹配 + \note 1.使用调试软件的参数检查功能进行检查 + \n 2.若用户软件发生此情况则软件错误, 联系技术支持 + + \def RET_ARMGRP_INVALID_VOLUME_LIST + \remark TODO 报错原因. + \note TODO 建议操作 + + \def RET_ARMGRP_HAS_CUVETTE_ALREADY + \remark 取反应杯时枪头上已经带有反应杯 + \note 1.先打掉反应杯再取 + \n 2.检查反应杯传感器是否正常 + + \def RET_ARMGRP_SOME_CUVETTE_FETCH_FAILED + \remark 排枪取反应杯时只有部分反应杯取成功(有部分反应杯没取到) + \note 1.先打掉已取到的反应杯然后重试取反应杯 + \n 2.重新定标 + \n 3.检查反应杯传感器 + + \def RET_ARMGRP_ALL_CUVETTE_FETCH_FAILED + \remark 单枪(或排枪)取反应杯时失败(或全部没有取到) + \note 1.重试取反应杯 + \n 2.重新定标 + \n 3.检查反应杯传感器 + + \def RET_ARMGRP_CUVETTE_DROP + \remark 反应杯脱落 + \note 1.检查反应杯与枪头结合是否太松, 必要时重新定标 + \n 2.检查反应杯传感器 + + \def RET_ARMGRP_PUNCTURE_CUVETTE_UP + \remark 穿刺后杯子被带上来 + \note 1.检查杯子传感器是否正常 + \n 2.检查杯子是否被带上来 + + \def RET_ARMGRP_DRAW_MORE_THAN_PUMP + \remark 吸液体积和超过泵的总体积 + \note 1. + \n 2. + + \def RET_ARMGRP_VOLUME_NOT_MATCH + \remark 吸一打一时,传入体积与枪内实际体积不一致 + \note 1. + \n 2. + + \def RET_ARMGRP_BLOCKED_PIPETTE + \remark 复位时检测到加样枪已堵塞 + \note 1.检查加样枪是否堵塞 + \n 2.检查压力传感器是否正常 + \n 3.检查加样枪堵塞检测阈值是否正常(若太小可适当调大) + + \def RET_ARMGRP_LIQUID_DETECT_TRIG_BEFORE + \remark 电容模块在与Z同步开始前触发 + \note 1. 检查阈值是否太小 + \n 2. 检查电子信号. + + \def RET_ARMGRP_ARMS_WILL_CRASH + \remark 同轴的两臂之间将会发生碰撞 + \note 1. 等另外的臂运动出碰撞区间. + \n + + \def RET_ARMGRP_LIQUID_DETECT_TRIG_HIGHT_ERROR + \remark RET_ARMGRP_LIQUID_DETECT_TRIG_HIGHT_ERROR + \note 1. 液面高度异常.探到的液面高度低于bottleExt + \n + + \def RET_ARMGRP_LIQUID_DETECT_CHECK_FAILED + \remark RET_ARMGRP_LIQUID_DETECT_CHECK_FAILED + \note 1. 探液面的第二次check失败 + \n + + +*/ +#define RET_ARMGRP_TIP_STATE_NOT_INIT 0x800130e0 +#define RET_ARMGRP_INVALID_TIP_TYPE 0x800130e1 +#define RET_ARMGRP_METHOD_TYPE_MISMATCH 0x800130e2 +#define RET_ARMGRP_BLOCKED_TIP 0x800130e3 +#define RET_ARMGRP_INVALID_EXTVALVE_SETTING 0x800130e4 +#define RET_ARMGRP_INVALID_EXTPORT_SETTING 0x800130e5 +#define RET_ARMGRP_INVALID_PRESSURE_CAP_SETTING 0x800130e6 +#define RET_ARMGRP_INVALID_WASTEPUMP_SETTING 0x800130e7 +#define RET_ARMGRP_PATH_NOT_FOUND 0x800130e8 +#define RET_ARMGRP_INVALID_DIV_SETTING 0x800130e9 +#define RET_ARMGRP_PIPETTE_TYPE_MISMATCH 0x800130ea +#define RET_ARMGRP_INVALID_VOLUME_LIST 0x800130eb +#define RET_ARMGRP_HAS_CUVETTE_ALREADY 0x800130ec +#define RET_ARMGRP_SOME_CUVETTE_FETCH_FAILED 0x800130ed +#define RET_ARMGRP_ALL_CUVETTE_FETCH_FAILED 0x800130ee +#define RET_ARMGRP_CUVETTE_DROP 0x800130ef +#define RET_ARMGRP_PUNCTURE_CUVETTE_UP 0x800130f0 +#define RET_ARMGRP_DRAW_MORE_THAN_PUMP 0x800130f1 +#define RET_ARMGRP_VOLUME_NOT_MATCH 0x800130f2 +#define RET_ARMGRP_BLOCKED_PIPETTE 0x800130f3 +#define RET_ARMGRP_LIQUID_DETECT_TRIG_BEFORE 0x800130f4 +#define RET_ARMGRP_ARMS_WILL_CRASH 0x800130f5 +#define RET_ARMGRP_LIQUID_DETECT_TRIG_HIGHT_ERROR 0x800130f6 +#define RET_ARMGRP_LIQUID_DETECT_CHECK_FAILED 0x800130f7 +/**@}*/ + +/** + * \defgroup ihc 0x80013101 - 0x8001313f: IHC模块错误代码 + */ +/**@{ +*/ +/*! + \def RET_IHC_NO_SLIDE + \remark 未扫描到拨片 + \note 1:确认是否放置拨片 + 2:已放置拨片报错,请联系电子检查传感器. + + \def RET_IHC_NO_CODE_PAPER + \remark TODO 报错原因. + \note TODO 建议操作 + + \def RET_IHC_CODESIZE_TO_LARGE + \remark 条码机读到的长度超过MCU设置上限 + \note 1:请确认条码是否打印正确 + 2:请联系技术支持 + 3:软件错误 + + \def RET_IHC_NO_SERIAL_DATA + \remark 条码机未通过串口发出数据 + \note 1:请联系技术支持 + 2:请电子检查串口连线 + + \def RET_IHC_NO_LIQUID0_BOTTLE + \remark 冲洗液0瓶未接入 + \note 1:请接入 + + \def RET_IHC_LIQUID0_EMPTY + \remark 冲洗液0瓶空 + \note 1:请加液 + + \def RET_IHC_NO_LIQUID1_BOTTLE + \remark 冲洗液1空未接入 + \note 1:请接入 + + \def RET_IHC_LIQUID1_EMPTY + \remark 冲洗液1瓶空 + \note 1:请加液 + + \def RET_IHC_NO_TOXIC_BOTTLE + \remark 有毒废液瓶未接入 + \note 1:请接入 + + \def RET_IHC_TOXIC_FULL + \remark 有毒废液瓶满 + \note 1:请清理 + + \def RET_IHC_NO_NONTOXIC_BOTTLE + \remark 无毒废液瓶未接入 + \note 1: 请接入 + + \def RET_IHC_NONTOXIC_FULL + \remark 无毒废液瓶满 + \note 1:请清理 + + \def RET_IHC_WASTE_POOL_SENSOE_ERROR + \remark 废液上下传感器触发顺序不符合规律 + \note 1:请联系技术支持 + 2:请电子检查硬件传感器 + + \def RET_IHC_WASTE_POOL_FULL + \remark 此代码已删除 + \note + + \def RET_IHC_SWITCHFUNCTION_ERROR + \remark 泵阀busy时,重复打开 + \note 1:误操作 + + \def RET_IHC_OS_EVENT_ERROR + \remark 重复发送同一指令命令 + \note 1:请确认是否连续点击调试软件同一按钮,排除误操作 + 2:请联系技术支持 + 3:请软件检查调用过程 +*/ +#define RET_IHC_NO_SLIDE 0x80013101 +#define RET_IHC_NO_CODE_PAPER 0x80013102 +#define RET_IHC_CODESIZE_TO_LARGE 0x80013103 +#define RET_IHC_NO_SERIAL_DATA 0x80013104 +#define RET_IHC_NO_LIQUID0_BOTTLE 0x80013110 // 冲洗液0瓶未插入 +#define RET_IHC_LIQUID0_EMPTY 0x80013111 // 冲洗液0瓶空 +#define RET_IHC_NO_LIQUID1_BOTTLE 0x80013112 // 冲洗液1瓶未插入 +#define RET_IHC_LIQUID1_EMPTY 0x80013113 // 冲洗液1瓶空 +#define RET_IHC_NO_TOXIC_BOTTLE 0x80013114 // 有毒废液瓶未插入 +#define RET_IHC_TOXIC_FULL 0x80013115 // 有毒废液瓶满 +#define RET_IHC_NO_NONTOXIC_BOTTLE 0x80013116 // 无毒废液瓶未插入 +#define RET_IHC_NONTOXIC_FULL 0x80013117 // 无毒废液瓶满 +#define RET_IHC_WASTE_POOL_SENSOE_ERROR 0x80013118 // 废液池传感器坏 +#define RET_IHC_WASTE_POOL_FULL 0x80013119 // 废液池满 +#define RET_IHC_SWITCHFUNCTION_ERROR 0x8001311a +#define RET_IHC_OS_EVENT_ERROR 0x8001311b // +/**@}*/ + +/** + * \defgroup pwrmgr 0x80013140 - 0x8001315f: 电源管理模块错误代码 + */ +/**@{ +*/ + +/*! + \def RET_PWRMGR_NOT_INIT + \remark 电源管理未初始化. + \note 1.软件错误,联系技术支持 + + \def RET_PWRMGR_STATE_ERROR + \remark 电源管理状态错误. + \note 1.软件错误,联系技术支持 + + \def RET_PWRMGR_OP_ABORTED + \remark 电源管理操作被取消. + \note 1.软件错误,联系技术支持 + + \def RET_PWRMGR_BUFFER_FULL + \remark 缓冲区已满. + \note 1.软件错误,联系技术支持 + + \def RET_PWRMGR_CONFIG_INVALID + \remark 配置无效,通道号超出最大值(4). + \note 1.软件错误,联系技术支持 + + \def RET_PWRMGR_STOP_PRESSED + \remark 上位机发送开机指令的,急停若被拍下,发回此错误. + \note 1.检查急停是否被按下 +*/ +#define RET_PWRMGR_NOT_INIT 0x80013140 +#define RET_PWRMGR_STATE_ERROR 0x80013141 +#define RET_PWRMGR_OP_ABORTED 0x80013142 +#define RET_PWRMGR_BUFFER_FULL 0x80013143 +#define RET_PWRMGR_CONFIG_INVALID 0x80013144 +#define RET_PWRMGR_STOP_PRESSED 0x80013145 //上位机发送开机指令的,急停若被拍下,发回此错误 +/**@}*/ + +/** + * \defgroup vusart 0x80013160 - 0x8001317f: 虚拟串口错误代码 + */ +/**@{ +*/ +/*! + \def RET_VUSART_NOT_INIT + \remark 虚拟串口未初始化. + \note 1.软件错误,联系技术支持 + + \def RET_VUSART_TX_BUSY + \remark 虚拟发送忙. + \note 1.软件错误,联系技术支持 +*/ +#define RET_VUSART_NOT_INIT 0x80013160 +#define RET_VUSART_TX_BUSY 0x80013161 +/**@}*/ + +/** + * \defgroup gpuoext 0x80013201 - 0x8001320f: GPIO扩展模块错误代码 + */ +/**@{ +*/ +/*! + \def RET_GPIOEXT_HEAP_FULL + \remark 不再使用 + \note 不再使用 + + \def RET_GPIOEXT_IO_EXCEED_MAX + \remark 不再使用 + \note 不再使用 + + \def RET_GPIOEXT_PCA935_READ_FAILED + \remark 读I2C失败 + \note 检查I2C线路 + + \def RET_GPIOEXT_PCA935_WRITE_FAILED + \remark 写I2C失败 + \note 检查I2C线路 + + \def RET_GPIOEXT_VIBERATE_BUSY + \remark 振动指令忙 + \note 1.软件问题,先等待振动返回再发 + + \def RET_GPIOEXT_BLINK_BUSY + \remark 闪烁指令忙 + \note 1.软件问题,先等待闪烁返回再发 + + \def RET_GPIOEXT_VIB_TIMEOUT + \remark 振动超时 + \note 1.检查和电机的通信线路是否正常 +*/ +#define RET_GPIOEXT_HEAP_FULL 0x80013201 +#define RET_GPIOEXT_IO_EXCEED_MAX 0x80013202 +#define RET_GPIOEXT_PCA935_READ_FAILED 0x80013203 +#define RET_GPIOEXT_PCA935_WRITE_FAILED 0x80013204 +#define RET_GPIOEXT_VIBERATE_BUSY 0x80013205 +#define RET_GPIOEXT_BLINK_BUSY 0x80013206 +#define RET_GPIOEXT_VIB_TIMEOUT 0x80013207 +/**@}*/ + +/** + * \defgroup plate 0x80013211 - 0x8001321c: PLATE模块错误代码 + */ +/**@{ +*/ +/*! + \def RET_PLATE_VIB_SPEED_SET + \remark TODO 报错原因. + \note TODO 建议操作 + + \def RET_PLATE_VIB_SPEED_EXCEED + \remark TODO 报错原因. + \note TODO 建议操作 + + \def RET_PLATE_ICB_TEMPERATURE + \remark TODO 报错原因. + \note TODO 建议操作 + + \def RET_PLATE_COVER_BOTH_TRIGGER + \remark TODO 报错原因. + \note TODO 建议操作 + + \def RET_TEMPCTRL_GET_PROPERTY_FAILED + \remark TODO 报错原因. + \note TODO 建议操作 +*/ +// vib error:0x80013211 - 0x80013214 +#define RET_PLATE_VIB_SPEED_SET 0x80013211 +#define RET_PLATE_VIB_SPEED_EXCEED 0x80013212 +// icb error:0x80013215 - 0x80013218 +#define RET_PLATE_ICB_TEMPERATURE 0x80013215 +// cover error:0x80013219 - 0x8001321c +#define RET_PLATE_COVER_BOTH_TRIGGER 0x80013219 +#define RET_TEMPCTRL_GET_PROPERTY_FAILED 0x8001321a +/**@}*/ + +/** + * \defgroup lica 0x80013301 - 0x8001337f: LICA全自动反应区模块错误代码 + */ +/**@{ +*/ +/*! + \def RET_LICA_REACTION_LATH_COVER_HOLE + \remark 反应区板条卡住 + \note 请联系技术支持 + + \def RET_LICA_REACTION_FLUID_BUF_BOTL_EMPTY + \remark 反应区液体缓冲瓶空 + \note 请联系技术支持 + + \def RET_LICA_REACTION_FLUID_NO_DILUTE + \remark 液体没有稀释 + \note 请联系技术支持 + + \def RET_LICA_REACTION_FLUID_BOTL_EMPTY + \remark 反应区液体瓶空 + \note 添加相应液体 + + \def RET_LICA_REACTION_PUMP_BUSY + \remark 反应区泵忙 + \note 请联系技术支持 + + \def RET_LICA_REACTION_SD_FAILED + \remark 反应区读取SD卡参数失败 + \note 请联系技术支持 + + \def RET_LICA_REACTION_MOTOR_NO_RESET + \remark 电机未复位 + \note 1.复位电机 + \n 2.如果故障未排队,请联系技术支持 + + \def RET_LICA_REACTION_EXIST_PLATE_IN_SENSOR1 + \remark 传感器1号位有托盘 + \note 1.检查传感器1 + \n 2.如果故障未排队,请联系技术支持 + + \def RET_LICA_REACTION_EXIST_PLATE_IN_SENSOR2 + \remark 传感器2号位有托盘 + \note 1.检查传感器2 + \n 2.如果故障未排队,请联系技术支持 + + \def RET_LICA_REACTION_EXIST_PLATE_IN_SENSOR3 + \remark 传感器3号位有托盘 + \note 1.检查传感器3 + \n 2.如果故障未排队,请联系技术支持 + + \def RET_LICA_REACTION_STACK_NO_MICROPLATE + \remark 堆栈区没有微孔板 + \note 请联系技术支持 + + \def RET_LICA_REACTION_GET_MICROPLATE_FAILED + \remark 获得微孔板失败 + \note 请联系技术支持 + + \def RET_LICA_REACTION_PUSH_MICROPLATE_ERROR + \remark 推微孔板失败 + \note 请联系技术支持 + + \def RET_LICA_REACTION_DARK_DOOR_OPEN_TIMEOUT + \remark 反应区暗门打开超时 + \note 请联系技术支持 + + \def RET_LICA_REACTION_FROMF01TOF02_FAILED + \remark 推空板条失败 + \note 1.检查加样区扫描是否成功传感器 + \n 2.如果故障未排队,请联系技术支持 + + \def RET_LICA_REACTION_P01P02_RESET_FAILED + \remark 电机P01P02复位失败 + \note 1.检查电机传感器 + \n 2.如果故障未排队,请联系技术支持 + + \def RET_LICA_REACTION_F01F02_RESET_FAILED + \remark 电机F01F02复位失败 + \note 1.检查电机传感器 + \n 2.如果故障未排队,请联系技术支持 + + \def RET_LICA_REACTION_F03F04_RESET_FAILED + \remark 电机F03F04复位失败 + \note 1.检查电机传感器 + \n 2.如果故障未排队,请联系技术支持 + + \def RET_LICA_REACTION_L01L02_RESET_FAILED + \remark 电机L01L02复位失败 + \note 1.检查电机传感器 + \n 2.如果故障未排队,请联系技术支持 + + \def RET_LICA_REACTION_U01_RESET_FAILED + \remark 堆栈U01复位失败 + \note 1.检查电机传感器 + \n 2.如果故障未排队,请联系技术支持 + + \def RET_LICA_REACTION_L01L02_NOT_AT_ZERO + \remark 推杆电机L01L02不在零位不能复位 + \note 使电机在零位 + + \def RET_LICA_REACTION_STACK_DOOR_NO_CLOSE + \remark 反应区堆栈门未关 + \note 1.检查堆栈门传感器 + \n 2.如果故障未排队,请联系技术支持 + + \def RET_LICA_REACTION_NOT_SYSCTRL + \remark 不在维修模式 + \note 进入维修模式 + + \def RET_LICA_REACTION_COVER_OPEN_TIMEOUT + \remark 反应区开盖打开超时 + \note 请联系技术支持 + + \def RET_LICA_REACTION_IN_SYSCTRL + \remark 反应区模块在维修模式 + \note 退出维修模式 + + \def RET_LICA_REACTION_PLATE_STUCK + \remark 堆栈区有板条卡住 + \note 请联系技术支持 + + \def RET_LICA_REACTION_SOFTRESET + \remark 反应区软复位 + \note 请联系技术支持 + + \def RET_LICA_REACTION_MOTOR_NO_SCAN + \remark 电机未扫描 + \note 扫描电机 + + \def RET_LICA_REACTION_SAMP_LATH_STATE_ERROR + \remark 样本区板条状态异常 + \note 请联系技术支持 + + \def RET_LICA_REACTION_WARM1_LATH_STATE_ERROR + \remark 温育区1板条状态异常 + \note 请联系技术支持 + + \def RET_LICA_REACTION_WARM2_LATH_STATE_ERROR + \remark 温育区2板条状态异常 + \note 请联系技术支持 + + \def RET_LICA_REACTION_INVALID_DIRECTION + \remark 电机运动方向错误 + \note 请联系技术支持 + +*/ + +// TODO +/*Zmj*/ +#define RET_LICA_REACTION_LATH_COVER_HOLE 0x80013301 //废液孔上方覆盖板条错误 +#define RET_LICA_REACTION_FLUID_BUF_BOTL_EMPTY 0x80013302 +#define RET_LICA_REACTION_FLUID_NO_DILUTE 0x80013303 +#define RET_LICA_REACTION_FLUID_BOTL_EMPTY 0x80013304 +#define RET_LICA_REACTION_PUMP_BUSY 0x80013305 +#define RET_LICA_REACTION_SD_FAILED 0x80013306 + +/*0x80013320~0x8001334f耿益平定义OP3 OP4 Reset Check */ +#define RET_LICA_REACTION_MOTOR_NO_RESET 0x80013320 /*机械未复位,不能执行任何指令*/ +#define RET_LICA_REACTION_EXIST_PLATE_IN_SENSOR1 0x80013321 /*堆栈区到加样区有板条*/ +#define RET_LICA_REACTION_EXIST_PLATE_IN_SENSOR2 0x80013322 /*加样区到温育区1有板条*/ +#define RET_LICA_REACTION_EXIST_PLATE_IN_SENSOR3 0x80013323 /*温育区1到温育区2有板条*/ +#define RET_LICA_REACTION_STACK_NO_MICROPLATE 0x80013324 /*堆栈区没有微控板*/ +#define RET_LICA_REACTION_GET_MICROPLATE_FAILED 0x80013325 /*取微控板失败*/ +#define RET_LICA_REACTION_PUSH_MICROPLATE_ERROR 0x80013326 /*推掉空微控板执行失败*/ +#define RET_LICA_REACTION_DARK_DOOR_OPEN_TIMEOUT 0x80013327 /*避光开关门开门超时*/ +#define RET_LICA_REACTION_FROMF01TOF02_FAILED 0x80013328 /*推板条从F01到F02失败*/ +#define RET_LICA_REACTION_P01P02_RESET_FAILED 0x80013329 /*P01P02电机复位失败*/ +#define RET_LICA_REACTION_F01F02_RESET_FAILED 0x8001332a /*F01F02电机复位失败*/ +#define RET_LICA_REACTION_F03F04_RESET_FAILED 0x8001332b /*F03F04电机复位失败*/ +#define RET_LICA_REACTION_L01L02_RESET_FAILED 0x8001332c /*L01L02电机复位失败*/ +#define RET_LICA_REACTION_U01_RESET_FAILED 0x8001332d /*U01电机复位失败*/ +#define RET_LICA_REACTION_L01L02_NOT_AT_ZERO 0x8001332e /*L01L02不在零位*/ +#define RET_LICA_REACTION_STACK_DOOR_NO_CLOSE 0x8001332f /*板条堆栈未关门*/ +#define RET_LICA_REACTION_NOT_SYSCTRL 0x80013330 /*未进入维修模式*/ +#define RET_LICA_REACTION_COVER_OPEN_TIMEOUT 0x80013331 /*试剂盖开关门开门超时*/ +#define RET_LICA_REACTION_IN_SYSCTRL 0x80013332 /*电机进入维修模式不允许操作*/ +#define RET_LICA_REACTION_PLATE_STUCK 0x80013333 /*堆栈区有板架卡住*/ +#define RET_LICA_REACTION_SOFTRESET 0x80013334 /*软件复位*/ +#define RET_LICA_REACTION_MOTOR_NO_SCAN 0x80013335 /*电机复位后未扫描*/ +/*Zhq*/ +#define RET_LICA_REACTION_SAMP_LATH_STATE_ERROR 0x80013351 /*加样区板条状态错误:源索引不存在或目标索引存在*/ +#define RET_LICA_REACTION_WARM1_LATH_STATE_ERROR 0x80013352 /*温育区1板条状态错误:源索引不存在或目标索引存在*/ +#define RET_LICA_REACTION_WARM2_LATH_STATE_ERROR 0x80013353 /*温育区2板条状态错误:源索引不存在或目标索引存在*/ +#define RET_LICA_REACTION_INVALID_DIRECTION 0x80013354 + +/**@}*/ + +/** + * \defgroup detect 0x80013380 - 0x800133ff: 检测模块错误代码 + */ +/**@{ +*/ +/*! + \def RET_LICA_LRD_INITIALIZE_FAILED + \remark 检测模块初始化失败 + \note 1.检查传感器状态,若有误,可能是卡板条或者直流电机有问题 + \n 2.重新上电复位,仍报错,很可能需要拆开模块查看,联系技术支持. + + \def RET_LICA_LRD_MODULE_BUSY + \remark 检测模块正在忙. + \note 1.等一会儿再发指令 + + \def RET_LICA_LRD_NO_BATTEN + \remark 没有板条 + \note 1.锁定板条时才会报这个错 + + \def RET_LICA_LRD_UNSUITABLE_BATTEN + \remark 板条不到位 + \note 1.由于推入不到位,板条状态为不可锁定 + + \def RET_LICA_LRD_STATE_BATTEN + \remark 板条状态错误 + \note 1.板条传感器或者叉子传感器出现错误状态,用调试软件查看其状态 + + \def RET_LICA_LRD_DISCARD_BATTEN + \remark 扔板条失败 + \note 1.重新扔板条, 若仍失败,联系技术支持 + + \def RET_LICA_LRD_SENSOR_CLOSED + \remark 光耦关闭,传感器禁止读取 + \note 1.等会儿再读取 + + \def RET_LICA_LRD_SNESOR_TRIGGER + \remark 叉子传感器误触发 + \note 1.(已取消此错误) + + \def RET_LICA_LRD_MOTG_SENSOR + \remark 叉子传感器错误 + \note 1.零位限位传感器同时触发。用调试软件查看叉子状态 + + \def RET_LICA_LRD_SPACER_MOVE + \remark 叉子移动错误 + \note 1.叉子移动超时(超时时间配置在卡里),可能是直流电机卡住或者相应传感器不能正常触发。 + + \def RET_LICA_LRD_MOTOR_NOT_RESET + \remark 电机没有复位 + \note 1.先复位电机 + + \def RET_LICA_LRD_INVALID_DIRECTION + \remark 电机移动方向错误 + \note 1.此模块电机只有左右方向运动,没有上下方向运动 + + \def RET_LICA_LRD_PMT_READ_TIMEOUT + \remark PMT读数超时 + \note 1.软件错误,请重试。若频繁出现,联系技术支持 + + \def RET_LICA_LRD_PMTOVL_TIMEOUT + \remark PMT溢出等待超时 + \note 1.PMT有溢出过,断电等待30分钟以上让其恢复. + \n 2.等待后仍溢出,检查单片机相连的引脚是否正常 + + \def RET_LICA_LRD_LASER_INSPIRE + \remark 激光激发失败 + \note 1.读数指令中,电机移动到激发位时出错,不再激发,直接报错 + + \def RET_LICA_LRD_LASER_INSPIRE_TIMEOUT + \remark 激光激发超时 + \note 1.等同RET_LICA_LRD_PMT_READ_TIMEOUT + + \def RET_LICA_LRD_EXCEED_DURATION + \remark 激光/读数时间(参数)不在有效范围内 + \note 1.检查传入参数 + + \def RET_LICA_LRD_PROPERTY_INVALID + \remark PROPERTY操作出现错误 + \note 1.配置操作出错。检查传入参数、配置项属性、TF卡等. + + \def RET_LICA_LRD_LENGTH_OF_KEY_EXCEED_MAX + \remark KEY长度太长 + \note 1.检查KEY名 + + \def RET_LICA_LRD_LENGTH_OF_STORE_EXCEED_MAX + \remark STORE长度太长 + \note 1.检查STORE名 + + \def RET_LICA_LRD_PROPERTY_INCOMPATIBLE + \remark PROPERTY中没找到匹配的键 + \note 1.检查KEY名与TF卡 + + \def RET_LICA_LRD_PROPERTY_READONLY + \remark 该PROPERTY项只读 + \note 1.检查配置项属性 + + \def RET_LICA_LRD_PROPERTY_NOT_COORDINATE + \remark 该PROPERTY项不能用于电机 + \note 1.检查配置项属性 + + \def RET_LICA_LRD_INVALID_KEY_FMTSTRING + \remark PROPERTY项格式错误 + \note 1.检查KEY + + \def RET_LICA_LRD_CALIBRATE_FAILED + \remark 定标失败 + \note 1.重新定标. 频繁失败,联系技术支持 + + \def RET_LICA_LRD_SPACER_STATE + \remark 电机回零时叉子状态不允许 + \note 1.先将叉子状态移动为零位或者限位 + + \def RET_LICA_LRD_CPLD_CLEAR + \remark CPLD清除缓冲失败 + \note 1.软件错误. 联系技术支持 + + \def RET_LICA_LRD_EXIST_BATTEN + \remark 模块内已有板条(不允许再推入) + \note 1.先仍掉已有板条. + \n 2.若确定模块内原没有板条,那先模块复位,检查板条状态 + + \def RET_READER_INITIALIZE_FAILED + \remark 检测模块初始化失败 + \note 1.检查传感器状态、TF卡、电机等 + \n 2.重新上电复位,仍报错,很可能需要拆开模块查看,联系技术支持. + + \def RET_READER_MODULE_BUSY + \remark 检测模块正在忙. + \note 1.等一会儿再发指令 + + \def RET_READER_CHECKSELF_FAILED + \remark 检测模块自检失败 + \note 1.调试软件查看调试信息 + + \def RET_READER_FUNCTION_NOT_SUPPORTED + \remark 此功能不支持 + \note 1.检查功能说明 + + \def RET_READER_EVENT_ERROR + \remark 信号量操作失败 + \note 1.软件问题。联系技术支持 + + \def RET_READER_PROPERTY_INVALID + \remark PROPERTY操作出现错误 + \note 1.配置操作出错。检查传入参数、配置项属性、TF卡等. + + \def RET_READER_LENGTH_OF_KEY_EXCEED_MAX + \remark KEY长度太长 + \note 1.检查KEY名 + + \def RET_READER_LENGTH_OF_STORE_EXCEED_MAX + \remark STORE长度太长 + \note 1.检查STORE名 + + \def RET_READER_PROPERTY_INCOMPATIBLE + \remark PROPERTY中没找到匹配的键 + \note 1.检查KEY名与TF卡 + + \def RET_READER_PROPERTY_READONLY + \remark 该PROPERTY项只读 + \note 1.检查配置项属性 + + \def RET_READER_PROPERTY_NOT_COORDINATE + \remark 该PROPERTY项不能用于电机 + \note 1.检查配置项属性 + + \def RET_READER_DBG_GET_INFO + \remark 获取调试信息出错 + \note 1.重试 + + \def RET_READER_CALIBRATE_UNCOMPLETED + \remark 读数位置定标未完成 + \note 1.重新定标 + + \def RET_POCT_PRD_NO_BATTEN + \remark 没有板条(锁定板条时) + \note 1.锁定板条时才会报这个错 + + \def RET_POCT_PRD_EXIST_BATTEN + \remark 模块内已有板条(不允许再推入) + \note 1.先仍掉已有板条. + \n 2.若确定模块内原没有板条,那先模块复位,检查板条状态 + + \def RET_POCT_PRD_STATE_BATTEN + \remark 板条状态错误 + \note 1.调试软件检查板条状态 + \n 2.模块复位 + + \def RET_POCT_PRD_DISCARD_BATTEN + \remark 扔板条失败 + \note 1.重试. + + \def RET_POCT_PRD_LIGHT_FLUO + \remark 荧光激光有问题 + \note 1.已取消此错误 + + \def RET_POCT_PRD_LIGHT_CGL + \remark 金标灯光有问题 + \note 1.已取消此错误 + + \def RET_POCT_PRD_CARD_CODE_FAILED + \remark 读卡条条码失败 + \note 1.重试 + \n 2.保留好失败时的卡条,联系技术支持 + + \def RET_POCT_PRD_AD_FAULT + \remark AD读取出错 + \note 1.重试 + \n 2.重复出现,联系技术支持 + +*/ + +// 1. 0x80013380 - 0x8001339f: LICA全自动读数模块(Lica Reader Module)错误代码 +#define RET_LICA_LRD_INITIALIZE_FAILED 0x80013380 // 检测模块初始化失败 +#define RET_LICA_LRD_MODULE_BUSY 0x80013381 // 检测模块正在忙 +#define RET_LICA_LRD_NO_BATTEN 0x80013382 // 没有板条(锁定板条时) +#define RET_LICA_LRD_UNSUITABLE_BATTEN 0x80013383 // 板条不到位 +#define RET_LICA_LRD_STATE_BATTEN 0x80013384 // 板条状态错误 +#define RET_LICA_LRD_DISCARD_BATTEN 0x80013385 // 扔板条失败 +#define RET_LICA_LRD_SENSOR_CLOSED 0x80013386 // 光耦关闭,传感器禁止读取 +#define RET_LICA_LRD_SNESOR_TRIGGER 0x80013387 // 叉子传感器误触发 +#define RET_LICA_LRD_MOTG_SENSOR 0x80013388 // 叉子传感器错误 +#define RET_LICA_LRD_SPACER_MOVE 0x80013389 // 叉子移动错误 +#define RET_LICA_LRD_MOTOR_NOT_RESET 0x8001338a // 电机没有复位 +#define RET_LICA_LRD_INVALID_DIRECTION 0x8001338b // 电机移动方向错误 +#define RET_LICA_LRD_PMT_READ_TIMEOUT 0x8001338c // PMT读数超时 +#define RET_LICA_LRD_PMTOVL_TIMEOUT 0x8001338d // PMT溢出等待超时 +#define RET_LICA_LRD_LASER_INSPIRE 0x8001338e // 激光激发失败 +#define RET_LICA_LRD_LASER_INSPIRE_TIMEOUT 0x8001338f // 激光激发超时 +#define RET_LICA_LRD_EXCEED_DURATION 0x80013390 // 激光/读数时间(参数)不在有效范围内 +#define RET_LICA_LRD_PROPERTY_INVALID 0x80013391 // PROPERTY操作出现错误 +#define RET_LICA_LRD_LENGTH_OF_KEY_EXCEED_MAX 0x80013392 // KEY长度太长 +#define RET_LICA_LRD_LENGTH_OF_STORE_EXCEED_MAX 0x80013393 // STORE长度太长 +#define RET_LICA_LRD_PROPERTY_INCOMPATIBLE 0x80013394 // PROPERTY中没找到匹配的键 +#define RET_LICA_LRD_PROPERTY_READONLY 0x80013395 // 该PROPERTY项只读 +#define RET_LICA_LRD_PROPERTY_NOT_COORDINATE 0x80013396 // 该PROPERTY项不能用于电机 +#define RET_LICA_LRD_INVALID_KEY_FMTSTRING 0x80013397 // PROPERTY项格式错误 +#define RET_LICA_LRD_CALIBRATE_FAILED 0x80013398 // 定标失败 +#define RET_LICA_LRD_SPACER_STATE 0x80013399 // 叉子状态错误 +#define RET_LICA_LRD_CPLD_CLEAR 0x8001339a // CPLD清除缓冲失败 +#define RET_LICA_LRD_EXIST_BATTEN 0x8001339b // 模块内已有板条(不允许再推入) +// 2. 0x800133a0 - 0x800133af: 检测模块通用错误代码 +#define RET_READER_INITIALIZE_FAILED 0x800133a0 // 检测模块初始化失败 +#define RET_READER_MODULE_BUSY 0x800133a1 // 检测模块正在忙 +#define RET_READER_CHECKSELF_FAILED 0x800133a2 // 检测模块自检失败 +#define RET_READER_FUNCTION_NOT_SUPPORTED 0x800133a3 // 此功能不支持 +#define RET_READER_EVENT_ERROR 0x800133a4 // 信号量操作失败 +#define RET_READER_PROPERTY_INVALID 0x800133a5 // PROPERTY操作出现错误 +#define RET_READER_LENGTH_OF_KEY_EXCEED_MAX 0x800133a6 // KEY长度太长 +#define RET_READER_LENGTH_OF_STORE_EXCEED_MAX 0x800133a7 // STORE长度太长 +#define RET_READER_PROPERTY_INCOMPATIBLE 0x800133a8 // PROPERTY中没找到匹配的键 +#define RET_READER_PROPERTY_READONLY 0x800133a9 // 该PROPERTY项只读 +#define RET_READER_PROPERTY_NOT_COORDINATE 0x800133aa // 该PROPERTY项不能用于电机 +#define RET_READER_DBG_GET_INFO 0x800133ab // 获取调试信息出错 +#define RET_READER_CALIBRATE_UNCOMPLETED 0x800133ac // 未定标 +// 3. 0x800133b0 - 0x800133bf: POCT错误代码 +#define RET_POCT_PRD_NO_BATTEN 0x800133b1 // 没有板条(锁定板条时) +#define RET_POCT_PRD_EXIST_BATTEN 0x800133b2 // 模块内已有板条(不允许再推入) +#define RET_POCT_PRD_STATE_BATTEN 0x800133b3 // 板条状态错误 +#define RET_POCT_PRD_DISCARD_BATTEN 0x800133b4 // 扔板条失败 +#define RET_POCT_PRD_LIGHT_FLUO 0x800133b5 // 荧光激光有问题 +#define RET_POCT_PRD_LIGHT_CGL 0x800133b6 // 金标灯光有问题 +#define RET_POCT_PRD_CARD_CODE_FAILED 0x800133b7 // 读卡条条码失败 +#define RET_POCT_PRD_AD_FAULT 0x800133b8 // AD读取出错 + +/**@}*/ + +/** + * \defgroup nap 0x80013400 - 0x8001343f: NAP模块错误代码 + */ +/**@{ +*/ + +/*! + \def RET_RD_NAP_DIR_SENSOR_ERROR + \remark 直流电机部分零位传感器读数错误,同时有一个以上传感器触发 + \note 1:请联系技术支持 + 2:机械检查是否有松动部件阻隔光电传感器 + 3:电子检查硬件信号 + + \def RET_RD_NAP_DIR_MOVE_TIMEOUT + \remark 直流电机运动超时 + \note 1:请联系技术支持 + 2:机械检查齿轮是否松动 + 3:电子检查电机驱动线 + + \def RET_RD_NAP_MOTOR_NOT_INIT + \remark 电机未初始化 + \note 1:请联系技术支持 + 2:软件检查是否配置此电机 + 3:检查电机是否被硬件重启 + + \def RET_RD_NAP_OS_EVENT_ERROR + \remark TODO 报错原因. + \note 1:软件原因,请联系技术支持 + + \def RET_RD_NAP_VID_ING + \remark shake正在转动时,调用会发生碰撞的指令 + \note 1:误操作,如是客户程序报错,请联系技术支持 + + \def RET_RD_NAP_TEMEP_SENSOR_ERROR + \remark 读18B20时连续三次读到TEMP_INVALID + \note 1:请联系技术支持 + 2:请电子检查硬件线路 + + \def RET_RD_NAP_PART_BUSY + \remark 此部件正执行上一条指令 + \note 1:误操作,如是客户程序报错,请联系技术支持 + + \def RET_RD_NAP_POWER_LOCKED + \remark 电源管理模块已准备关机 + \note 1:误操作,如是客户程序报错,请联系技术支持 +*/ +#define RET_RD_NAP_DIR_SENSOR_ERROR 0x80013400 +#define RET_RD_NAP_DIR_MOVE_TIMEOUT 0x80013401 +#define RET_RD_NAP_MOTOR_NOT_INIT 0x80013402 +#define RET_RD_NAP_OS_EVENT_ERROR 0x80013403 +#define RET_RD_NAP_VID_ING 0x80013404 +#define RET_RD_NAP_TEMEP_SENSOR_ERROR 0x80013405 +#define RET_RD_NAP_PART_BUSY 0x80013406 /*此部件busy*/ +#define RET_RD_NAP_POWER_LOCKED 0x80013407 /*电源管理模块已准备关机*/ + +/**@}*/ + +/** + * \defgroup pipe 0x80013440 - 0x8001347f: 仁度液路模块错误代码 + */ +/**@{ +*/ + +/*! + \def RET_RD_PIPE_NO_WASTE_BOTTLE + \remark 没有废液瓶 + \note 1.检查废液瓶和传感器 + + \def RET_RD_PIPE_WASTE_BOTTLE_FULL + \remark 废液瓶满 + \note 1.检查废液瓶是否满或者传感器是否正确 + + \def RET_RD_PIPE_PRESURE_TIMEOUT + \remark 指定时间内没有达到压力值 + \note 1.检查液路是否漏气 + \n 2.检查压力传感器 + + \def RET_RD_PUMP_MORE_THAN_MAX_VOL + \remark 不再使用 + \note 不再使用 +*/ +#define RET_RD_PIPE_NO_WASTE_BOTTLE 0x80013440 +#define RET_RD_PIPE_WASTE_BOTTLE_FULL 0x80013441 +#define RET_RD_PIPE_PRESURE_TIMEOUT 0x80013442 +#define RET_RD_PUMP_MORE_THAN_MAX_VOL 0x80013443 + +/**@}*/ + +/** + * \defgroup pipettemt 0x80013480 - 0x800134bf: 多针加样模块(0x0220)错误代码 + */ +/**@{ +*/ + +/*! + \def RET_PIPMT_CODEBAR_NO_READ + \remark 试剂读取条码失败 + \note 1.检查试剂条码 + \n 2.如果故障仍未排除,请联系技术支持 + + \def RET_PIPMT_VACUM_PUMP_NOT_OPEN + \remark 真空泵未打开 + \note 1.打开真空泵重新进行操作 + \n 2.如果故障仍未排除,请联系技术支持 + + \def RET_PIPMT_NOT_WASH + \remark 未清洗试剂针 + \note 1.清洗试剂针 + \n 2.如果故障仍未排除,请联系技术支持 + + \def RET_PIPMT_CONTAINER_TYPE_ERROR + \remark 容器类型错误 + \note 请联系技术支持 + + \def RET_PIPMT_DU_ZHEN + \remark 液面检测失败 + \note 1.检查试剂,是否足够,有无气泡等 + \n 2.如果故障仍未排除,请联系技术支持 + + \def RET_PIPMT_PRESS_NOT_ENOUGH + \remark 试剂针撞针 + \note 1.查看试剂针运动轨迹内是否有障碍物 + \n 2.查看定标位置是否正确 + \n 3.如果故障仍未排除,请联系技术支持 + + \def RET_PIPMT_LQD_NOT_ENOUGH + \remark 液体不足 + \note 1.请添加试剂 + \n 2.如果故障仍未排除,请联系技术支持 + + \def RET_PIPMT_ERR_ZONE + \remark 试剂针不可操作区域 + \note 请联系技术支持 + + \def RET_PIPMT_TARGET_IDX_TOO_BIG + \remark 目标区索引太大 + \note 请联系技术支持 + + \def RET_PIPMT_ARM_NOT_ALLOW + \remark TODO 报错原因. + \note TODO 建议操作 + + \def RET_PIPMT_ROATAE_CH_ERR + \remark 试剂盘索引错误 + \note 请联系技术支持 + + \def RET_PIPMT_NO_WASTE_ZONE + \remark 试剂针未清洗 + \note 执行针清洗 + + \def RET_PIPMT_SD_VALUE_ERR + \remark 试剂模块SD卡值错误 + \note 请联系技术支持 + + \def RET_PIPMT_NO_MODULE_ID + \remark 试剂模块没有模块ID + \note 请联系技术支持 + + \def RET_PIPMT_NO_INIT_SUCCESS + \remark 试剂模块没有初始化成功 + \note 1.检查通信线路 + \n 2.如果故障仍未排除,请联系技术支持 + +*/ + +#define RET_PIPMT_CODEBAR_NO_READ 0x80013480 +#define RET_PIPMT_VACUM_PUMP_NOT_OPEN 0x80013481 +#define RET_PIPMT_NOT_WASH 0x80013482 +#define RET_PIPMT_CONTAINER_TYPE_ERROR 0x80013483 +#define RET_PIPMT_DU_ZHEN 0x80013484 +#define RET_PIPMT_PRESS_NOT_ENOUGH 0x80013485 +#define RET_PIPMT_LQD_NOT_ENOUGH 0x80013486 +#define RET_PIPMT_ERR_ZONE 0x80013487 +#define RET_PIPMT_TARGET_IDX_TOO_BIG 0x80013488 +#define RET_PIPMT_ARM_NOT_ALLOW 0x80013489 +#define RET_PIPMT_ROATAE_CH_ERR 0x80013490 +#define RET_PIPMT_NO_WASTE_ZONE 0x80013491 +#define RET_PIPMT_SD_VALUE_ERR 0x80013492 +#define RET_PIPMT_NO_MODULE_ID 0x80013493 +#define RET_PIPMT_NO_INIT_SUCCESS 0x80013494 +#define RET_PIPMT_NOT_IN_SERVICE 0x80013495 +#define RET_PIPMT_IN_SERVICE 0x80013496 +#define RET_PIPMT_DETECT_LIQUID_HIGH 0x80013497 +#define RET_PIPMT_DETECT_LIQUID_LOW 0x80013498 +/**@}*/ + +/** + * \defgroup cliactl 0x800134c0 - 0x800134ff: CLIA主控模块(0x10b0)错误代码 + */ +/**@{ +*/ +/*! + \def RET_CLIA_CONTROLLER_NO_RESET + \remark 机械未复位,不能执行任何指令 + \note 1.主控单元机械复位 + \n 2.如果故障仍未排除,请联系技术支持 + + \def RET_CLIA_CONTROLLER_IN_SERVICE + \remark 处于维修模式不能执行其它指令 + \note 1.主控单元退出维修模式 + \n 2.如果故障仍未排除,请联系技术支持 + + + \def RET_CLIA_CONTROLLER_NOT_IN_SERVICE + \remark 不在维修模式不能执行维修模式下指令 + \note 1.主控单元进入维修模式 + \n 2.如果故障仍未排除,请联系技术支持 + + \def RET_CLIA_CONTROLLER_INVALID_DIRECTION + \remark 电机运动方向错误 + \note 请联系技术支持 + + \def RET_CLIA_CONTROLLER_PUMP_BUSY + \remark 废液泵处于工作状态 + \note 请联系技术支持 + + \def RET_CLIA_CONTROLLER_SESSION_FULL + \remark 指令缓冲区满 + \note 请联系技术支持 + + \def RET_CLIA_CONTROLLER_NO_INIT_SUCCESS + \remark 模块上电初始化失败 + \note 1.检查通讯是否正常 + \n 2.如果故障仍未排除,请联系技术支持 + + \def RET_CLIA_MSlIQUID_EMPTY + \remark 清洗液空 + \note 1.添加清洗液 + \n 2.如果故障仍未排除,请联系技术支持 + + \def RET_CLIA_CONTROLLER_DCMOTOR_STOP_ERROR + \remark 主控直流电机停止失败 + \note 请联系技术支持 + + \def RET_CLIA_CONTROLLER_DCMOTOR_NOT_AT_ZERO + \remark 主控直流电机不在零位 + \note 请联系技术支持 + + \def RET_CLIA_SHEATH_LIQUID_EMPTY + \remark 鞘流液空 + \note 1.添加鞘流夜 + \n 2.如果故障仍未排除,请联系技术支持 + + \def RET_CLIA_MSPROBE_TOUCH_CUPBOTTOM + \remark 清洗机构碰撞 + \note 1.查看清洗机构下方是否有障碍 + \n 2.如果故障仍未排除,请联系技术支持 + + \def RET_CLIA_MATERIAL_EMPTY + \remark 耗材空 + \note 1.添加耗材 + \n 2.如果故障仍未排除,请联系技术支持 + + \def RET_CLIA_RECYCLE_REGION_FULL + \remark 耗材回收区满 + \note 1.清空耗材回收区 + \n 2.如果故障仍未排除,请联系技术支持 + + \def RET_CLIA_TC_CATCH_CUP_FALL + \remark 轨道转换器抓杯失败 + \note 请联系技术支持 + + \def RET_CLIA_MSSTACK_MOTORF1_CLOSE_FAIL + \remark 耗材架横推电机关闭失败 + \note 请联系技术支持 + + \def RET_CLIA_MSSTACK_DRAWER_OPEN + \remark 耗材架抽屉打开 + \note 1.关闭耗材架抽屉 + \n 2.如果故障仍未排除,请联系技术支持 + + \def RET_CLIA_MSSTACK_DOOR_OPEN + \remark 耗材架门打开 + \note 1.关闭耗材架门 + \n 2.如果故障仍未排除,请联系技术支持 + + \def RET_CLIA_MATERIAL_ERROR + \remark 耗材架架数大于实际需求 + \note 请联系技术支持 + + \def RET_CLIA_MSSTACK_INJECT_ERROR + \remark 耗材架进样错误 + \note 请联系技术支持 + + \def RET_CLIA_MSSTACK_RECYCLE_ERROR + \remark 耗材架回收错误 + \note 请联系技术支持 +*/ +#define RET_CLIA_CONTROLLER_NO_RESET 0x800134c0 //未机械复位,临时宏定义 +#define RET_CLIA_CONTROLLER_IN_SERVICE 0x800134c1 //在维修模式,临时宏定义 +#define RET_CLIA_CONTROLLER_NOT_IN_SERVICE 0x800134c2 //不在维修模式 +#define RET_CLIA_CONTROLLER_INVALID_DIRECTION 0x800134c3 //无效方向 +#define RET_CLIA_CONTROLLER_PUMP_BUSY 0x800134c4 //泵忙 +#define RET_CLIA_CONTROLLER_SESSION_FULL 0x800134c5 +#define RET_CLIA_CONTROLLER_NO_INIT_SUCCESS 0x800134c6 //未初始化成功 +#define RET_CLIA_MSlIQUID_EMPTY 0x800134c7 //磁分离液空 +#define RET_CLIA_CONTROLLER_DCMOTOR_STOP_ERROR 0x800134c8 //直流电机停止失败 +#define RET_CLIA_CONTROLLER_DCMOTOR_NOT_AT_ZERO 0x800134c9 //直流电机不在零位 +#define RET_CLIA_SHEATH_LIQUID_EMPTY 0x800134ca //鞘流液空 +#define RET_CLIA_MSPROBE_TOUCH_CUPBOTTOM 0x800134cb //磁分离机构碰撞 +#define RET_CLIA_MATERIAL_EMPTY 0x800134cc //耗材空 +#define RET_CLIA_RECYCLE_REGION_FULL 0x800134cd //废料架满 +#define RET_CLIA_TC_CATCH_CUP_FALL 0x800134ce //轨道转换器抓杯失败 +#define RET_CLIA_MSSTACK_MOTORF1_CLOSE_FAIL 0x800134cf //耗材架横推电机关闭失败 +#define RET_CLIA_MSSTACK_DRAWER_OPEN 0x800134d0 //耗材架抽屉打开 +#define RET_CLIA_MSSTACK_DOOR_OPEN 0x800134d1 //耗材架门打开 +#define RET_CLIA_MATERIAL_ERROR 0x800134d2 //耗材架架数大于实际需求 +#define RET_CLIA_MSSTACK_INJECT_ERROR 0x800134d3 //耗材架进样失败 +#define RET_CLIA_MSSTACK_RECYCLE_ERROR 0x800134d4 //耗材架回收失败 + +/**@}*/ +/** + * \defgroup poctctrl 0x80013501 - 0x8001353f: POCT主控模块(0x10e0)错误代码 + */ +/**@{ +*/ +/*! + \def RET_POCT_NO_CODE_PAPER + \remark 条码机没有输出任何数据 + \note 1:检查条码纸是否清晰 + 2:检查条码机的硬件链接 + \def RET_POCT_LENGTH_OVERFLOW + \remark 条码机输出的条码长度超过设定值 + \note 1:联系技术支持 + + \def RET_POCT_CONTROLLER_INVALID_BAR_FORMAT + \remark 条码机未按指定格式输出条码 + \note 1:联系技术支持 + 2:检查硬件连接 + + + \def RET_POCT_DIR_SENSOR_ERROR + \remark 取板条直流电机传感器读数错误:同时多个传感器触发 + \note 1:联系技术支持 + 2:检查硬剂连接 + + + \def RET_POCT_CONTROLLER_DIR_MOVE_TIMEOUT + \remark 取板条直流电机运动超时,未在规定时间内触犯目标位置零位 + \note 1:联系技术支持 + 2:检查硬件连接 + 3:检查齿轮是否松动 + + + \def RET_POCT_NO_TUBE + \remark 板条转移机构上没有板条: 1:取板条时未成功取到 + 2:推板条时,转移机构上没有板条 + \note 1:确认板条盒内是否还有剩余板条 + 2:检查取板条机构是否松动 + + \def RET_POCT_MOTOR_BE_RESET + \remark 电机模块芯片被复位 + \note 1:请联系技术支持 + + \def RET_POCT_CONTROLLER_REASHA + \remark 1:试剂盘震动部件 起震失败 + 2:试剂盘震动过程中,操作试剂盘 + \note 1:确认时候操作失误 + 2:请联系技术支持 + + \def RET_POCT_CONTROLLER_HAVE_TUBE + \remark 板条转移机构上已存在板条 + \note 1:确认是否是误操作 + 2:请联系技术支持 + + \def RET_POCT_CONTROLLER_UNSUPPORT + \remark TODO 报错原因. + \note 1:请联系技术支持,软件错误 + + \def RET_POCT_CONTROLLER_NEED_RESET + \remark TODO 报错原因. + \note TODO 建议操作 + + \def RET_POCT_CONTROLLER_MODULE_BUSY + \remark TODO 当前进程忙. + \note 1: 操作失误 + 2: 上层软件流程错误 + +*/ +#define RET_POCT_NO_CODE_PAPER 0x80013501 /*条码机未读取到任何数据*/ +#define RET_POCT_LENGTH_OVERFLOW 0x80013502 /*条码长度超过设定值*/ +#define RET_POCT_CONTROLLER_INVALID_BAR_FORMAT 0x80013503 /*非法条码格式,1:没有结束标志;2:结束标志后仍有数据被接收到*/ + +#define RET_POCT_DIR_SENSOR_ERROR 0x80013504 /*取板条直流电机传感器读数错误:同时多个传感器触发*/ +#define RET_POCT_CONTROLLER_DIR_MOVE_TIMEOUT 0x80013505 /*取板条直流电机运动超时:未在规定时间内触犯目标位置零位*/ +#define RET_POCT_NO_TUBE 0x80013506 /*板条转移机构上没有板条: 1:取板条时未成功取到\2:推板条时,转移机构上没有板条*/ +#define RET_POCT_MOTOR_BE_RESET 0x80013507 /*电机被硬件上复位*/ +#define RET_POCT_CONTROLLER_REASHA 0x80013508 /*试剂盘震动部件未正确落下*/ +#define RET_POCT_CONTROLLER_HAVE_TUBE 0x80013509 /*板条转移机构上已存在板条*/ +#define RET_POCT_CONTROLLER_UNSUPPORT 0x8001350a /**/ +#define RET_POCT_CONTROLLER_NEED_RESET 0x8001350b /*电机需要被机械复位才能工作*/ +#define RET_POCT_CONTROLLER_MODULE_BUSY 0x8001350c +#define RET_POCT_CONTROLLER_NOT_INIT 0x8001350d +/**@}*/ + +/** + * \defgroup sstack 0x80013540 - 0x8001357f: POCT/CLIA样本架模块(0x10d0)错误代码 + */ +/**@{ +*/ +/*! + \def RET_POCT_STACK_OUTPUT_FULL + \remark 回收区已满(回收区检查传感器已触发) + \note 1.及时将回收区样本架取走 + \n 2.如果没有样本架触发,则检查传感器 + + \def RET_POCT_STACK_HAS_NO_TUBE_UNDER_TONGS + \remark 摇匀位没有试管存在(抓取前,放下后) + \note 1.检查抓手上是否有试管 + \n 2.检查试管有无检测传感器 + + \def RET_POCT_STACK_STILL_HAS_TUBE_UNDER_TONGS + \remark 摇匀位试管没有抓取成功 + \note 1.检查抓手上是否有试管 + \n 2.检查试管有无检测传感器 + + \def RET_POCT_STACK_IS_NOT_ONLINE + \remark 不是对接类型 + \note 1.排除传感器问题 + \n 2.非对接类型直接人工取走 + + \def RET_POCT_STACK_OUTPUT_EMPTY + \remark 不再使用 + \note 不再使用 + + \def RET_POCT_STACK_OUTPUT_SENSOR_FAILED + \remark 不再使用 + \note 不再使用 + + \def RET_POCT_STACK_DECODE_HAVE_NOT_READ + \remark 条码位没有试管或者计数已经出错,当前条码未读出 + \note 1.检查有无试管 + \n 2.检查计数传感器 + \n 3.检查读取前有没有扫过当前条码 + + \def RET_POCT_STACK_DIRECT_MOTOR_OVERTIME + \remark 抓手憋死了 + \note 1.检查抓手传感器有无问题 + \n 2.检查抓手运动方向是否正确 + \n 3.检查定标,是否抓在帽子上 + + \def RET_POCT_STACK_READ_PCA9535_FAILED + \remark 不再使用 + \note 不再使用 + + \def RET_POCT_STACK_DIRECT_MOTOR_FAILED + \remark 不再使用 + \note 不再使用 + + \def RET_POCT_STACK_COUNT_WRONG + \remark 计数错误 + \note 1.检查左右计数传感器是否正常跳变 + + \def RET_POCT_STACK_HAVE_NOT_IMPLEMENTED + \remark 不再使用 + \note 不再使用 + + \def RET_POCT_STACK_SHAKE_FLAG_ERROR + \remark 不再使用 + \note 不再使用 + + \def RET_POCT_STACK_MORTOR_NOT_RESET + \remark 电机尚未复位 + \note 复位电机 + + \def RET_POCT_STACK_INVALID_CODE_FORMAT + \remark 无效条码 + \note 1.更换条码 + \n 2.软件错误, 联系技术支持 + + \def RET_POCT_STACK_NO_RACK_TO_GO + \remark 没有试管架在位,不再推 + \note 1.放一个新试管架 + + \def RET_POCT_STACK_INPUT_SENSOR_FAILED + \remark 进样到位传感器未触发 + \note 1.检查传感器实际是否触发 + \n 2.检查定标是否准确 + + \def RET_POCT_STACK_COUNT_WRONG_LEFT + \remark 左边的计数传感器未接收到跳变 + \note 1.查看传感器 + \n 2.查看是否确实往前走了一格 + + \def RET_POCT_STACK_COUNT_WRONG_RIGHT + \remark 右边的计数传感器未接收到跳变 + \note 1.查看传感器 + \n 2.查看是否确实往前走了一格 + + \def RET_CLIA_SAMPLE_NO_RESET + \remark 样本架未复位 + \note 1.样本架单元机械复位 + \n 2.如果故障仍未排除,请联系技术支持 + + \def RET_CLIA_SAMPLE_IN_SERVICE + \remark 处于维修模式不能执行其它指令 + \note 1.样本架单元退出维修模式 + \n 2.如果故障仍未排除,请联系技术支持 + + \def RET_CLIA_SAMPLE_NOT_IN_SERVICE + \remark 不在维修模式不能执行其它指令 + \note 1.样本架单元进入维修模式 + \n 2.如果故障仍未排除,请联系技术支持 + + \def RET_CLIA_SAMPLE_INVALID_DIRECTION + \remark 电机运动方向错误 + \note 请联系技术支持 + + \def RET_CLIA_SAMPLE_SESSION_FULL + \remark 废液泵处于工作状态 + \note 请联系技术支持 + + \def RET_CLIA_SAMPLE_READBARCODE_TIMEOUT + \remark 读条码超时 + \note 1.请检查条码 + \n 2.如果故障仍未排除,请联系技术支持 + + \def RET_CLIA_SAMPLE_READBARCODE_NO_READ + \remark 读条码失败 + \note 1.请检查条码 + \n 2.如果故障仍未排除,请联系技术支持 + + \def RET_CLIA_SAMPLE_RECYCLE_AREA_FULL + \remark 样本架回收区满 + \note 1.清空回收区 + \n 2.如果故障仍未排除,请联系技术支持 + + \def RET_CLIA_SAMPLE_NO_INIT_SUCCESS + \remark 模块上电初始化失败 + \note 请联系技术支持 + + \def RET_CLIA_SAMPLE_RESET_ERROR + \remark 机械复位失败 + \note 1.重新复位样本架模块 + \n 2.如果故障仍未排除,请联系技术支持 + + \def RET_CLIA_SAMPLE_RACK_EMPTY + \remark 进样区样本架空 + \note 添加样本架 + + \def RET_CLIA_SAMPLE_BARCODE_NOT_READ_YET + \remark 条码区尚未准备好 + \note 请联系技术支持 + + \def RET_CLIA_SAMPLE_POP_CUP_FALL + \remark 样本架抓取失败 + \note 请联系技术支持 + + \def RET_CLIA_SAMPLE_PUSH_CUP_FALL + \remark 样本架放置失败 + \note 请联系技术支持 + + \def RET_CLIA_SAMPLE_EMPTY + \remark 样本架空 + \note 放置样本架 + + \def RET_CLIA_SAMPLE_GET_LIQUID_FULL + \remark 样本架吸样位满 + \note 1.检查吸样位传感器状态和样本架状态 + \n 2.如果故障仍未排除,请联系技术支持 + + \def RET_CLIA_SAMPLE_RECYCLE_REGION_ERROR + \remark 回收区有样本架 + \note 1.检查回收区传感器状态 + \n 2.如果故障仍未排除,请联系技术支持 + + \def RET_CLIA_SAMPLE_MOTORCATCH_SENSOR_ON + \remark 抓取样本架是否成功传感器触发 + \note 1.检查抓取样本架是否成功传感器状态 + \n 2.如果故障仍未排除,请联系技术支持 + + \def RET_CLIA_SAMPLE_MOTORC_CATCH_FAIL + \remark 联机模块电机抓取样本架失败 + \note 1.检查联机模块电机抓取是否成功传感器状态 + \n 2.如果故障仍未排除,请联系技术支持 + + + \def RET_CLIA_SAMPLE_XFER_ERROR + \remark 指令与实际状态不符无法转移 + \note 1.检查限位传感器在抓手闭合和张开状态下的状态 + \n 2.如果故障仍未排除,请联系技术支持 + + \def RET_CLIA_SAMPLE_CONNECT_SEND_ERROR + \remark 联机SEND信号异常 + \note 1.检查SEND接线 + \n 2.如果故障仍未排除,请联系技术支持 + +*/ +#define RET_POCT_STACK_OUTPUT_FULL 0x80013541 //回收部分满 +#define RET_POCT_STACK_HAS_NO_TUBE_UNDER_TONGS 0x80013542 //抓手正对下方试管架上没有试管 +#define RET_POCT_STACK_STILL_HAS_TUBE_UNDER_TONGS 0x80013543 //抓手正对下方试管架上仍然有试管 +#define RET_POCT_STACK_IS_NOT_ONLINE 0x80013544 //不是对接类型 +#define RET_POCT_STACK_OUTPUT_EMPTY 0x80013545 //回收部分没有试管架 +#define RET_POCT_STACK_OUTPUT_SENSOR_FAILED 0x80013546 //回收部分传感器触发失败 +#define RET_POCT_STACK_DECODE_HAVE_NOT_READ 0x80013547 //条码尚未读出 +#define RET_POCT_STACK_DIRECT_MOTOR_OVERTIME 0x80013548 //直流电机开启/关闭超时 +#define RET_POCT_STACK_READ_PCA9535_FAILED 0x80013549 //读PCA9535失败 +#define RET_POCT_STACK_DIRECT_MOTOR_FAILED 0x8001354a //直流电机运动失败 +#define RET_POCT_STACK_COUNT_WRONG_BOTH 0x8001354b //计数错误(会引起条码错位) +#define RET_POCT_STACK_HAVE_NOT_IMPLEMENTED 0x8001354c //功能未实现 +#define RET_POCT_STACK_SHAKE_FLAG_ERROR 0x8001354d //摇匀flag错误 +#define RET_POCT_STACK_MORTOR_NOT_RESET 0x8001354f //电机未复位 +#define RET_POCT_STACK_INVALID_CODE_FORMAT 0x80013550 + +#define RET_POCT_STACK_TUBE_RACK_SENSOR_FAILED 0x80013551 //进样样本架类型传感器出错 +#define RET_POCT_STACK_NO_RACK_TO_GO 0x80013552 //无试管架 +#define RET_POCT_STACK_INPUT_SENSOR_FAILED 0x80013553 //进样传感器未触发 +#define RET_POCT_STACK_COUNT_WRONG_LEFT 0x80013554 //左计数错误 +#define RET_POCT_STACK_COUNT_WRONG_RIGHT 0x80013555 //右计数错误 + +#define RET_CLIA_SAMPLE_NO_RESET 0x80013561 //未机械复位,临时宏定义 +#define RET_CLIA_SAMPLE_IN_SERVICE 0x80013562 //在维修模式,临时宏定义 +#define RET_CLIA_SAMPLE_NOT_IN_SERVICE 0x80013563 //不在维修模式,临时宏定义 +#define RET_CLIA_SAMPLE_INVALID_DIRECTION 0x80013564 //无效方向 +#define RET_CLIA_SAMPLE_SESSION_FULL 0x80013565 //会话缓冲区满 +#define RET_CLIA_SAMPLE_READBARCODE_TIMEOUT 0x80013566 +#define RET_CLIA_SAMPLE_READBARCODE_NO_READ 0x80013567 +#define RET_CLIA_SAMPLE_RECYCLE_AREA_FULL 0x80013568 //回收区满 +#define RET_CLIA_SAMPLE_NO_INIT_SUCCESS 0x80013569 //系统未初始化成功 +#define RET_CLIA_SAMPLE_RESET_ERROR 0x8001356a //机械复位失败 CAN_NOT_RESET +#define RET_CLIA_SAMPLE_RACK_EMPTY 0x8001356b /*进样区板架空*/ +#define RET_CLIA_SAMPLE_BARCODE_NOT_READ_YET 0x8001356c /*条码尚未读出*/ +/*样本架2.0版本错误代码*/ +#define RET_CLIA_SAMPLE_POP_CUP_FALL 0x8001356d //样本架抓取失败 +#define RET_CLIA_SAMPLE_PUSH_CUP_FALL 0x8001356e //样本架放置失败 +#define RET_CLIA_SAMPLE_EMPTY 0x8001356f //样本架空 +#define RET_CLIA_SAMPLE_GET_LIQUID_FULL 0x80013570 //样本吸样位满 +#define RET_CLIA_SAMPLE_RECYCLE_REGION_ERROR 0x80013571 //回收区有样本架 +#define RET_CLIA_SAMPLE_MOTORCATCH_SENSOR_ON 0x80013572 //抓取是否成功传感器触发 +#define RET_CLIA_SAMPLE_MOTORC_CATCH_FAIL 0x80013573 //联机模块电机抓取电机失败 +#define RET_CLIA_SAMPLE_XFER_ERROR 0x80013574 //指令与实际状态不符无法转移 +#define RET_CLIA_SAMPLE_CONNECT_SEND_ERROR 0x80013575 //联机SEND信号异常 +#define RET_CLIA_SAMPLE_I2C_STATE_ERROR 0x80013576 //两次I2C读取状态不一致 +#define RET_CLIA_SAMPLE_CATCH_Z_FAIL 0x80013577 //抓取试管架,Z下去上来报错,可能是由于Y没转到位置,处理办法电机复位重新抓取 + +/**@}*/ + +/** + * \defgroup ifa 0x80013580 - 0x800135bf: ifa模块(0x1110)错误代码 + */ +/**@{ +*/ +/*! + \def RET_IFA_DISPENSE_ERROR + \remark TODO 报错原因. + \note TODO 建议操作 + + \def RET_IFA_DIR_TIMEOUT + \remark 废液针直流电机运动超时,未在规定时间内触犯目标位置零位 + \note 1:联系技术支持 + 2:检查硬件连接 + 3:检查齿轮是否松动 + + \def RET_IFA_DIR_SENSOR_ERROR + \remark 废液针直流电机传感器读数错误:同时多个传感器触发 + \note 1:联系技术支持 + 2:检查硬剂连接 + + \def RET_IFA_OP_UNSUPPORT + \remark TODO 报错原因. + \note TODO 建议操作 + + \def RET_IFA_LIQUID_DETECT_TRIG_BEFORE + \remark TODO 报错原因. + \note TODO 建议操作 + +*/ +#define RET_IFA_DISPENSE_ERROR 0x80013581 +#define RET_IFA_DIR_TIMEOUT 0x80013582 +#define RET_IFA_DIR_SENSOR_ERROR 0x80013583 +#define RET_IFA_OP_UNSUPPORT 0x80013584 +#define RET_IFA_LIQUID_DETECT_TRIG_BEFORE 0x80013585 +/**@}*/ + +/** + * \defgroup sstack 0x80013800-0x8001383f: 流式荧光模块(FCM: DSP+FPGA)(0x1800)错误代码 + */ +//13800-1381f 划给socket +#define RET_SOCKET_STATUS_ERROR 0x80013800 //SOCKET_ESTABLISHED or SOCKET_CLOSE_WAIT +#define RET_SOCKET_TX_BUFF_NOT_ENOUGH 0x80013801 //socket接口, 本次发送的数据长度,大于剩余的发送缓存 +#define RET_SOCKET_SEND_BUSY 0x80013802 //socket正在发送 +#define RET_SOCKET_STATE_BUSY 0x80013803 //socket正处于非空闲状态的时候, 设置状态寄存器 +#define RET_SOCKET_INIT_FAILED 0x80013804 //socket设置成tcp\udp失败报错 + +#define RET_FCM_REG_WRITE_FAILED 0x80013020 //DSP写FPGA寄存器失败 +#define RET_FCM_REG_XINTF_ERROR 0x80013021 //xintf总线异常,保存与读取值不一致. +#define RET_FCM_W5300_OPERATE_FAILED 0x80013022 //DSP操作w5300失败 +#define RET_FCM_ERR_IF_G_01 0x80013023 //FPGA异常 +#define RET_FCM_ERR_IF_G_02 0x80013024 +#define RET_FCM_ERR_IF_G_03 0x80013025 +#define RET_FCM_ERR_IF_G_04 0x80013026 +#define RET_FCM_ERR_IF_G_05 0x80013027 +#define RET_FCM_ERR_IF_G_06 0x80013028 +#define RET_FCM_ERR_IF_G_07 0x80013029 +#define RET_FCM_ERR_IF_G_08 0x8001302a +#define RET_FCM_ERR_IF_C 0x8001302b //FPGA 发生 ERR_IF_C +#define RET_FCM_DSP_W5300_INIT_ERR 0x8001302c +#define RET_FCM_DSP_W5300_DATA_WIdTH_ERR 0x8001302d + +/** + * \defgroup ACE 0x80018000-0x8001805F: ACE项目的错误代码 +*/ +/**@{ +*/ +/*! + \def RET_VALVEFLOAT_TEMP_ERROR + \remark 控温错误 + \note TODO 建议操作 + + \def RET_VALVEFLOAT_LASER_ERROR + \remark 激光器寿命报警 + \note TODO 更换激光器 +*/ + +#define RET_ACE_TONGPUREWATER_NOT_CONNECT 0x80018001 //纯水桶未插入 +#define RET_ACE_TONGPUREWATER_EMPTY 0x80018002 //纯水桶空 +#define RET_ACE_TONGCLEAN_NOT_CONNECT 0x80018003 //清洗液桶未插入 +#define RET_ACE_PRESSURE_POSITIVE_ERROR 0x80018004 //正向压力异常 +#define RET_ACE_PRESSURE_NEGATIVE_ERROR 0x80018005 //负向压力异常 +#define RET_ACE_VACUUMCONTAINER_FL04 0x80018006 //真空罐有积水 + +#define RET_VALVEFLOAT_TEMP_ERROR 0x80018007 +#define RET_VALVEFLOAT_LASER_ERROR 0x80018008 +/**@}*/ + + +/** + * \defgroup LAS reaction 0x80018300-0x8001832F: LAS项目反应区的错误代码 + * @{ + */ + +/*! + \def RET_LAS_REACTION_NOT_RESET + \remark 反应区电机未复位 + \note 执行动作前需要先复位 + + \def RET_LAS_REACTION_MOTOR_BUSY + \remark 电机忙 + \note 当前指令有电机资源已被占用 + + \def RET_LAS_REACTION_DEST_HAS_BATTEN + \remark 目标位置有板条 + \note 一切交由上位机控制,底层不再判断 + + \def RET_LAS_REACTION_L1_NOT_IN_POSITION + \remark L1电机不在0位 + \note 该动作需要保证L1电机在0位 + + \def RET_LAS_REACTION_R_NOT_IN_POSITION + \remark R电机不在工作位 + \note 该动作需要保证转盘在工作位 + + \def RET_LAS_REACTION_GET_LATH_FAILED + \remark 取板架失败 + \note 1.堆栈板架取出传感器检查下是否正常 + \n 2.取之前堆栈传感器未触发,没有板架在传感器位置 + \n 3.取之后堆栈传感器触发,取失败 + + \def RET_LAS_REACTION_PUSH_LATH_FAILED + \remark 板条推入转盘失败 + \note 推入转盘后检查该位置传感器为未触发状态 + + \def RET_LAS_REACTION_DOOR_OPENED + \remark 堆栈门开着不可以操作堆栈电机 + \note 关闭堆栈门 + + \def RET_LAS_REACTION_LX_NOT_IN_POSITION + \remark LX电机不在0位 + \note 该动作需要LX电机在0位 + + \def RET_LAS_REACTION_CAN_NOT_RESET + \remark 当前无法复位 + \note 当前电机状态未知,需要下电手动复位几个推杆电机 + + \def RET_LAS_REACTION_L3_NOT_IN_POSITION + \remark L3电机不在0位 + \note 该动作需要L3电机在0位 + + \def RET_LAS_REACTION_STACK_EMPTY + \remark 堆栈没有板架了 + \note 请添加板架 + + \def RET_LAS_REACTION_STACK_EMPTY + \remark 堆栈没有板架了 + \note 请添加板架 + + \def RET_LAS_REACTION_STACK_NOT_INITTED + \remark 堆栈未初始化 + \note 复位并扫描堆栈 + + \def RET_LAS_REACTION_L2_NOT_IN_POSITION + \remark L2电机不在0位 + \note 该动作需要L2电机在0位 + + \def RET_LAS_REACTION_STACK_BUSY + \remark 堆栈电机忙 + \note 等待堆栈动作完成后再执行堆栈指令 + + \def RET_LAS_REACTION_VOLUME_OUT_BOUND + \remark 吸液打液量超出最大范围 + \note 吸液打液量越界 + + \def RET_LAS_REACTION_DROP_NO_ENOUGH_LIQUID + \remark 打液液体量比已吸液体量少 + \note 打液量大于吸液量 + + \def RET_LAS_REACTION_STOP_SHAKE_TIMEOUT + \remark 停温育震荡动作超时 + \note 记录日志,联系工程师 + + \def RET_LAS_REACTION_CHANGE_SHAKE_BUSY + \remark 重复发停止温育指令 + \note 上一条停止指令未完成 + + \def RET_LAS_REACTION_LIQUID_NOT_ENOUGH + \remark 瓶中液体量不足 + \note 及时添加 + + \def RET_LAS_REACTION_L4_NOT_IN_POSITION + \remark L4电机不在0位 + \note 该动作需要L4电机在0位 + + \def RET_LAS_REACTION_LY_NOT_IN_POSITION + \remark LY电机不在0位 + \note 该动作需要LY电机在0位 + + \def RET_LAS_REACTION_MOTOR_SEM_TIMEOUT + \remark 电机信号量超时 + \note 联系工程师 +*/ + +#define RET_LAS_REACTION_NOT_RESET 0x80018301 //反应区电机未复位 +#define RET_LAS_REACTION_MOTOR_BUSY 0x80018302 //电机忙 +#define RET_LAS_REACTION_DEST_HAS_BATTEN 0x80018303 //目标区有板条(不再使用) +#define RET_LAS_REACTION_L1_NOT_IN_POSITION 0x80018304 //L1电机不在0位 +#define RET_LAS_REACTION_R_NOT_IN_POSITION 0x80018305 //转盘不在工作位 +#define RET_LAS_REACTION_GET_LATH_FAILED 0x80018306 //取板条失败 +#define RET_LAS_REACTION_PUSH_LATH_FAILED 0x80018307 //推板条入转盘失败 +#define RET_LAS_REACTION_DOOR_OPENED 0x80018308 //堆栈门开着 +#define RET_LAS_REACTION_LX_NOT_IN_POSITION 0x80018309 //LX电机不在0位 +#define RET_LAS_REACTION_DEST_NOT_INITTED 0x8001830a //目标区未扫描(不再使用) +#define RET_LAS_REACTION_CAN_NOT_RESET 0x8001830b //当前位置无法复位 +#define RET_LAS_REACTION_L3_NOT_IN_POSITION 0x8001830c //L3电机不在0位 +#define RET_LAS_REACTION_STACK_EMPTY 0x8001830d //堆栈空 +#define RET_LAS_REACTION_STACK_NOT_INITTED 0x8001830f //堆栈未扫描 +#define RET_LAS_REACTION_L2_NOT_IN_POSITION 0x80018310 //L2不在0位 +#define RET_LAS_REACTION_STACK_BUSY 0x80018311 //堆栈忙 +#define RET_LAS_REACTION_GET_LATH_EMPTY 0x80018312 //连续两次取上的板条架都没有板条 +#define RET_LAS_REACTION_SRC_NOT_INITTED 0x80018313 //源区域未扫描(不再使用) +#define RET_LAS_REACTION_VOLUME_OUT_BOUND 0x80018314 //吸液打液液体量越界 +#define RET_LAS_REACTION_DROP_NO_ENOUGH_LIQUID 0x80018315 //打液液体量不足 +#define RET_LAS_REACTION_STOP_SHAKE_TIMEOUT 0x80018316 //停止振动超时 +#define RET_LAS_REACTION_CHANGE_SHAKE_BUSY 0x80018317 //重复发停止振动指令 +#define RET_LAS_REACTION_LIQUID_NOT_ENOUGH 0x80018318 //瓶中液体量不足 +#define RET_LAS_REACTION_LY_NOT_IN_POSITION 0x80018319 //LY电机不在0位 +#define RET_LAS_REACTION_L4_NOT_IN_POSITION 0x8001831a //L4电机不在0位 +#define RET_LAS_REACTION_MOTOR_SEM_TIMEOUT 0x8001831b //电机信号量获取超时 + + +/** + * \defgroup general 0x80018500 - 0x8001851f: FISH主控错误代码 + * @{ + */ + +/*! \def RET_FISH_RCT_NOT_INIT + \remark 反应区未复位 + \note 请复位反应区 + + \def RET_FISH_ARM_NOT_INIT + \remark 臂组未复位 + \note 请复位臂组 + + \def RET_FISH_RCT_BUSY + \remark 反应区忙 + \note 等待上一条指令返回 + + \def RET_FISH_INVALID_CONFIG + \remark 无效配置参数 + \note 检查配置有效性 + + \def RET_FISH_CHAMBER_MOVE + \remark 24孔板倾斜放平出错 + \note 检查直流电机及其传感器 + + \def RET_FISH_CHAMBER_STATE + \remark 24孔板直流电机的零限位传感器都触发 + \note 检查传感器 + + \def RET_FISH_RCT_ARM_CONFLICT + \remark 做进行的操作与清洗臂状态冲突 + \note 1.加样臂去反应区时清洗臂的Y不在待机位 + \n 2.倾斜反应舱时清洗臂的Z不在零位 + \n 3.开关门时清洗臂的Z不在零位 + + \def RET_FISH_RCT_DOOR_CONFLICT + \remark 做进行的操作与开关门状态冲突 + \note 1.加样臂去反应区时开关门状态为非开门状态 + \n 2.清洗臂洗针(预处理)时门是关着的 + \n 3.清洗臂吸、加液时门是关着的 + \n 4.反应舱倾斜时门是关着的 + + \def RET_FISH_RCT_CHAMBER_CONFLICT + \remark 做进行的操作与反应舱(加液板)状态冲突 + \note 1.加样臂去反应区时反应区加液板是倾斜的 + \n 2.开关门时反应舱是倾斜的 + \n 3.清洗臂吸、加液时反应舱没有倾斜 + + \def RET_FISH_INJECT_ARM_CONFLICT + \remark 做进行的操作与加样臂冲突 + \note 1.加样臂在反应区且其Z不在零位,清洗臂要移动时报错 + + \def RET_FISH_REMAIN_VOLUME_NOT_GET + \remark 计算液体剩余量时出错(查表法) + \note 1.检查配置文件中剩余量的设置 +*/ +#define RET_FISH_RCT_NOT_INIT 0x80018501 +#define RET_FISH_ARM_NOT_INIT 0x80018502 +#define RET_FISH_RCT_BUSY 0x80018503 +#define RET_FISH_INVALID_CONFIG 0x80018504 +#define RET_FISH_CHAMBER_MOVE 0x80018505 +#define RET_FISH_CHAMBER_STATE 0x80018506 +#define RET_FISH_RCT_ARM_CONFLICT 0x80018507 +#define RET_FISH_RCT_DOOR_CONFLICT 0x80018508 +#define RET_FISH_RCT_CHAMBER_CONFLICT 0x80018509 +#define RET_FISH_INJECT_ARM_CONFLICT 0x8001850A +#define RET_FISH_REMAIN_VOLUME_NOT_GET 0x8001850B +/**@}*/ + +/** + * \defgroup general 0x80018590 - 0x8001859f: PAM轨道模块错误代码 + * @{ + */ + +/*! + \def RET_PAM_TRAY_SAM_NOT_READY + \remark 放样区轨道还未准备好 + \note + + \def RET_PAM_TRAY_RCYC_HAS_TUBE + \remark 回收区已经有试管架 + \note + + \def RET_PAM_TRAY_RCYC_FULL + \remark 回收区已满 + \note + + +*/ +#define RET_PAM_TRAY_SAM_NOT_READY 0x80018590 //放样区轨道还未准备好 +#define RET_PAM_TRAY_RCYC_HAS_TUBE 0x80018591 //回收区已经有试管架 +#define RET_PAM_TRAY_RCYC_FULL 0x80018592 //回收区已满 + +/**@}*/ + + +/** + * \defgroup general 0x80018530 - 0x8001853f: 0x1870 泵阀控制模块错误代码 + * @{ + */ + +/*! + \def RET_PUMPEXT_PRESSURE_UPPERLIMIT + \remark 压力传感器超过上限阈值 + \note + + \def RET_PUMPEXT_PRESSURE_LIMIT_LOW + \remark 压力传感器低于下限阈值(压力已建立) + \note + + \def RET_PUMPEXT_PRESSURE_NOT_BUILD_UP + \remark 压力传感器在指定时间内未达到指定压力 + \note +*/ +#define RET_PUMPEXT_PRESSURE_LIMIT_UPPER 0x80018530 +#define RET_PUMPEXT_PRESSURE_LIMIT_LOW 0x80018531 +#define RET_PUMPEXT_PRESSURE_NOT_BUILD_UP 0x80018532 + + +/**@}*/ +//**************************************************************************** +// 软件组错误ID分配 +// 杭州软件组特有ID范围:0x80022000~0x80022FFF +// 通用ID:0x80022000~0x800220FF //共256个 +// TVC ID:0x80022100~0x8002211F //共32个 +// FMC ID:0x80022120~0x8002212F //共16个 +// DRC ID: 0x80022130~0x8002214F //共32个 +//****************************************************************************/ +/** + * \defgroup HZKK reaction 0x80022000-0x80022FFF +*/ +/**@{ +*/ + +//杭州软件组通用ID +#define RET_FILE_PROPERTY_ISERROR 0x80022000 //配置文件参数错误 +#define RET_CMD_IS_BUSY 0x80022001 //指令忙(上一条指令尚未解析完) +#define RET_Counter_Full 0x80022002 //计数器已满、已达阈值 +#define RET_MODULE_IS_BUSY RET_OS_MODULE_BUSY //模块忙(上一条指令尚未执行完成) +#define RET_TASK_IS_BUSY 0x80022004 //任务忙 +#define RET_DEVICE_IS_LOCKED 0x80022005 //硬件资源被其他任务或模块暂用 +#define RET_MODULE_IS_Not_Init 0x80022006 //对应功能没有初始化 +#define RET_Init_Not_ready 0x80022007 //对应需求功能尚未初始化完成 +#define RET_Motor_IS_Not_Init 0x80022008 //对应电机没有初始化 + + +//TVC 项目特有ID 0x80022100~0x8002211F +#define RET_TVC_Sensor_Counter 0x80022100 //计数器传感器触发 +#define RET_TVC_Sensor_Empty 0x80022101 //空仓传感器触发 +#define RET_TVC_Sensor_Full 0x80022102 //满仓传感器触发 + +#define RET_TVC_Sensor_3step 0x80022103 //三阶传感器触发 +#define RET_TVC_Sensor_2step 0x80022104 //二阶传感器触发 +#define RET_TVC_Sensor_1step 0x80022105 //一阶传感器触发 +#define RET_TVC_Sensor_Drop 0x80022106 //cup掉杯1传感器触发 + +#define RET_SENSOR_catch_Error 0x80022107 //夹紧电机传感器触发 +#define RET_SENSOR_door_Error 0x80022108 //门传感器触发 +#define RET_SENSOR_up_Error 0x80022109 // +#define RET_SENSOR_down_Error 0x8002210A +#define RET_SENSOR_getbox_Error 0x8002210B +#define RET_SENSOR_outbox_Error 0x8002210C + +//#define RET_TVC_ + +//FMC 项目特有ID 0x80022120~0x8002212F + + +//DRC 项目特有ID 0x80022130~0x8002214F +#define RET_DRC_INJECT_FAILE 0x80022130 +#define RET_DRC_SUCKWASTE_POINT_ERROR 0x80022131 +#define RET_DRC_SUCK_EXCEPTION 0x80022132 +#define RET_DRC_DUAL_NORESPONSE 0x80022133 + +#define RET_DRC_TONGCLEANWATER_FULL 0x80022134 //洗涤液满 +#define RET_DRC_TONGPUREWATER_EMPTY RET_ACE_TONGPUREWATER_EMPTY //纯水桶空 +#define RET_DRC_TONGWASTEWATER_EMPTY RET_RD_PIPE_NO_WASTE_BOTTLE //废液桶未插入 +#define RET_DRC_TONGWASTEWATER_FULL RET_RD_PIPE_WASTE_BOTTLE_FULL //废液桶满 +#define RET_DRC_MOTOR_NOT_INIT RET_Motor_IS_Not_Init //电机未复位 +#define RET_DRC_TONGCLEANWATER_EMPTY RET_CLIA_MSlIQUID_EMPTY //洗涤液空 + +/**@}*/ + + + + + + + +/*#define RET_UNSUPPORTED 0x01 +#define RET_UNKNOWN_CMD 0x02 +#define RET_INVALID_PARAM 0x03 +#define RET_DEPRECATED 0x04 +#define RET_SERIAL_EXISTS 0x05 +#define RET_INVALID_SLAVE_ADDR 0x06 + +#define RET_BUFFER_FULL 0x10 +#define RET_DEVICE_BUSY 0x11 +#define RET_LOAD_FAILED 0x12 +#define RET_STORE_FAILED 0x13 +#define RET_USER_ABORT 0x14 +#define RET_DEVICE_RESET 0x15 +#define RET_DEVICE_POWER_OFF 0x16 +#define RET_BUFFER_EMPTY 0x17 +#define RET_BUFFER_WAIT 0x18 +#define RET_UART_TIMEOUT 0x19 +#define RET_UART_BUSY 0x1a +#define RET_CONFIG_NOT_LOADED 0x1b +#define RET_DATA_TYPE_MISMATCH 0x1c +#define RET_DEVICE_NOT_EXISTS 0x1d + +#define RET_I2C_FAIL 0x20 // crc error or i2c buffer full +#define RET_I2C_FRAME_ERR 0x21 +#define RET_I2C_TIMEOUT 0x22 +#define RET_CRITICAL_TIMEOUT 0x23 +#define RET_CRITICAL_ACCESS_DENY 0x24 +#define RET_CRITICAL_FAILED 0x25 +#define RET_PLATE_COVER_CLOSED 0x26 +#define RET_WASTE_NOT_DETECTED 0x27 +#define RET_PLATE_NOT_DETECTED 0x28 +#define RET_CUVETTE_NOT_DETECTED 0x29 +#define RET_SPI_TIMEOUT 0x2a +#define RET_I2C_CONFIG_TIMEOUT 0x2b +#define RET_I2C_CRC_ERR 0x2c + +#define RET_TIP_NOT_FOUND 0x51 // 搜索吸头失败 +#define RET_METHOD_MISMATCH 0x4a // 量程适配器不匹配 + +#define RET_WASHUNIT_TIMEOUT 0x60 +#define RET_WASHUNIT_FAILED 0x61 + +#define RET_STOP_PRESSED 0x80 +#define RET_DEVICE_NOT_INIT 0x81 +#define RET_SENSOR_FAILED 0x82 +#define RET_PROTECT_SENSOR_TOGGLE 0x83 +#define RET_TIP_DROP 0x84 +#define RET_ARM_NOT_INIT 0x85 +#define RET_X9313_FAILED 0x86 +#define RET_PRESSURE_TIMEOUT 0x87 +#define RET_BARCODE_LASER_FAILED 0x88 + +#define RET_COORD_OUT_BOUND 0x90 +#define RET_COORD_LOSTSTEP_FWD 0x91 +#define RET_COORD_LOSTSTEP_RVS 0x92 +#define RET_MOTOR_TIMEOUT 0x93 +#define RET_SLAVE_CMD_TIMEOUT 0x94 +#define RET_SLAVE_CMD_FAILED 0x95*/ + +/** + * \addtogroup other 其他代码 + * @{ + */ +/*! + \def RET_ERR_UNKNOWN + \remark TODO 报错原因. + \note TODO 建议操作 +*/ +#define RET_ERR_UNKNOWN 0xffffffff +/**@}*/ + + +#define RET_IO_EXT_NOT_INIT 0x800A0001 + + +#endif diff --git a/property.c b/property.c new file mode 100644 index 0000000..5f5c6a1 --- /dev/null +++ b/property.c @@ -0,0 +1,2973 @@ +#include "property.h" +#include +#include +#include +#include +#include "errcode_inc.h" + +#if ((defined PROPERTY_PROV_FS_EN) && (PROPERTY_PROV_FS_EN != 0)) + +// #include "ff.h" + +#if (((defined DISTRIBUTION) || (PROPERTY_CHECKSUM_ENABLED != 0)) && (PROPERTY_CHECKSUM_DISABLED == 0)) +#include "sha2.h" +#endif +#endif +#if ((defined PROPERTY_PROV_REMOTE_EN) && (PROPERTY_PROV_REMOTE_EN != 0)) +#include "mod_bus.h" +#endif + +#if (((!defined PROPERTY_PROV_FS_EN) || (PROPERTY_PROV_FS_EN == 0)) && ((!defined PROPERTY_PROV_REMOTE_EN) || (PROPERTY_PROV_REMOTE_EN == 0))) +#error "define PROPERTY_PROV_FS_EN or PROPERTY_PROV_REMOTE_EN in config.h" +#endif + +/** + * 寮曞叆pthread搴,纭繚绾跨▼瀹夊叏 + */ +#ifdef __linux__ +#include +#include +static pthread_mutex_t prop_mutex; +void prop_lock() +{ + pthread_mutex_lock(&prop_mutex); +} +void prop_unlock() +{ + pthread_mutex_unlock(&prop_mutex); +} +void prop_lock_init() +{ + pthread_mutex_init(&prop_mutex, NULL); +} +void prop_wait(INT32U time) +{ +} +#else +#include +#include +void prop_lock() +{ + ; +} +void prop_unlock() +{ + ; +} +void prop_lock_init() +{ + ; +} +void prop_wait(INT32U time) +{ + ; +} +#endif +#define config_path "./conf" + +#define COPY_BUF_SIZE 1024 +#define FLOAT_STRING_LEN 32 +#define UPDATE_LOG "0:/conf/update.%d.log" + +typedef struct +{ + const char *key; + const char *value; + INT8U success : 1; +} property_string_item; + +typedef INT32U (*property_get)(const char *store, const char *id, const char *key, char *value, INT32U sizeOfValue, BOOL *isLocal, void *obj); +typedef INT32U (*property_set)(const char *store, const char *id, property_string_item *list, INT32U count, void *obj); +typedef INT32U (*property_clear_cache)(const char *store, const char *id, void *obj); + +typedef struct _sbt_node +{ + struct _sbt_node *ch[2]; + INT8U valid : 1; + INT8U tryLocal : 1; + INT8U isLocal : 1; + char *key; + char *value; + INT32U size; +} sbt_node; + +static sbt_node sbt_nil = {{&sbt_nil, &sbt_nil}, 0, 0, 0, NULL, NULL, 0}; + +typedef struct _prop_cache +{ + char *store; + char *id; + sbt_node *sbt; + struct _prop_cache *next; +} prop_cache; + +typedef struct +{ + struct + { + INT32U init : 1; + INT32U initPending : 1; + INT32U cache : 1; + INT32U lock : 1; + } flag; + char *id; +#if (defined RTOS_UCOS) + OS_EVENT *sem; +#endif + property_get get; + property_set set; + property_clear_cache clear; + prop_cache *cache; + void *obj; +} property_provider; + +static property_provider pp[PROPERTY_PROVIDER_MAX]; +static INT8U file_test_random = 0; + +#if ((defined PROPERTY_PROV_FS_EN) && (PROPERTY_PROV_FS_EN != 0)) +static INT32U FilePropertyInit(INT32U providerId, const PropertyInitParam *param); +#endif +#if ((defined PROPERTY_PROV_REMOTE_EN) && (PROPERTY_PROV_REMOTE_EN != 0)) +static INT32U RemotePropertyInit(INT32U providerId, const PropertyInitParam *param); +#endif + +// linux涓媘alloc鏄嚎绋嬪畨鍏ㄧ殑 +static void *malloc_mt(size_t size) +{ + return malloc(size); +} +// linux涓媘alloc鏄嚎绋嬪畨鍏ㄧ殑 +static void free_mt(void *ptr) +{ + free(ptr); +} + +/** + * SBT锛圫pine Binary Tree锛夋槸涓绉嶇壒娈婄殑浜屽弶鏍戠粨鏋勶紝瀹冧富瑕佺敤浜庡鐞嗗瓧绗︿覆妯″紡鍖归厤闂銆 + SBT鐨勭壒鐐规槸灏嗘墍鏈夋ā寮忓瓧绗︿覆鐨勫瓧绗︽寜鐓у瓧鍏稿簭鎺掑垪锛屽苟灏嗗畠浠繛鎺ユ垚涓涓瓧绗︿覆浣滀负鏍戠殑涓诲共锛圫pine锛夛紝姣忎釜妯″紡瀛楃涓蹭綔涓烘爲鐨勪竴涓垎鏀傚湪SBT涓紝妯″紡瀛楃涓茬殑鍏叡鍓嶇紑琚叡浜紝浠庤屽噺灏戜簡鏍戠殑楂樺害锛屾彁楂樹簡鍖归厤鏁堢巼銆 +*/ +static void SBT_Rotate(sbt_node **x, BOOL flag) +{ + // 鏃嬭浆锛歠lag == 0涓哄乏鏃嬶紝鍚﹀垯涓哄彸鏃 + sbt_node *y = (*x)->ch[!flag]; + (*x)->ch[!flag] = y->ch[flag]; + y->ch[flag] = *x; + y->size = (*x)->size; + (*x)->size = (*x)->ch[0]->size + (*x)->ch[1]->size + 1; + *x = y; +} + +static void SBT_Maintain(sbt_node **t, BOOL flag) +{ + // 缁存姢鎿嶄綔鐨勬牳蹇冿細淇濇寔 + if ((*t)->ch[flag]->ch[flag]->size > (*t)->ch[!flag]->size) + { // 鎯呭喌1 + SBT_Rotate(t, !flag); + } + else if ((*t)->ch[flag]->ch[!flag]->size > (*t)->ch[!flag]->size) + { // 鎯呭喌2 + SBT_Rotate(&(*t)->ch[flag], flag); + SBT_Rotate(t, !flag); + } + else + { // 鏃犻渶淇 + return; + } + SBT_Maintain(&(*t)->ch[0], 0); // 淇宸﹀瓙鏍 + SBT_Maintain(&(*t)->ch[1], 1); // 淇鍙冲瓙鏍 + SBT_Maintain(t, 0); // 淇鏁存5鏍 + SBT_Maintain(t, 1); +} + +static INT32U SBT_Depth(sbt_node *t) +{ + INT32U d[2]; + if (t == &sbt_nil) + return 0; + d[0] = SBT_Depth(t->ch[0]); + d[1] = SBT_Depth(t->ch[1]); + if (d[0] > d[1]) + return (d[0] + 1); + return (d[1] + 1); +} + +// static INT32U SBT_Check(sbt_node* t) { +// if (((INT32U)t < 0xa0000000) || ((INT32U)t >= 0xa0800000)) +// return RET_OS_HEAP_CORRUPTED; +// if (t == &sbt_nil) +// return RET_EXT_NO_ERROR; +// if (!SBT_Check(t->ch[0])) +// return RET_OS_HEAP_CORRUPTED; +// if (!SBT_Check(t->ch[1])) +// return RET_OS_HEAP_CORRUPTED; +// return RET_EXT_NO_ERROR; +// } + +static int SBT_NodeCmp(sbt_node *x, BOOL yl, const char *ykey) +{ + if ((x->tryLocal != 0) && (yl == 0)) + return 1; + if ((x->tryLocal == 0) && (yl != 0)) + return -1; + if (x->key == ykey) // 涓よ呭潎涓篘ULL杩斿洖0 + return 0; + if (ykey == NULL) // 鑷冲皯鏈変竴涓笉涓篘ULL, y->key == NULL 鍒 x->key != NULL + return 1; + if (x->key == NULL) + return -1; + return strcmp(x->key, ykey); +} + +static sbt_node *SBT_Search(sbt_node *t, BOOL local, const char *key) +{ + // 鍦═涓腑瀵绘壘鍏抽敭瀛椾负key鐨勭粨鐐 + // 鑻ヨ兘鎵惧埌鍒欒繑鍥炴寚鍚戝畠鐨勬寚閽堬紝鍚﹀垯杩斿洖NULL + int cmp; + if (t == &sbt_nil) + return NULL; + cmp = SBT_NodeCmp(t, local, key); + if (cmp == 0) + return t; + return SBT_Search(t->ch[cmp < 0], local, key); +} + +static void SBT_Insert(sbt_node **t, sbt_node *x) +{ + // 灏嗚妭鐐箈鎻掑叆鏍戜腑 + if ((*t) == &sbt_nil) + { + (*t) = x; + } + else + { + int cmp = SBT_NodeCmp(x, (*t)->tryLocal, (*t)->key); + if (cmp == 0) + { + sbt_node *old = *t; + x->ch[0] = old->ch[0]; + x->ch[1] = old->ch[1]; + *t = x; + free_mt(old->key); + if (old->value != NULL) + free_mt(old->value); + free_mt(old); + } + else + { + (*t)->size++; + SBT_Insert(&(*t)->ch[cmp > 0], x); + SBT_Maintain(t, (cmp > 0)); + } + } +} + +static void SBT_Delete(sbt_node *t) +{ + if (t == &sbt_nil) + return; + SBT_Delete(t->ch[0]); + SBT_Delete(t->ch[1]); + free_mt(t->key); + if (t->value != NULL) + free_mt(t->value); +} + +/** + * ram缂撳瓨 + */ +static sbt_node *CacheGet(property_provider *p, const char *store, const char *id, BOOL local, const char *key) +{ + prop_cache *ptr; + sbt_node *node; + if ((p == NULL) || (store == NULL) || (*store == 0) || (key == NULL) || (*key == 0)) + return NULL; + for (ptr = p->cache; ptr != NULL; ptr = ptr->next) + if ((strcmp(store, ptr->store) == 0) && ((((id == NULL) || (*id == 0)) && ((ptr->id == NULL) || (*ptr->id == 0))) || ((id != NULL) && (ptr->id != NULL) && (strcmp(id, ptr->id) == 0)))) + break; + if (ptr == NULL) + return NULL; + node = SBT_Search(ptr->sbt, local, key); + if (node == NULL) + return NULL; + if (!node->valid) + return NULL; + return node; +} + +static INT32U CacheSet(property_provider *p, const char *store, const char *id, BOOL tryLocal, const char *key, const char *value, BOOL isLocal) +{ + prop_cache *ptr; + sbt_node *node; + INT32U keyLen, valLen; + if ((p == NULL) || (store == NULL) || (*store == 0) || (key == NULL) || (*key == 0)) + return RET_OS_INVALID_PARAM; + node = (sbt_node *)malloc_mt(sizeof(sbt_node)); + if (node == NULL) + return RET_PROPERTY_HEAP_FULL; + keyLen = strlen(key); + valLen = strlen(value); + node->ch[0] = &sbt_nil; + node->ch[1] = &sbt_nil; + node->valid = TRUE; + node->tryLocal = tryLocal; + node->isLocal = isLocal; + node->size = 1; + node->key = (char *)malloc_mt(keyLen + 1); + if (node->key == NULL) + { + free_mt(node); + return RET_PROPERTY_HEAP_FULL; + } + else + { + strncpy(node->key, key, keyLen); + node->key[keyLen] = 0; + } + if (value == NULL) + { + node->value = NULL; + } + else + { + node->value = (char *)malloc_mt(valLen + 1); + if (value == NULL) + { + free_mt(node->key); + free_mt(node); + return RET_PROPERTY_HEAP_FULL; + } + else + { + strncpy(node->value, value, valLen); + node->value[valLen] = 0; + } + } + + for (ptr = p->cache; ptr != NULL; ptr = ptr->next) + if ((strcmp(store, ptr->store) == 0) && ((((id == NULL) || (*id == 0)) && ((ptr->id == NULL) || (*ptr->id == 0))) || ((id != NULL) && (ptr->id != NULL) && (strcmp(id, ptr->id) == 0)))) + break; + if (ptr == NULL) + { + ptr = (prop_cache *)malloc_mt(sizeof(prop_cache)); + if (ptr != NULL) + { + BOOL mallocErr = FALSE; + ptr->store = NULL; + ptr->id = NULL; + if ((id != NULL) && (*id != 0)) + { + INT32U idLen = strlen(id); + ptr->id = (char *)malloc_mt(idLen + 1); + if (ptr->id == NULL) + { + mallocErr = TRUE; + } + else + { + strncpy(ptr->id, id, idLen); + ptr->id[idLen] = 0; + } + } + if (!mallocErr) + { + INT32U storeLen = strlen(store); + ptr->store = (char *)malloc_mt(storeLen + 1); + if (ptr->store == NULL) + { + mallocErr = TRUE; + } + else + { + strncpy(ptr->store, store, storeLen); + ptr->store[storeLen] = 0; + } + } + if (mallocErr) + { + if (ptr->store != NULL) + free_mt(ptr->store); + if (ptr->id != NULL) + free_mt(ptr->id); + free_mt(ptr); + ptr = NULL; + } + else + { + ptr->sbt = &sbt_nil; + ptr->next = p->cache; + p->cache = ptr; + } + } + } + if (ptr == NULL) + { + free_mt(node->key); + if (node->value != NULL) + free_mt(node->value); + free_mt(node); + return RET_PROPERTY_HEAP_FULL; + } + SBT_Insert(&ptr->sbt, node); + return RET_EXT_NO_ERROR; +} + +static INT32U CacheInvalid(property_provider *p, const char *store, const char *id, BOOL tryLocal, const char *key) +{ + prop_cache *ptr; + sbt_node *node; + + if ((p == NULL) || (store == NULL) || (*store == 0) || (key == NULL) || (*key == 0)) + return RET_OS_INVALID_PARAM; + + for (ptr = p->cache; ptr != NULL; ptr = ptr->next) + if ((strcmp(store, ptr->store) == 0) && ((((id == NULL) || (*id == 0)) && ((ptr->id == NULL) || (*ptr->id == 0))) || ((id != NULL) && (ptr->id != NULL) && (strcmp(id, ptr->id) == 0)))) + break; + if (ptr == NULL) + return RET_EXT_NO_ERROR; + + node = SBT_Search(ptr->sbt, tryLocal, key); + if (node != NULL) + node->valid = FALSE; + + return RET_EXT_NO_ERROR; +} + +// store == NULL鏃舵竻闄ゅ叏閮╟ache +// store != NULL && id == NULL鏃舵竻闄tore鐩稿叧鐨勫叏閮╟ache +// store != NULL && id != NULL鏃舵竻闄(store, id)鐨刢ache +static INT32U CacheClear(property_provider *p, const char *store, const char *id) +{ + if (p == NULL) + return NULL; + if ((store == NULL) || (*store == 0)) + { + prop_cache *ptr; + for (ptr = p->cache; ptr != NULL;) + { + prop_cache *tmp = ptr; + ptr = ptr->next; + free_mt(tmp->store); + if (tmp->id != NULL) + free_mt(tmp->id); + SBT_Delete(tmp->sbt); + free_mt(tmp); + } + p->cache = NULL; + } + else if ((id == NULL) || (*id == 0)) + { + prop_cache *ptr; + prop_cache *tail = NULL; + for (ptr = p->cache; ptr != NULL;) + { + if (strcmp(store, ptr->store) == 0) + { + prop_cache *tmp = ptr; + if (ptr == p->cache) + p->cache = ptr->next; + else + tail->next = ptr->next; + ptr = ptr->next; + free_mt(tmp->store); + if (tmp->id != NULL) + free_mt(tmp->id); + SBT_Delete(tmp->sbt); + free_mt(tmp); + } + else + { + tail = ptr; + ptr = ptr->next; + } + } + } + else + { + prop_cache *ptr; + prop_cache *tail = NULL; + for (ptr = p->cache; ptr != NULL; tail = ptr, ptr = ptr->next) + if ((strcmp(store, ptr->store) == 0) && ((ptr->id != NULL) && (strcmp(id, ptr->id) == 0))) + break; + if (ptr != NULL) + { + if (ptr == p->cache) + p->cache = ptr->next; + else + tail->next = ptr->next; + free_mt(ptr->store); + if (ptr->id != NULL) + free_mt(ptr->id); + SBT_Delete(ptr->sbt); + free_mt(ptr); + } + } + return RET_EXT_NO_ERROR; +} + +static void CheckInit(void) +{ + static INT8U init = 0; + prop_lock(); + if (init == 0) + { + INT8U i; + for (i = 0; i < PROPERTY_PROVIDER_MAX; i++) + { + pp[i].flag.init = 0; + pp[i].flag.initPending = 0; + pp[i].flag.cache = 0; + pp[i].id = NULL; + pp[i].get = NULL; + pp[i].set = NULL; + pp[i].clear = NULL; + pp[i].cache = NULL; + pp[i].obj = NULL; + } + init = 1; + } + prop_unlock(); +} + +// key瑙勫垯妫鏌 +static INT32U CheckKey(const char *key) +{ + if ((key == NULL) || (*key == '\0')) + return RET_OS_INVALID_PARAM; + if (((key[0] >= 'a') && (key[0] <= 'z')) || ((key[0] >= 'A') && (key[0] <= 'Z'))) + { + INT32U i; + for (i = 1; key[i] != '\0'; i++) + { + if (((key[i] >= 'a') && (key[i] <= 'z')) || ((key[i] >= 'A') && (key[i] <= 'Z')) || ((key[i] >= '0') && (key[i] <= '9')) || (key[i] == '-') || (key[i] == '_') || (key[i] == '.') || (key[i] == '[') || (key[i] == ']')) + continue; + return RET_PROPERTY_INVALID_KEY; + } + } + else + { + return RET_PROPERTY_INVALID_KEY; + } + // printf("key name is ok\n"); + return RET_EXT_NO_ERROR; +} +// TODO: +INT32U PropertyInit(INT32U providerId, const PropertyInitParam *param) +{ + INT32U ret = RET_EXT_NO_ERROR; + BOOL doInit = FALSE; + CheckInit(); + if ((providerId >= PROPERTY_PROVIDER_MAX) || (param == NULL) || ((param->id != NULL) && (strlen(param->id) > PROPERTY_ID_MAX))) + return RET_OS_INVALID_PARAM; +#if 0 // 杩欐浠g爜娌″繀瑕佸瓨鍦 CheckInit()鈥斺>pp[providerId].flag.initPending=0 + for (;;) + { + BOOL quit = FALSE; + prop_lock(); + if (pp[providerId].flag.initPending == 0) + { + if (pp[providerId].flag.init == 0) + { + doInit = TRUE; + pp[providerId].flag.initPending = 1; + } + quit = TRUE; + } + prop_unlock(); + if (quit) + break; + prop_wait(1000); + } +#else // 鐩存帴鍚姩鍒濆鍖 + doInit = TRUE; +#endif + if (doInit) + { + char *id = NULL; + if ((ret == RET_EXT_NO_ERROR) && (param->id != NULL) && (*param->id != 0)) + { + INT32U idLen = strlen(param->id); + id = (char *)malloc_mt(idLen + 1); + if (id == NULL) + { + ret = RET_PROPERTY_HEAP_FULL; + } + else + { + strncpy(id, param->id, idLen); + id[idLen] = 0; + } + } + if (ret == RET_EXT_NO_ERROR) + { + pp[providerId].id = id; + if (param->type == PropertyTypeFS) + { +#if ((defined PROPERTY_PROV_FS_EN) && (PROPERTY_PROV_FS_EN != 0)) + // 閿佸垵濮嬪寲 + prop_lock_init(); + + ret = FilePropertyInit(providerId, param); +#else + ret = RET_OS_NOT_IMPLEMENT; +#endif + } + else if (param->type == PropertyTypeRemote) + { +#if ((defined PROPERTY_PROV_REMOTE_EN) && (PROPERTY_PROV_REMOTE_EN != 0)) +#if (defined RTOS_UCOS) + pp[providerId].sem = OSSemCreate(1); + if (pp[providerId].sem == NULL) + { + ret = RET_OS_NO_AVAILABLE_EVENT_CTRL_BLK; + } + else + { +#endif + ret = RemotePropertyInit(providerId, param); +#if (defined RTOS_UCOS) + if (ret != RET_EXT_NO_ERROR) + { + INT8U osErr = OS_ERR_NONE; + OSSemDel(pp[providerId].sem, OS_DEL_ALWAYS, &osErr); + pp[providerId].sem = NULL; + } + } +#endif +#else + ret = RET_OS_NOT_IMPLEMENT; +#endif + } + else + { + ret = RET_OS_INVALID_PARAM; + } + } + if (ret != RET_EXT_NO_ERROR) + { + if (id != NULL) + free_mt(id); + pp[providerId].id = NULL; + } + pp[providerId].flag.initPending = 0; + } + // PROP_ENABLE_IRQ(); + return ret; +} + +INT32U GetProperty(INT32U providerId, const char *store, const char *id, const char *key, BOOL tryLocal, char *value, INT32U sizeOfValue, BOOL *isLocal) +{ + INT32U ret = RET_EXT_NO_ERROR; + sbt_node *node = NULL; + if ((providerId >= PROPERTY_PROVIDER_MAX) || (store == NULL) || (*store == 0) || (key == NULL) || (*key == 0) || (value == NULL) || (sizeOfValue == 0)) + return RET_OS_INVALID_PARAM; + // 妫鏌ey鍛藉悕瑙勮寖 + ret = CheckKey(key); + if (ret != RET_EXT_NO_ERROR) + return ret; + // 妫鏌ユ槸鍚nit + CheckInit(); + if (pp[providerId].flag.init == 0) + return RET_PROPERTY_NOT_INIT; + if (pp[providerId].get == NULL) + return RET_PROPERTY_NOT_INIT; + if ((id == NULL) || (*id == 0)) + id = pp[providerId].id; + if (tryLocal && ((id == NULL) || (*id == 0))) + return RET_PROPERTY_INVALID_STORE_ID; + // 鍔犻攣 + prop_lock(); + if (pp[providerId].flag.cache) + node = CacheGet(&pp[providerId], store, id, tryLocal, key); + if (node == NULL) + { + BOOL lt = TRUE; + ret = pp[providerId].get(store, key, (tryLocal ? id : NULL), value, sizeOfValue, <, pp[providerId].obj); + + if (pp[providerId].flag.cache) + { + if (ret == RET_EXT_NO_ERROR) + CacheSet(&pp[providerId], store, id, tryLocal, key, value, lt); + else if (ret == RET_PROPERTY_NOT_FOUND) + CacheSet(&pp[providerId], store, id, tryLocal, key, NULL, lt); + } + if (isLocal != NULL) + *isLocal = lt; + } + else if (node->value == NULL) + { + ret = RET_PROPERTY_NOT_FOUND; + } + else + { + INT32U valLen = strlen(node->value); + if (valLen > sizeOfValue - 1) + { + valLen = sizeOfValue - 1; + ret = RET_PROPERTY_OUT_OF_VAL_BUF; + } + strncpy(value, node->value, valLen); + value[valLen] = 0; + if (isLocal != NULL) + *isLocal = node->isLocal; + } + prop_unlock(); + return ret; +} + +INT32U SetProperty(INT32U providerId, const char *store, const char *id, const char *key, const char *value) +{ + PropertyItem item; + if ((providerId >= PROPERTY_PROVIDER_MAX) || (store == NULL) || (*store == 0) || (key == NULL) || (*key == 0)) + return RET_OS_INVALID_PARAM; + CheckInit(); + if (pp[providerId].flag.init == 0) + return RET_PROPERTY_NOT_INIT; + item.key = key; + if (value == NULL) + { + item.type = VT_NULL; + item.value.str = NULL; + } + else + { + item.type = VT_STR; + item.value.str = value; + } + item.success = 0; + return SetPropertyList(providerId, store, id, &item, 1); +} + +INT32U SetPropertyList(INT32U providerId, const char *store, const char *id, PropertyItem *list, INT32U count) +{ + INT32U ret = RET_EXT_NO_ERROR; + property_string_item *bufList; + char *stringList; + BOOL fpChked = FALSE; + INT32U idx; + + if (providerId >= PROPERTY_PROVIDER_MAX) + return RET_OS_INVALID_PARAM; + CheckInit(); + if (pp[providerId].flag.init == 0) + return RET_PROPERTY_NOT_INIT; + if (pp[providerId].set == NULL) + return RET_PROPERTY_NOT_INIT; + if ((id == NULL) || (*id == 0)) + id = pp[providerId].id; + if ((id == NULL) || (*id == 0)) + return RET_PROPERTY_INVALID_STORE_ID; + + if (count == 0) + return RET_EXT_NO_ERROR; + + bufList = (property_string_item *)malloc_mt(sizeof(property_string_item) * count); + stringList = ((bufList == NULL) ? NULL : (char *)malloc_mt((FLOAT_STRING_LEN + 1) * count)); + if ((bufList == NULL) || (stringList == NULL)) + { + if (bufList != NULL) + free_mt(bufList); + if (stringList != NULL) + free_mt(stringList); + return RET_PROPERTY_HEAP_FULL; + } + + memset(stringList, 0, ((FLOAT_STRING_LEN + 1) * count)); + for (idx = 0; idx < count; idx++) + { + ret = CheckKey(list[idx].key); + if (ret != RET_EXT_NO_ERROR) + break; + bufList[idx].key = list[idx].key; + switch (list[idx].type) + { + case VT_NULL: + bufList[idx].value = NULL; + break; + case VT_I4: + bufList[idx].value = &stringList[(FLOAT_STRING_LEN + 1) * idx]; + snprintf(&stringList[(FLOAT_STRING_LEN + 1) * idx], FLOAT_STRING_LEN, "%d", list[idx].value.i4); + break; + case VT_I2: + bufList[idx].value = &stringList[(FLOAT_STRING_LEN + 1) * idx]; + snprintf(&stringList[(FLOAT_STRING_LEN + 1) * idx], FLOAT_STRING_LEN, "%d", list[idx].value.i2); + break; + case VT_I1: + bufList[idx].value = &stringList[(FLOAT_STRING_LEN + 1) * idx]; + snprintf(&stringList[(FLOAT_STRING_LEN + 1) * idx], FLOAT_STRING_LEN, "%d", list[idx].value.i1); + break; + case VT_UI4: + bufList[idx].value = &stringList[(FLOAT_STRING_LEN + 1) * idx]; + snprintf(&stringList[(FLOAT_STRING_LEN + 1) * idx], FLOAT_STRING_LEN, "0x%08x", list[idx].value.ui4); + break; + case VT_UI2: + bufList[idx].value = &stringList[(FLOAT_STRING_LEN + 1) * idx]; + snprintf(&stringList[(FLOAT_STRING_LEN + 1) * idx], FLOAT_STRING_LEN, "0x%08x", list[idx].value.ui2); + break; + case VT_UI1: + bufList[idx].value = &stringList[(FLOAT_STRING_LEN + 1) * idx]; + snprintf(&stringList[(FLOAT_STRING_LEN + 1) * idx], FLOAT_STRING_LEN, "0x%08x", list[idx].value.ui1); + break; + case VT_R4: + if (!fpChked) + { + char str[10]; + snprintf(str, sizeof(str), "%e", PI); + if (strncmp(str, "3.14159", strlen("3.14159")) == 0) + fpChked = TRUE; + else + ret = RET_OS_FLOAT_TEST_FAILED; + } + if (ret == RET_EXT_NO_ERROR) + { + bufList[idx].value = &stringList[(FLOAT_STRING_LEN + 1) * idx]; + snprintf(&stringList[(FLOAT_STRING_LEN + 1) * idx], FLOAT_STRING_LEN, "%e", ((isfinite(list[idx].value.r4) || isinf(list[idx].value.r4)) ? list[idx].value.r4 : NAN)); + } + break; + case VT_STR: + bufList[idx].value = list[idx].value.str; + break; + case VT_BIT4: + bufList[idx].value = &stringList[(FLOAT_STRING_LEN + 1) * idx]; + snprintf(&stringList[(FLOAT_STRING_LEN + 1) * idx], FLOAT_STRING_LEN, "0x%08x", ((GetUnsigned(providerId, store, list[idx].key, TRUE, 0, NULL, NULL) & (~list[idx].value.bit4.mask)) | (list[idx].value.bit4.val & list[idx].value.bit4.mask))); + break; + } + if (ret != RET_EXT_NO_ERROR) + break; + bufList[idx].success = 0; + } + prop_lock(); + if (ret == RET_EXT_NO_ERROR) + { + + if (ret == RET_EXT_NO_ERROR) + ret = pp[providerId].set(store, id, bufList, count, pp[providerId].obj); + if (ret == RET_EXT_NO_ERROR) + { + for (idx = 0; idx < count; idx++) + { + if ((bufList[idx].value == NULL) || (CacheSet(&pp[providerId], store, id, TRUE, bufList[idx].key, bufList[idx].value, TRUE) != RET_EXT_NO_ERROR)) + CacheInvalid(&pp[providerId], store, id, TRUE, bufList[idx].key); + } + } + } + prop_unlock(); + free_mt(bufList); + free_mt(stringList); + return ret; +} + +INT32S GetInteger(INT32U providerId, const char *store, const char *key, BOOL tryLocal, INT32S defaultValue, INT32U *retCode, BOOL *isLocal) +{ + char result[PROPERTY_LINE_MAX + 1]; + INT32U ret = GetProperty(providerId, store, NULL, key, tryLocal, result, sizeof(result), isLocal); + INT32S val = 0; + if (ret == RET_EXT_NO_ERROR) + { + char *endptr = NULL; + val = strtol(result, &endptr, 0); + if (endptr == result) + { + ret = RET_PROPERTY_EFORMAT; + } + else + { + for (; ((*endptr == ' ') || (*endptr == '\t')); endptr++) + ; + if (*endptr != 0) + ret = RET_PROPERTY_EFORMAT; + else if ((errno == ERANGE) && ((val == LONG_MIN) || (val == LONG_MAX))) + ret = RET_PROPERTY_ERANGE; + } + } + if (ret != RET_EXT_NO_ERROR) + val = defaultValue; + if (retCode != NULL) + *retCode = ret; + return val; +} + +INT32U GetUnsigned(INT32U providerId, const char *store, const char *key, BOOL tryLocal, INT32U defaultValue, INT32U *retCode, BOOL *isLocal) +{ + char result[PROPERTY_LINE_MAX + 1]; + INT32U ret = GetProperty(providerId, store, NULL, key, tryLocal, result, sizeof(result), isLocal); + INT32U val = 0; + if (ret == RET_EXT_NO_ERROR) + { + char *endptr = NULL; + val = strtoul(result, &endptr, 0); + if (endptr == result) + { + ret = RET_PROPERTY_EFORMAT; + } + else + { + for (; ((*endptr == ' ') || (*endptr == '\t')); endptr++) + ; + if (*endptr != 0) + ret = RET_PROPERTY_EFORMAT; + else if ((errno == ERANGE) && (val == ULONG_MAX)) + ret = RET_PROPERTY_ERANGE; + } + } + if (ret != RET_EXT_NO_ERROR) + val = defaultValue; + if (retCode != NULL) + *retCode = ret; + return val; +} + +FP32 GetFloat(INT32U providerId, const char *store, const char *key, BOOL tryLocal, FP32 defaultValue, INT32U *retCode, BOOL *isLocal) +{ + char result[PROPERTY_LINE_MAX + 1]; + INT32U ret = GetProperty(providerId, store, NULL, key, tryLocal, result, sizeof(result), isLocal); + FP32 val = FP_ZERO; + if (ret == RET_EXT_NO_ERROR) + { + char *endptr = NULL; + val = strtof(result, &endptr); + if (!isfinite(val) && !isinf(val)) + { + ret = RET_PROPERTY_EFORMAT; + } + else if (endptr == result) + { + ret = RET_PROPERTY_EFORMAT; + } + else + { + for (; ((*endptr == ' ') || (*endptr == '\t')); endptr++) + ; + if (*endptr != 0) + ret = RET_PROPERTY_EFORMAT; + else if ((errno == ERANGE) && isinf(val)) + ret = RET_PROPERTY_ERANGE; + } + } + if (ret != RET_EXT_NO_ERROR) + val = defaultValue; + if (retCode != NULL) + *retCode = ret; + return val; +} + +BOOL GetBoolean(INT32U providerId, const char *store, const char *key, BOOL tryLocal, BOOL defaultValue, INT32U *retCode, BOOL *isLocal) +{ + INT32U i; + char result[PROPERTY_LINE_MAX + 1]; + INT32U ret = GetProperty(providerId, store, NULL, key, tryLocal, result, sizeof(result), isLocal); + BOOL val = defaultValue; + if (ret == RET_EXT_NO_ERROR) + { + for (i = 0; ((i < sizeof(result)) && (result[i] != '\0')); i++) + if ((result[i] >= 'A') && (result[i] <= 'Z')) + result[i] += ('a' - 'A'); + if ((strcmp("true", result) == 0) || (strcmp("yes", result) == 0) || (strcmp("1", result) == 0)) + { + val = TRUE; + } + else if ((strcmp("false", result) == 0) || (strcmp("no", result) == 0) || (strcmp("0", result) == 0)) + { + val = FALSE; + } + else + { + ret = RET_PROPERTY_EFORMAT; + } + } + if (ret != RET_EXT_NO_ERROR) + val = defaultValue; + if (retCode != NULL) + *retCode = ret; + return val; +} + +INT32U SetInteger(INT32U providerId, const char *store, const char *key, INT32S value) +{ + PropertyItem item; + if ((providerId >= PROPERTY_PROVIDER_MAX) || (store == NULL) || (*store == 0) || (key == NULL) || (*key == 0)) + return RET_OS_INVALID_PARAM; + CheckInit(); + if (pp[providerId].flag.init == 0) + return RET_PROPERTY_NOT_INIT; + item.key = key; + item.type = VT_I4; + item.value.i4 = value; + item.success = 0; + return SetPropertyList(providerId, store, NULL, &item, 1); +} + +INT32U SetUnsigned(INT32U providerId, const char *store, const char *key, INT32U value) +{ + PropertyItem item; + if ((providerId >= PROPERTY_PROVIDER_MAX) || (store == NULL) || (*store == 0) || (key == NULL) || (*key == 0)) + return RET_OS_INVALID_PARAM; + CheckInit(); + if (pp[providerId].flag.init == 0) + return RET_PROPERTY_NOT_INIT; + item.key = key; + item.type = VT_UI4; + item.value.ui4 = value; + item.success = 0; + return SetPropertyList(providerId, store, NULL, &item, 1); +} + +INT32U SetFloat(INT32U providerId, const char *store, const char *key, FP32 value) +{ + PropertyItem item; + if ((providerId >= PROPERTY_PROVIDER_MAX) || (store == NULL) || (*store == 0) || (key == NULL) || (*key == 0)) + return RET_OS_INVALID_PARAM; + CheckInit(); + if (pp[providerId].flag.init == 0) + return RET_PROPERTY_NOT_INIT; + item.key = key; + item.type = VT_R4; + item.value.r4 = value; + item.success = 0; + return SetPropertyList(providerId, store, NULL, &item, 1); +} + +INT32U SetBits(INT32U providerId, const char *store, const char *key, INT32U value, INT32U mask) +{ + PropertyItem item; + if ((providerId >= PROPERTY_PROVIDER_MAX) || (store == NULL) || (*store == 0) || (key == NULL) || (*key == 0)) + return RET_OS_INVALID_PARAM; + CheckInit(); + if (pp[providerId].flag.init == 0) + return RET_PROPERTY_NOT_INIT; + if (mask == 0) + return RET_EXT_NO_ERROR; + item.key = key; + item.type = VT_BIT4; + item.value.bit4.val = value; + item.value.bit4.mask = mask; + item.success = 0; + return SetPropertyList(providerId, store, NULL, &item, 1); +} + +INT32U ClearPropertyCache(INT32U providerId, const char *store, const char *id) +{ + INT32U ret = RET_EXT_NO_ERROR; + if (providerId >= PROPERTY_PROVIDER_MAX) + return RET_OS_INVALID_PARAM; + CheckInit(); + if (pp[providerId].flag.init == 0) + return RET_PROPERTY_NOT_INIT; + if (pp[providerId].clear == NULL) + return RET_EXT_NO_ERROR; + if ((id == NULL) || (*id == 0)) + id = pp[providerId].id; + if ((id == NULL) || (*id == 0)) + id = NULL; + + prop_lock(); + + CacheClear(&pp[providerId], store, id); + ret = pp[providerId].clear(store, id, pp[providerId].obj); + + prop_unlock(); + return ret; +} + +INT32U SetPropertyTestCase(INT32U caseId) +{ + if (caseId == 1) + file_test_random = 1; // 闅忔満鏁拌涓洪潪0琛ㄧず鍚敤娴嬭瘯, 涔熷彲浠ヨ鎴愬叾浠栭潪0鍊, 璇ュ煎湪娴嬭瘯杩囩▼涓細琚殢鏈烘洿鏂 + else + file_test_random = 0; // 闅忔満鏁拌涓0琛ㄧず绂佺敤娴嬭瘯, 涓嶄細鍐嶈鏇存柊 + return RET_EXT_NO_ERROR; +} + +// INT32U VerifyPropertyCache(INT32U providerId) { +// INT32U ret = RET_EXT_NO_ERROR; +// prop_cache* ptr; +// #if (defined RTOS_UCOS) +// INT8U osErr = OS_ERR_NONE; +// #endif +// +// if (providerId >= PROPERTY_PROVIDER_MAX) +// return RET_OS_INVALID_PARAM; +// CheckInit(); +// if (pp[providerId].flag.init == 0) +// return RET_PROPERTY_NOT_INIT; +// +// #if (defined RTOS_UCOS) +// OSSemPend(pp[providerId].sem, OSmsToTick(1000UL), &osErr); +// if (osErr != OS_ERR_NONE) +// return RET_OS_SYNC_OBJ_FAILED; +// #elif ((defined TARGET_LPC11XX) || (defined TARGET_STM32F1)) +// PROP_DISABLE_IRQ(); +// if (pp[providerId].flag.lock != 0) +// ret = RET_OS_SYNC_OBJ_FAILED; +// else +// pp[providerId].flag.lock = 1; +// PROP_ENABLE_IRQ(); +// if (ret != RET_EXT_NO_ERROR) +// return ret; +// #else +// #error "Target error" +// #endif +// +// for (ptr = pp[providerId].cache; ptr != NULL; ptr = ptr->next) { +// if (((INT32U)ptr < 0xa0000000) || ((INT32U)ptr >= 0xa0800000)) { +// ret = RET_OS_HEAP_CORRUPTED; +// break; +// } +// ret = SBT_Check(ptr->sbt); +// if (ret != RET_EXT_NO_ERROR) +// break; +// } +// +// PROP_UNLOCK(pp[providerId]); +// +// return ret; +//} + +#if ((defined PROPERTY_PROV_FS_EN) && (PROPERTY_PROV_FS_EN != 0)) + +/************************************************************** + * File property provider + ************************************************************* + */ + +typedef struct _fileprop_cache +{ + char *key; + char *value; + INT32U size; + struct _fileprop_cache *next; +} fileprop_cache; + +typedef struct _file_cache +{ + BOOL allCache; + char *store; + char *id; + fileprop_cache *cache; + struct _file_cache *next; +} file_cache; + +typedef struct +{ +#if (!defined RTOS_UCOS) && ((defined TARGET_LPC11XX) || (defined TARGET_STM32F1)) + struct + { + INT8U lock : 1; + } flag; +#endif + struct + { + INT8U cache : 1; + INT8U prefetch : 1; + } config; +#if (defined RTOS_UCOS) + OS_EVENT *sem; +#endif + file_cache *cache; + struct + { + INT32U flag; +#if 1 + FILE *fil; + FILE *tmp; +#endif + } stream; +} file_provider; + +#define STREAM_FLAG_FOPEN (1UL << 0) + +static INT32U FileCacheGet(file_cache **head, const char *store, const char *id, const char *key, char *value, INT32U size, BOOL *isNull) +{ + file_cache *fc; + fileprop_cache *pc; + for (fc = *head; fc != NULL; fc = fc->next) + { + if ((strcmp(store, fc->store) == 0) && ((((id == NULL) || (*id == 0)) && ((fc->id == NULL) || (*fc->id == 0))) || ((id != NULL) && (fc->id != NULL) && (strcmp(id, fc->id) == 0)))) + break; + } + if (fc == NULL) + return RET_PROPERTY_NOT_FOUND; + *isNull = TRUE; + for (pc = fc->cache; pc != NULL; pc = pc->next) + { + if (strcmp(key, pc->key) == 0) + { + INT32U ret = RET_EXT_NO_ERROR; + if (pc->value != NULL) + { + INT32U cpLen = pc->size; + if (cpLen > size - 1) + { + cpLen = size - 1; + ret = RET_PROPERTY_OUT_OF_VAL_BUF; + } + *isNull = FALSE; + strncpy(value, pc->value, cpLen); + value[cpLen] = 0; + } + return ret; + } + } + if (fc->allCache) + return RET_EXT_NO_ERROR; + return RET_PROPERTY_NOT_FOUND; +} + +static INT32U FileCacheTouch(file_cache **head, const char *store, const char *id, BOOL allCache, file_cache **found) +{ + INT32U ret = RET_EXT_NO_ERROR; + file_cache *fc; + for (fc = *head; fc != NULL; fc = fc->next) + { + if ((strcmp(store, fc->store) == 0) && ((((id == NULL) || (*id == 0)) && ((fc->id == NULL) || (*fc->id == 0))) || ((id != NULL) && (fc->id != NULL) && (strcmp(id, fc->id) == 0)))) + break; + } + if (fc == NULL) + { + BOOL fail = FALSE; + fc = (file_cache *)malloc_mt(sizeof(file_cache)); + if (fc == NULL) + fail = TRUE; + else + memset(fc, 0, sizeof(file_cache)); + if (!fail) + { + INT32U lenStore = strlen(store); + fc->store = (char *)malloc_mt(lenStore + 1); + if (fc->store == NULL) + { + fail = TRUE; + } + else + { + strncpy(fc->store, store, lenStore); + fc->store[lenStore] = 0; + } + } + if (!fail && (id != NULL) && (*id != 0)) + { + INT32U lenId = strlen(id); + fc->id = (char *)malloc_mt(lenId + 1); + if (fc->id == NULL) + { + fail = TRUE; + } + else + { + strncpy(fc->id, id, lenId); + fc->id[lenId] = 0; + } + } + if (fail) + { + if (fc != NULL) + { + if (fc->store != NULL) + free_mt(fc->store); + if (fc->id != NULL) + free_mt(fc->id); + free_mt(fc); + fc = NULL; + } + ret = RET_PROPERTY_HEAP_FULL; + } + else + { + fc->allCache = allCache; + fc->next = *head; + *head = fc; + } + } + if (found != NULL) + *found = fc; + return ret; +} + +static INT32U FileCacheSet(file_cache **head, const char *store, const char *id, const char *key, const char *value, BOOL allCache) +{ + INT32U ret = RET_EXT_NO_ERROR; + file_cache *fc = NULL; + ret = FileCacheTouch(head, store, id, allCache, &fc); + if ((ret == RET_EXT_NO_ERROR) && (fc != NULL)) + { + fileprop_cache *pc; + fileprop_cache *ptail = NULL; + for (pc = fc->cache; pc != NULL; ptail = pc, pc = pc->next) + { + if (strcmp(key, pc->key) == 0) + break; + } + if (pc == NULL) + { + BOOL fail = FALSE; + pc = (fileprop_cache *)malloc_mt(sizeof(fileprop_cache)); + if (pc == NULL) + fail = TRUE; + else + memset(pc, 0, sizeof(fileprop_cache)); + if (!fail) + { + INT32U keyLen = strlen(key); + pc->key = (char *)malloc_mt(keyLen + 1); + if (pc->key == NULL) + { + fail = TRUE; + } + else + { + strncpy(pc->key, key, keyLen); + pc->key[keyLen] = 0; + } + } + if (!fail && (value != NULL)) + { + pc->size = strlen(value); + pc->value = (char *)malloc_mt(pc->size + 1); + if (pc->value == NULL) + { + fail = TRUE; + } + else + { + strncpy(pc->value, value, pc->size); + pc->value[pc->size] = 0; + } + } + if (fail) + { + if (pc != NULL) + { + if (pc->key != NULL) + free_mt(pc->key); + if (pc->value != NULL) + free_mt(pc->value); + free_mt(pc); + pc = NULL; + } + fc->allCache = FALSE; + ret = RET_PROPERTY_HEAP_FULL; + } + else + { + pc->next = fc->cache; + fc->cache = pc; + } + } + else + { + BOOL alloc = FALSE; + if (value == NULL) + { + free_mt(pc->key); + if (pc->value != NULL) + free_mt(pc->value); + if (pc == fc->cache) + fc->cache = pc->next; + else + ptail->next = pc->next; + free_mt(pc); + } + else if (pc->value == NULL) + { + alloc = TRUE; + } + else if (pc->size >= strlen(value)) + { + strncpy(pc->value, value, strlen(value)); + } + else + { + if (pc->value != NULL) + free_mt(pc->value); + pc->value = NULL; + pc->size = 0; + alloc = TRUE; + } + if (alloc) + { + pc->size = strlen(value); + pc->value = (char *)malloc_mt(pc->size + 1); + if (pc->value == NULL) + { + free_mt(pc->key); + if (pc == fc->cache) + fc->cache = pc->next; + else + ptail->next = pc->next; + free_mt(pc); + fc->allCache = FALSE; + ret = RET_PROPERTY_HEAP_FULL; + } + else + { + strncpy(pc->value, value, pc->size); + pc->value[pc->size] = 0; + } + } + } + } + return ret; +} + +static INT32U FileCacheClearLinkList(fileprop_cache *ptr) +{ + for (; ptr != NULL;) + { + fileprop_cache *tmp = ptr; + ptr = ptr->next; + free_mt(tmp->key); + if (tmp->value != NULL) + free_mt(tmp->value); + free_mt(tmp); + } + return RET_EXT_NO_ERROR; +} + +static INT32U FileCacheClear(file_cache **head, const char *store, const char *id) +{ + file_cache *fc; + if ((store == NULL) || (*store == 0)) + { + for (fc = *head; fc != NULL;) + { + file_cache *tmp = fc; + fc = fc->next; + FileCacheClearLinkList(tmp->cache); + free_mt(tmp->store); + if (tmp->id != NULL) + free_mt(tmp->id); + free_mt(tmp); + } + *head = NULL; + } + else if ((id == NULL) || (*id == 0)) + { + file_cache *ftail = NULL; + for (fc = *head; fc != NULL;) + { + if (strcmp(store, fc->store) == 0) + { + file_cache *del = fc; + FileCacheClearLinkList(fc->cache); + free_mt(fc->store); + if (fc->id != NULL) + free_mt(fc->id); + if (fc == *head) + *head = fc->next; + else + ftail->next = fc->next; + fc = fc->next; + free_mt(del); + } + else + { + ftail = fc; + fc = fc->next; + } + } + } + else + { + file_cache *ftail = NULL; + for (fc = *head; fc != NULL; ftail = fc, fc = fc->next) + { + if ((strcmp(store, fc->store) == 0) && ((fc->id != NULL) && (strcmp(id, fc->id) == 0))) + break; + } + if (fc != NULL) + { + FileCacheClearLinkList(fc->cache); + free_mt(fc->store); + if (fc->id != NULL) + free_mt(fc->id); + if (fc == *head) + *head = fc->next; + else + ftail->next = fc->next; + free_mt(fc); + } + } + return RET_EXT_NO_ERROR; +} + +static INT32U INT32U2err(INT32U fres) +{ +#if 0 + switch (fres) + { + case FR_OK: + return RET_EXT_NO_ERROR; + case FR_DISK_ERR: + return RET_FILE_FR_DISK_ERR; + case FR_INT_ERR: + return RET_FILE_FR_INT_ERR; + case FR_NOT_READY: + return RET_FILE_FR_NOT_READY; + case FR_NO_FILE: + return RET_FILE_FR_NO_FILE; + case FR_NO_PATH: + return RET_FILE_FR_NO_PATH; + case FR_INVALID_NAME: + return RET_FILE_FR_INVALID_NAME; + case FR_DENIED: + return RET_FILE_FR_DENIED; + case FR_EXIST: + return RET_FILE_FR_EXIST; + case FR_INVALID_OBJECT: + return RET_FILE_FR_INVALID_OBJECT; + case FR_WRITE_PROTECTED: + return RET_FILE_FR_WRITE_PROTECTED; + case FR_INVALID_DRIVE: + return RET_FILE_FR_INVALID_DRIVE; + case FR_NOT_ENABLED: + return RET_FILE_FR_NOT_ENABLED; + case FR_NO_FILESYSTEM: + return RET_FILE_FR_NO_FILESYSTEM; + case FR_MKFS_ABORTED: + return RET_FILE_FR_MKFS_ABORTED; + case FR_TIMEOUT: + return RET_FILE_FR_TIMEOUT; + // case FR_LOCKED: + // return RET_FILE_FR_LOCKED; + // case FR_NOT_ENOUGH_CORE: + // return RET_FILE_FR_NOT_ENOUGH_CORE; + // case FR_TOO_MANY_OPEN_FILES: + // return RET_FILE_FR_TOO_MANY_OPEN_FILES; + // case FR_INVALID_PARAMETER: + // return RET_FILE_FR_INVALID_PARAMETER; + } + return RET_FILE_UNKNOWN; +#else + return 0; +#endif +} + +static void FILE_TEST_RANDOM(INT8U max) +{ + if ((file_test_random > 0) && (max > 0)) + { + file_test_random = (rand() % max) + 1; + printf("[TEST] file_test_random = %d", file_test_random); + } +} + +static void FILE_TEST_RESET(INT8U num) +{ +#if 0 + if (file_test_random == num) + { + printf("[TEST] swReset() called. file_test_random = %d", file_test_random); + swReset(); + } +#endif +} + +static INT32U f_copy(const char *src, const char *dest) +{ +#if 0 + FIL filSrc, filDest; + INT32U fres; + BYTE *buf; + INT32U ret = RET_EXT_NO_ERROR; + fres = f_open(&filSrc, src, FA_OPEN_EXISTING | FA_READ); + if (fres != FR_OK) + return INT32U2err(fres); + fres = f_open(&filDest, dest, FA_CREATE_ALWAYS | FA_WRITE); + if (fres != FR_OK) + { + f_close(&filSrc); + return INT32U2err(fres); + } + buf = malloc_mt(COPY_BUF_SIZE); + if (buf == NULL) + { + f_close(&filSrc); + f_close(&filDest); + return RET_OS_HEAP_FULL; + } + for (;;) + { + INT32U rsize, wsize; + fres = f_read(&filSrc, buf, COPY_BUF_SIZE, &rsize); + if (fres != FR_OK) + { + ret = INT32U2err(fres); + break; + } + if (rsize == 0) + break; + fres = f_write(&filDest, buf, rsize, &wsize); + if (rsize != wsize) + { + ret = RET_FILE_DISK_FULL; + break; + } + if (fres != FR_OK) + { + ret = INT32U2err(fres); + break; + } + } + free_mt(buf); + f_close(&filSrc); + f_close(&filDest); + return ret; +#else + return 0; +#endif +} + +static INT32U PropWriteLogClear(INT32U providerId) +{ +#if 0 + INT32U fres; + char logname[PROPERTY_STORE_MAX + PROPERTY_ID_MAX + 16]; + snprintf(logname, sizeof(logname), UPDATE_LOG, providerId); + fres = f_unlink(logname); + if ((fres != FR_OK) && (fres != FR_NO_FILE) && (fres != FR_NO_PATH)) + return RET_PROPERTY_FILE_WRITE_ERR; + return RET_EXT_NO_ERROR; +#else + return 0; +#endif +} + +static INT32U PropWriteLogWrite(INT32U providerId, const char *path) +{ +#if 0 + FIL fil; + INT32U fres; + char logname[PROPERTY_STORE_MAX + PROPERTY_ID_MAX + 16]; + INT32U wsize; + if (path == NULL) + return RET_OS_INVALID_PARAM; + snprintf(logname, sizeof(logname), UPDATE_LOG, providerId); + fres = f_open(&fil, logname, FA_CREATE_ALWAYS | FA_WRITE); + if (fres != FR_OK) + return INT32U2err(fres); + fres = f_write(&fil, path, strlen(path), &wsize); + f_close(&fil); + if ((fres == FR_OK) && (wsize != strlen(path))) + return RET_FILE_DISK_FULL; + return INT32U2err(fres); +#else + return 0; +#endif +} + +static INT32U PropWriteLogLoad(INT32U providerId, char *path, INT32U size) +{ +#if 0 + FIL fil; + INT32U fres; + INT32U rsize = 0; + INT32U i; + char logname[PROPERTY_STORE_MAX + PROPERTY_ID_MAX + 16]; + if (path == NULL || size == 0) + return RET_OS_INVALID_PARAM; + path[0] = '\0'; + snprintf(logname, sizeof(logname), UPDATE_LOG, providerId); + fres = f_open(&fil, logname, FA_OPEN_EXISTING | FA_READ); + if ((fres == FR_NO_FILE) || (fres == FR_NO_PATH)) + return RET_EXT_NO_ERROR; + if (fres != FR_OK) + return INT32U2err(fres); + fres = f_read(&fil, path, size, &rsize); + f_close(&fil); + if (rsize == size) + path[size - 1] = '\0'; + for (i = 0; path[i] != '\0'; i++) + if (path[i] == '\r' || path[i] == '\n') + { + path[i] = '\0'; + break; + } + if (fres == FR_OK) + { + char filetmp[PROPERTY_STORE_MAX + PROPERTY_ID_MAX + 16]; + snprintf(filetmp, sizeof(filetmp), "%s.tmp", path); + fres = f_open(&fil, filetmp, FA_OPEN_EXISTING | FA_READ); + f_close(&fil); + if ((fres == FR_NO_FILE) || (fres == FR_NO_PATH)) + { + fres = FR_OK; + path[0] = '\0'; + } + } + if (fres != FR_OK) + path[0] = '\0'; + return INT32U2err(fres); +#else + return 0; +#endif +} + +static INT32U PropWriteLogCommit(INT32U providerId, const char *filename) +{ +#if 0 + INT32U ret = RET_EXT_NO_ERROR; + INT32U fres; + char filetmp[PROPERTY_STORE_MAX + PROPERTY_ID_MAX + 16]; + snprintf(filetmp, sizeof(filetmp), "%s.tmp", filename); + FILE_TEST_RESET(1); + fres = f_unlink(filename); + if ((fres != FR_OK) && (fres != FR_NO_FILE) && (fres != FR_NO_PATH)) + ret = RET_PROPERTY_FILE_WRITE_ERR; + FILE_TEST_RESET(2); + if (ret == RET_EXT_NO_ERROR) + ret = f_copy(filetmp, filename); + FILE_TEST_RESET(3); + if (ret == RET_EXT_NO_ERROR) + ret = PropWriteLogClear(providerId); + FILE_TEST_RESET(4); + if (ret == RET_EXT_NO_ERROR) + { + INT32U fres = f_unlink(filetmp); + if ((fres != FR_OK) && (fres != FR_NO_FILE) && (fres != FR_NO_PATH)) + ret = RET_PROPERTY_FILE_WRITE_ERR; + } + FILE_TEST_RESET(5); + return ret; +#else + return 0; +#endif +} + +#if (((defined DISTRIBUTION) || (PROPERTY_CHECKSUM_ENABLED != 0)) && (PROPERTY_CHECKSUM_DISABLED == 0)) +static void FormatSHA1sum(char *buf, INT32U lenOfBuf, INT8U *sig, INT32U lenOfSig) +{ + INT8U i = 0; + for (i = 0; i < lenOfSig; i++) + snprintf(&buf[i << 1], (lenOfBuf - (i << 1)), "%02x", sig[i]); + buf[lenOfBuf - 1] = '\0'; +} +#endif +// TODO:鍚敤sha鏍¢獙 +static INT32U FileStreamChecksum(const char *filename) +{ +#if (((defined DISTRIBUTION) || (PROPERTY_CHECKSUM_ENABLED != 0)) && (PROPERTY_CHECKSUM_DISABLED == 0)) + FIL fil; + INT8U buf[128]; + INT8U hash[32]; + char sigStr[sizeof(hash) * 2 + 1]; + char sigName[PROPERTY_STORE_MAX + 20]; + sha2_context ctx; + INT32U fres; + INT32U br; + INT32U ret = RET_EXT_NO_ERROR; + if ((filename == NULL) || (*filename == 0)) + return RET_EXT_NO_ERROR; + fres = f_open(&fil, filename, FA_OPEN_EXISTING | FA_READ); + if ((fres == FR_NO_FILE) || (fres == FR_NO_PATH)) + return RET_EXT_NO_ERROR; + if (fres != FR_OK) + return RET_PROPERTY_INVALID_SIGNATURE; // RET_PROPERTY_FILE_OPEN_ERR + sha2_starts(&ctx, 0); + // TODO: 鍔犲叆鍏朵粬淇℃伅鏍¢獙淇℃伅 + for (;;) + { + if (f_read(&fil, buf, sizeof(buf), &br) != FR_OK) + { + ret = RET_PROPERTY_INVALID_SIGNATURE; // RET_PROPERTY_FILE_READ_ERR + break; + } + if (br == 0) + break; + // TODO: 鍔犲叆鍔犲瘑绠楁硶 + sha2_update(&ctx, buf, br); + } + f_close(&fil); + sha2_finish(&ctx, hash); + if (ret != RET_EXT_NO_ERROR) + return ret; + snprintf(sigName, sizeof(sigName), "%s.sig", filename); + fres = f_open(&fil, sigName, FA_OPEN_EXISTING | FA_READ); + if (fres != FR_OK) + return RET_PROPERTY_INVALID_SIGNATURE; + if ((f_read(&fil, sigStr, (sizeof(hash) * 2), &br) != FR_OK) || (br != (sizeof(hash) * 2))) + ret = RET_PROPERTY_INVALID_SIGNATURE; + f_close(&fil); + sigStr[sizeof(hash) * 2] = '\0'; + if (ret == RET_EXT_NO_ERROR) + { + char hashStr[sizeof(hash) * 2 + 1]; + FormatSHA1sum(hashStr, sizeof(hashStr), hash, sizeof(hash)); + if (strcmp(hashStr, sigStr) != 0) + ret = RET_PROPERTY_INVALID_SIGNATURE; + } + return ret; +#else + return RET_EXT_NO_ERROR; +#endif +} + +static INT32U FileStreamOpen(const char *filename, file_provider *fp) +{ +#if 0 + INT32U ret = RET_EXT_NO_ERROR; + INT32U fres; + if ((filename == NULL) || (*filename == 0) || (fp == NULL)) + return RET_OS_INVALID_PARAM; + fp->stream.flag = 0; + fres = f_open(&fp->stream.fil, filename, FA_OPEN_EXISTING | FA_READ); + if (fres == FR_OK) + { + fp->stream.flag |= STREAM_FLAG_FOPEN; + } + else if ((fres != FR_NO_FILE) && (fres != FR_NO_PATH)) + { + ret = RET_PROPERTY_FILE_OPEN_ERR; + } + return ret; +#else + INT32U ret = RET_EXT_NO_ERROR; + INT32U fres; + if ((filename == NULL) || (*filename == 0) || (fp == NULL)) + return RET_OS_INVALID_PARAM; + fp->stream.flag = 0; + fp->stream.fil = fopen(filename, "r"); + // printf("file name : %s\n",filename); + if (fp->stream.fil != NULL) + { + // printf("file read ok \n"); + // 璇诲彇鍒版枃浠朵簡 + fp->stream.flag |= STREAM_FLAG_FOPEN; + } + else + { + ret = RET_PROPERTY_FILE_OPEN_ERR; + } + return ret; +#endif +} + +static INT32U FileStreamClose(file_provider *fp) +{ +#if 0 + if (fp == NULL) + return RET_OS_INVALID_PARAM; + if ((fp->stream.flag & STREAM_FLAG_FOPEN) != 0) + f_close(&fp->stream.fil); + fp->stream.flag = 0; + return RET_EXT_NO_ERROR; +#else + // 鎸囬拡妫鏌 + if (fp == NULL) + return RET_OS_INVALID_PARAM; + // 鍏抽棴鏂囦欢 + if ((fp->stream.flag & STREAM_FLAG_FOPEN) != 0) + fclose(fp->stream.fil); + fp->stream.fil = NULL; + fp->stream.flag = 0; + + return 0; +#endif +} + +static INT32U FileStreamGet(char *ch, file_provider *fp) +{ +#if 0 + if ((ch == NULL) || (fp == NULL)) + return RET_OS_INVALID_PARAM; + if ((fp->stream.flag & STREAM_FLAG_FOPEN) == 0) + { + *ch = 0; + } + else + { + INT32U br; + if (f_read(&fp->stream.fil, ch, 1, &br) != FR_OK) + return RET_PROPERTY_FILE_READ_ERR; + if (br == 0) + *ch = 0; + } + return RET_EXT_NO_ERROR; +#else + // 鎸囬拡妫鏌 + if ((ch == NULL) || (fp == NULL)) + return RET_OS_INVALID_PARAM; + // 妫鏌ヤ笅鏂囦欢鏄惁鎵撳紑 + if ((fp->stream.flag & STREAM_FLAG_FOPEN) == 0) + { + // ch = 0 鐨勮瘽锛屽悗缁▼搴忎細鐩存帴閫鍑 + *ch = 0; + } + else + { + *ch = fgetc(fp->stream.fil); + // 妫鏌ユ槸鏄惁璇诲彇閿欒 + if (ferror(fp->stream.fil) != 0) + { + *ch = 0; + } + } + return 0; +#endif +} + +static INT32U FileStreamParseLine(BOOL *eof, BOOL *valid, char *lineBuffer, INT32U bufferSize, INT32U *keyIndex, INT32U *keyLen, INT32U *valIndex, INT32U *valLen, file_provider *fp) +{ +#if 0 + static const INT8U PARSE_STATE_NEW = 0; + static const INT8U PARSE_STATE_SKIP = 1; + static const INT8U PARSE_STATE_KEY_READING = 2; + static const INT8U PARSE_STATE_KEY_FINISHED = 3; + static const INT8U PARSE_STATE_STRING_TRIM = 4; + static const INT8U PARSE_STATE_STRING_READING = 5; + + INT8U state = PARSE_STATE_NEW; + INT32U ptr = 0; + BOOL stop = FALSE; + + if ((eof == NULL) || (valid == NULL) || (lineBuffer == NULL) || (bufferSize == 0) || (keyIndex == NULL) || (keyLen == NULL) || (valIndex == NULL) || (valLen == NULL) || (fp == NULL)) + return RET_OS_INVALID_PARAM; + + *valid = FALSE; + for (; !stop;) + { + char ch = 0; + INT32U ret = FileStreamGet(&ch, fp); + if (ret != RET_EXT_NO_ERROR) + return ret; + if (ch != 0) + { + if (ptr < bufferSize - 1) + { + lineBuffer[ptr++] = ch; + } + else + { + if (((ch == '\r') || (ch == '\n')) && (ptr == bufferSize - 1)) + lineBuffer[ptr - 1] = ch; + state = PARSE_STATE_SKIP; + *valid = FALSE; + } + } + switch (state) + { + case PARSE_STATE_NEW: + if ((ch >= 'a' && ch <= 'z') || (ch >= 'A' && ch <= 'Z')) + { + *keyIndex = ptr - 1; + state = PARSE_STATE_KEY_READING; + } + else if (ch == ' ' || ch == '\t') + { + // do nothing + } + else if (ch == '\r' || ch == '\n' || ch == 0) + { + *eof = (ch == 0); + stop = TRUE; + } + else + { + state = PARSE_STATE_SKIP; + } + break; + case PARSE_STATE_KEY_READING: + if ((ch >= 'a' && ch <= 'z') || (ch >= 'A' && ch <= 'Z') || (ch >= '0' && ch <= '9') || (ch == '.') || (ch == '-') || (ch == '_') || (ch == '[') || (ch == ']')) + { + } + else if (ch == '=') + { + *keyLen = ptr - *keyIndex - 1; + state = PARSE_STATE_STRING_TRIM; + } + else if (ch == ' ' || ch == '\t') + { + *keyLen = ptr - *keyIndex - 1; + state = PARSE_STATE_KEY_FINISHED; + } + else if (ch == '\r' || ch == '\n' || ch == 0) + { + *eof = (ch == 0); + stop = TRUE; + } + else + { + state = PARSE_STATE_SKIP; + } + break; + case PARSE_STATE_KEY_FINISHED: + if (ch == '=') + { + state = PARSE_STATE_STRING_TRIM; + } + else if (ch == '\r' || ch == '\n' || ch == 0) + { + *eof = (ch == 0); + stop = TRUE; + } + else if (ch != ' ' && ch != '\t') + { + state = PARSE_STATE_SKIP; + } + break; + case PARSE_STATE_STRING_TRIM: + if (ch == '\r' || ch == '\n' || ch == 0) + { + *valIndex = ptr - 1; + *valLen = 0; + *valid = TRUE; + *eof = (ch == 0); + stop = TRUE; + } + else if (ch != ' ' && ch != '\t') + { + *valIndex = ptr - 1; + *valLen = 1; + *valid = TRUE; + state = PARSE_STATE_STRING_READING; + } + break; + case PARSE_STATE_STRING_READING: + if (ch == '\r' || ch == '\n' || ch == 0) + { + *eof = (ch == 0); + stop = TRUE; + } + else if ((ch != ' ') && (ch != '\t')) + { + *valLen = ptr - *valIndex; + } + break; + case PARSE_STATE_SKIP: + default: + if (ch == '\r' || ch == '\n' || ch == 0) + { + *eof = (ch == 0); + stop = TRUE; + } + // state = PARSE_STATE_SKIP; + break; + } + } + lineBuffer[ptr] = 0; + return RET_EXT_NO_ERROR; +#else +#define PARSE_STATE_NEW 0 +#define PARSE_STATE_SKIP 1 +#define PARSE_STATE_KEY_READING 2 +#define PARSE_STATE_KEY_FINISHED 3 +#define PARSE_STATE_STRING_TRIM 4 +#define PARSE_STATE_STRING_READING 5 + + INT8U state = PARSE_STATE_NEW; + INT32U ptr = 0; + BOOL stop = FALSE; + + if ((eof == NULL) || (valid == NULL) || (lineBuffer == NULL) || (bufferSize == 0) || (keyIndex == NULL) || (keyLen == NULL) || (valIndex == NULL) || (valLen == NULL) || (fp == NULL)) + return RET_OS_INVALID_PARAM; + + *valid = FALSE; + for (; !stop;) + { + char ch = 0; + INT32U ret = FileStreamGet(&ch, fp); + if (ret != RET_EXT_NO_ERROR) + return ret; + if (ch != 0) + { + if (ptr < bufferSize - 1) + { + lineBuffer[ptr++] = ch; + } + else + { + if (((ch == '\r') || (ch == '\n')) && (ptr == bufferSize - 1)) + lineBuffer[ptr - 1] = ch; + state = PARSE_STATE_SKIP; + *valid = FALSE; + } + } + switch (state) + { + case PARSE_STATE_NEW: + if ((ch >= 'a' && ch <= 'z') || (ch >= 'A' && ch <= 'Z')) + { + *keyIndex = ptr - 1; + state = PARSE_STATE_KEY_READING; + } + else if (ch == ' ' || ch == '\t') + { + // do nothing + } + else if (ch == '\r' || ch == '\n' || ch == 0) + { + *eof = (ch == 0); + stop = TRUE; + } + else + { + state = PARSE_STATE_SKIP; + } + break; + case PARSE_STATE_KEY_READING: + if ((ch >= 'a' && ch <= 'z') || (ch >= 'A' && ch <= 'Z') || (ch >= '0' && ch <= '9') || (ch == '.') || (ch == '-') || (ch == '_') || (ch == '[') || (ch == ']')) + { + } + else if (ch == '=') + { + *keyLen = ptr - *keyIndex - 1; + state = PARSE_STATE_STRING_TRIM; + } + else if (ch == ' ' || ch == '\t') + { + *keyLen = ptr - *keyIndex - 1; + state = PARSE_STATE_KEY_FINISHED; + } + else if (ch == '\r' || ch == '\n' || ch == 0) + { + *eof = (ch == 0); + stop = TRUE; + } + else + { + state = PARSE_STATE_SKIP; + } + break; + case PARSE_STATE_KEY_FINISHED: + if (ch == '=') + { + state = PARSE_STATE_STRING_TRIM; + } + else if (ch == '\r' || ch == '\n' || ch == 0) + { + *eof = (ch == 0); + stop = TRUE; + } + else if (ch != ' ' && ch != '\t') + { + state = PARSE_STATE_SKIP; + } + break; + case PARSE_STATE_STRING_TRIM: + if (ch == '\r' || ch == '\n' || ch == 0) + { + *valIndex = ptr - 1; + *valLen = 0; + *valid = TRUE; + *eof = (ch == 0); + stop = TRUE; + } + else if (ch != ' ' && ch != '\t') + { + *valIndex = ptr - 1; + *valLen = 1; + *valid = TRUE; + state = PARSE_STATE_STRING_READING; + } + break; + case PARSE_STATE_STRING_READING: + if (ch == '\r' || ch == '\n' || ch == 0) + { + *eof = (ch == 0); + stop = TRUE; + } + else if ((ch != ' ') && (ch != '\t')) + { + *valLen = ptr - *valIndex; + } + break; + case PARSE_STATE_SKIP: + default: + if (ch == '\r' || ch == '\n' || ch == 0) + { + *eof = (ch == 0); + stop = TRUE; + } + // state = PARSE_STATE_SKIP; + break; + } + } + lineBuffer[ptr] = 0; + +#undef PARSE_STATE_NEW +#undef PARSE_STATE_SKIP +#undef PARSE_STATE_KEY_READING +#undef PARSE_STATE_KEY_FINISHED +#undef PARSE_STATE_STRING_TRIM +#undef PARSE_STATE_STRING_READING + return RET_EXT_NO_ERROR; +#endif +} + +static INT32U FileStreamPropertyGet(const char *store, const char *id, const char *key, char *value, INT32U size, BOOL *isNull, file_provider *fp) +{ +#if 0 + char filename[PROPERTY_STORE_MAX + PROPERTY_ID_MAX + 16]; + char buffer[PROPERTY_LINE_MAX + 2]; + INT32U ret = RET_EXT_NO_ERROR; +#if (defined RTOS_UCOS) + INT8U osRet = OS_ERR_NONE; +#endif + + if ((store == NULL) || (*store == 0) || (key == NULL) || (*key == 0) || (fp == NULL) || (isNull == NULL)) + return RET_OS_INVALID_PARAM; + + if ((id == NULL) || (*id == 0)) + snprintf(filename, sizeof(filename), "0:/conf/%s.conf", store); + else + snprintf(filename, sizeof(filename), "0:/conf/%s.%s.conf", store, id); + +#if (defined RTOS_UCOS) + OSSemPend(fp->sem, OSmsToTick(1000UL), &osRet); + if (osRet != OS_ERR_NONE) + return RET_OS_SYNC_OBJ_FAILED; +#elif ((defined TARGET_LPC11XX) || (defined TARGET_STM32F1)) + PROP_DISABLE_IRQ(); + if (pp[providerId].flag.lock != 0) + ret = RET_OS_SYNC_OBJ_FAILED; + else + pp[providerId].flag.lock = 1; + PROP_ENABLE_IRQ(); + if (ret != RET_EXT_NO_ERROR) + return ret; +#else +#error "Target error" +#endif + + ret = FileCacheGet(&fp->cache, store, id, key, value, size, isNull); + if ((ret != RET_EXT_NO_ERROR) && (ret != RET_PROPERTY_OUT_OF_VAL_BUF)) + { + *isNull = TRUE; + if ((id == NULL) || (*id == 0)) // global config file, checksum is required. + ret = FileStreamChecksum(filename); + else + ret = RET_EXT_NO_ERROR; + if (ret == RET_EXT_NO_ERROR) + ret = FileStreamOpen(filename, fp); + if (ret == RET_EXT_NO_ERROR) + { + for (;;) + { + BOOL eof = FALSE; + BOOL valid = FALSE; + INT32U keyIndex = 0; + INT32U keyLen = 0; + INT32U valIndex = 0; + INT32U valLen = 0; + ret = FileStreamParseLine(&eof, &valid, buffer, sizeof(buffer), &keyIndex, &keyLen, &valIndex, &valLen, fp); + if (ret != RET_EXT_NO_ERROR) + break; + if (valid) + { + BOOL match = FALSE; + if ((keyLen == strlen(key)) && (strncmp(&buffer[keyIndex], key, keyLen) == 0)) + { + if (valLen > size - 1) + { + valLen = size - 1; + ret = RET_PROPERTY_OUT_OF_VAL_BUF; + } + *isNull = FALSE; + strncpy(value, &buffer[valIndex], valLen); + value[valLen] = 0; + match = TRUE; + } + if (fp->config.cache && (match || fp->config.prefetch)) + { + buffer[keyIndex + keyLen] = 0; + buffer[valIndex + valLen] = 0; + FileCacheSet(&fp->cache, store, id, &buffer[keyIndex], &buffer[valIndex], fp->config.prefetch); + } + if (match && !fp->config.prefetch) + break; + } + if (eof) + break; + } + if ((ret == RET_EXT_NO_ERROR) && fp->config.prefetch) + { + file_cache *cache = NULL; + FileCacheTouch(&fp->cache, store, id, TRUE, &cache); + if (cache != NULL) + cache->allCache = TRUE; + } + } + FileStreamClose(fp); + } + PROP_UNLOCK(*fp); + return ret; +#else + char filename[PROPERTY_STORE_MAX + PROPERTY_ID_MAX + 16]; + char buffer[PROPERTY_LINE_MAX + 2]; + INT32U ret = RET_EXT_NO_ERROR; + if ((store == NULL) || (*store == 0) || (key == NULL) || (*key == 0) || (fp == NULL) || (isNull == NULL)) + return RET_OS_INVALID_PARAM; + + if ((id == NULL) || (*id == 0)) + snprintf(filename, sizeof(filename), "%s/%s.conf", config_path, store); + + ret = FileCacheGet(&fp->cache, store, id, key, value, size, isNull); + if ((ret != RET_EXT_NO_ERROR) && (ret != RET_PROPERTY_OUT_OF_VAL_BUF)) + { + *isNull = TRUE; +// TODO: +#if 0 + if ((id == NULL) || (*id == 0)) // global config file, checksum is required. + ret = FileStreamChecksum(filename); + + else + ret = RET_EXT_NO_ERROR; +#else + ret = RET_EXT_NO_ERROR; +#endif + + if (ret == RET_EXT_NO_ERROR) + { + // 鎵撳紑鏂囦欢 + ret = FileStreamOpen(filename, fp); + // printf("ret = %d\n", ret); + } + + if (ret == RET_EXT_NO_ERROR) + { +#if 0 +//閫昏緫閲嶅啓 + for (;;) + { + BOOL eof = FALSE; + BOOL valid = FALSE; + INT32U keyIndex = 0; + INT32U keyLen = 0; + INT32U valIndex = 0; + INT32U valLen = 0; + // 璇诲彇鍗曟潯 + ret = FileStreamParseLine(&eof, &valid, buffer, sizeof(buffer), &keyIndex, &keyLen, &valIndex, &valLen, fp); + if (ret != RET_EXT_NO_ERROR) + break; + if (valid) + { + BOOL match = FALSE; + if ((keyLen == strlen(key)) && (strncmp(&buffer[keyIndex], key, keyLen) == 0)) + { + if (valLen > size - 1) + { + valLen = size - 1; + ret = RET_PROPERTY_OUT_OF_VAL_BUF; + } + *isNull = FALSE; + strncpy(value, &buffer[valIndex], valLen); + value[valLen] = 0; + match = TRUE; + } + if (fp->config.cache && (match || fp->config.prefetch)) + { + buffer[keyIndex + keyLen] = 0; + buffer[valIndex + valLen] = 0; + FileCacheSet(&fp->cache, store, id, &buffer[keyIndex], &buffer[valIndex], fp->config.prefetch); + } + if (match && !fp->config.prefetch) + break; + } + if (eof) + break; + } +#else + while (1) + { + char temp[100]; + void *result = fgets(temp, sizeof(temp), fp->stream.fil); + if (result != NULL) + { + // printf("%s\n", temp); + // 鎼滅储鍒版甯哥殑澶撮儴 + if ((temp[0] >= 'a' && temp[0] <= 'z') || (temp[0] >= 'A' && temp[0] <= 'Z')) + { + // 姣斿key鐨勬儏鍐碉紝key蹇呴』椤舵牸鍐 + int i = 0; + int result = 1; + while (key[i] != '\0') + { + if (temp[i] != key[i]) + { + result = 0; + break; + } + if (temp[i] == '=') + { + result = 0; + break; + } + i++; + } + // 闃插畧閰嶇疆鏂囦欢閲岄潰鐨刱ey鏇撮暱锛屼絾鏄悗闈笉鐩哥鐨勬儏鍐 + if (temp[i] != '=') + { + result = 0; + } + //鎴柇瀛楃涓 + temp[i] = '\0'; + // printf("result : %d ; key = %s ; serch = %s\n", result, key, temp); + // 鎵惧埌鐩爣 + if (result == 1) + { + // 灏嗗兼嫹璐濆嚭鍘 + *isNull = FALSE; + i++; + int j = 0; + while (1) + { + + value[j] = temp[i]; + j++; + i++; + if (temp[i] == ' ' || temp[i] == '\r' || temp[i] == '\t' || temp[i] == '\n') + { + break; + } + if (j >= (size - 1)) + { + // 缁欑殑缂撳瓨澶皬浜嗭紝鎶ヤ釜閿 + return RET_PROPERTY_OUT_OF_VAL_BUF; + } + } + value[j] = '\0'; + printf("get value = %s\n", value); + // 璁剧疆chache + if (fp->config.cache && (fp->config.prefetch)) + { + FileCacheSet(&fp->cache, store, id, temp, value, fp->config.prefetch); + } + } + } + // 璇存槑璇诲埌灏鹃儴浜 + if (feof(fp->stream.fil) == 1) + { + // printf("file end\n"); + break; + } + } + else + { + // 璇诲彇澶辫触锛岄鍑哄惊鐜 + // printf("file read error\n"); + break; + } + } +#endif + if ((ret == RET_EXT_NO_ERROR) && fp->config.prefetch) + { + file_cache *cache = NULL; + FileCacheTouch(&fp->cache, store, id, TRUE, &cache); + if (cache != NULL) + cache->allCache = TRUE; + } + } + FileStreamClose(fp); + } + return ret; +#endif +} + +static INT32U FileStreamPropertySet(const char *store, const char *id, property_string_item *list, INT32U count, file_provider *fp) +{ +#if 0 + char filename[PROPERTY_STORE_MAX + PROPERTY_ID_MAX + 16]; + char filetmp[PROPERTY_STORE_MAX + PROPERTY_ID_MAX + 20]; + char buffer[PROPERTY_LINE_MAX + 2]; + INT32U ret = RET_EXT_NO_ERROR; +#if (defined RTOS_UCOS) + INT8U osRet = OS_ERR_NONE; +#endif + BOOL newLine = FALSE; + BOOL changed = FALSE; + INT32U idx; + + if ((store == NULL) || (*store == 0) || (list == NULL) || (count == 0) || (fp == NULL)) + return RET_OS_INVALID_PARAM; + if ((id == NULL) || (*id == 0)) + return RET_PROPERTY_INVALID_STORE_ID; + for (idx = 0; idx < count; idx++) + { + if ((list[idx].key == NULL) || (*list[idx].key == 0)) + return RET_OS_INVALID_PARAM; + list[idx].success = 0; + } + + snprintf(filename, sizeof(filename), "%s/%s.%s.conf", config_path, store, id); + snprintf(filetmp, sizeof(filetmp), "%s/%s.%s.conf.tmp", config_path, store, id); + FILE_TEST_RANDOM(8); + + if (f_open(&fp->stream.tmp, filetmp, FA_CREATE_ALWAYS | FA_WRITE) != FR_OK) + ret = RET_PROPERTY_FILE_OPEN_ERR; + + if (ret == RET_EXT_NO_ERROR) + { + ret = FileStreamOpen(filename, fp); + if (ret == RET_EXT_NO_ERROR) + { + for (;;) + { + BOOL skip = FALSE; + BOOL eof = FALSE; + BOOL valid = FALSE; + INT32U keyIndex = 0; + INT32U keyLen = 0; + INT32U valIndex = 0; + INT32U valLen = 0; + INT32U bw; + char lastCh; + ret = FileStreamParseLine(&eof, &valid, buffer, sizeof(buffer), &keyIndex, &keyLen, &valIndex, &valLen, fp); + if (ret != RET_EXT_NO_ERROR) + break; + bw = strlen(buffer); + lastCh = ((bw > 0) ? buffer[bw - 1] : '\0'); + if ((lastCh != '\r') && (lastCh != '\n') && (bw > 0)) + newLine = TRUE; + if (valid) + { + for (idx = 0; idx < count; idx++) + { + if (list[idx].success) + continue; + if ((keyLen != strlen(list[idx].key)) || (strncmp(&buffer[keyIndex], list[idx].key, keyLen) != 0)) + continue; + if (list[idx].value == NULL) + { + skip = TRUE; + } + else + { + if ((lastCh == '\r') || (lastCh == '\n')) + snprintf(buffer, sizeof(buffer), "%s=%s%c", list[idx].key, list[idx].value, lastCh); + else + snprintf(buffer, sizeof(buffer), "%s=%s", list[idx].key, list[idx].value); + bw = strlen(buffer); + } + if (fp->config.cache) + FileCacheSet(&fp->cache, store, id, list[idx].key, list[idx].value, FALSE); + list[idx].success = 1; + changed = TRUE; + break; + } + } + if (!skip) + { + if (f_write(&fp->stream.tmp, buffer, bw, &bw) != FR_OK) + { + ret = RET_PROPERTY_FILE_WRITE_ERR; + break; + } + } + if (eof) + break; + } + } + if (ret == RET_EXT_NO_ERROR) + { + for (idx = 0; idx < count; idx++) + { + INT32U bw; + if (list[idx].success) + continue; + if (list[idx].value == NULL) + { + list[idx].success = 1; + continue; + } + if (newLine) + { + newLine = FALSE; + bw = strlen("\r\n"); + if (f_write(&fp->stream.tmp, "\r\n", bw, &bw) != FR_OK) + { + ret = RET_PROPERTY_FILE_WRITE_ERR; + break; + } + } + snprintf(buffer, sizeof(buffer), "%s=%s\r\n", list[idx].key, list[idx].value); + bw = strlen(buffer); + if (f_write(&fp->stream.tmp, buffer, bw, &bw) != 0) + { + ret = RET_PROPERTY_FILE_WRITE_ERR; + break; + } + if (fp->config.cache) + FileCacheSet(&fp->cache, store, id, list[idx].key, list[idx].value, FALSE); + list[idx].success = 1; + changed = TRUE; + } + } + FileStreamClose(fp); + f_close(&fp->stream.tmp); + // a. 灏嗕慨鏀瑰悗鐨勯厤缃啓鍏*.conf.tmp + // b. 灏嗗瓧绗︿覆"*.conf"鍐欏叆update.log + // c. 鍒犻櫎*.conf + // d. 澶嶅埗*.conf.tmp-> *.conf + // e. 鍒犻櫎update.log + // f. 鍒犻櫎 *.conf.tmp + if (ret == RET_EXT_NO_ERROR) + ret = PropWriteLogWrite(0, filename); + if (ret == RET_EXT_NO_ERROR) + PropWriteLogCommit(0, filename); + } + if (changed && (ret != RET_EXT_NO_ERROR)) + FileCacheClear(&fp->cache, store, id); + + PROP_UNLOCK(*fp); + + if (ret != RET_EXT_NO_ERROR) + { + for (idx = 0; idx < count; idx++) + list[idx].success = 0; + } + + return ret; +#else + return 0; +#endif +} + +/** function comment + * @description: + * @param {char} *store + * @param {char} *key + * @param {char} *id 鐪嬩笂鍘绘病鏈夌敤,鐩存帴鐢ㄧ殑NULL + * @param {char} *value + * @param {INT32U} sizeOfValue + * @param {BOOL} *isLocal + * @param {void} *obj + * @return {*} + */ +static INT32U FilePropertyGet(const char *store, const char *key, const char *id, char *value, INT32U sizeOfValue, BOOL *isLocal, void *obj) +{ + BOOL isNull = TRUE; + INT32U ret = RET_PROPERTY_NOT_FOUND; + file_provider *fp = (file_provider *)obj; + if (fp == NULL) + return RET_OS_INVALID_PARAM; + if (isLocal != NULL) + *isLocal = FALSE; + // id鍦ㄥ疄闄呭簲鐢ㄤ腑娌℃湁鎵惧埌 + if ((id != NULL) && (*id != 0)) + { + ret = FileStreamPropertyGet(store, id, key, value, sizeOfValue, &isNull, fp); + if ((ret == RET_EXT_NO_ERROR) && isNull) + ret = RET_PROPERTY_NOT_FOUND; + if ((ret == RET_EXT_NO_ERROR) && (isLocal != NULL)) + *isLocal = TRUE; + } + + if (ret == RET_PROPERTY_NOT_FOUND) + { + ret = FileStreamPropertyGet(store, NULL, key, value, sizeOfValue, &isNull, fp); + if ((ret == RET_EXT_NO_ERROR) && isNull) + ret = RET_PROPERTY_NOT_FOUND; + } + return ret; +} + +static INT32U FilePropertySet(const char *store, const char *id, property_string_item *list, INT32U count, void *obj) +{ + + file_provider *fp = (file_provider *)obj; + if (fp == NULL) + return RET_OS_INVALID_PARAM; + if ((id != NULL) && (*id != 0)) + return FileStreamPropertySet(store, id, list, count, fp); + else + return RET_PROPERTY_INVALID_STORE_ID; +} + +static INT32U FilePropertyClear(const char *store, const char *id, void *obj) +{ + INT32U ret = RET_EXT_NO_ERROR; + + file_provider *fp = (file_provider *)obj; + + if (fp == NULL) + return RET_OS_INVALID_PARAM; + + if (!fp->config.cache) + return RET_EXT_NO_ERROR; + if ((id == NULL) || (*id == 0)) + id = NULL; + if (ret == RET_EXT_NO_ERROR) + ret = FileCacheClear(&fp->cache, store, id); + + return ret; +} + +static INT32U FilePropertyInit(INT32U providerId, const PropertyInitParam *param) +{ + INT32U ret = RET_EXT_NO_ERROR; + file_provider *fp = NULL; + if (ret == RET_EXT_NO_ERROR) + { + fp = (file_provider *)malloc_mt(sizeof(file_provider)); + if (fp == NULL) + ret = RET_PROPERTY_HEAP_FULL; + } + if (ret == RET_EXT_NO_ERROR) + { + char storename[PROPERTY_STORE_MAX + PROPERTY_ID_MAX + 16]; + INT32U ret2 = RET_EXT_NO_ERROR; + memset(fp, 0, sizeof(file_provider)); + fp->config.cache = param->config.cache; + fp->config.prefetch = (param->config.cache && param->config.prefetch); + fp->cache = NULL; + pp[providerId].get = FilePropertyGet; + pp[providerId].set = FilePropertySet; + pp[providerId].clear = FilePropertyClear; + pp[providerId].obj = fp; + pp[providerId].flag.cache = param->config.cache; + pp[providerId].flag.init = 1; +#if 0 // 鎰忎箟涓嶆槑锛屾病鏈塻torename + ret2 = PropWriteLogLoad(providerId, storename, sizeof(storename)); + if ((ret2 == RET_EXT_NO_ERROR) && (storename[0] != '\0')) + { + printf("PropWriteLogCommit(providerId=%d, storename=%s)\n\r", providerId, storename); + PropWriteLogCommit(providerId, storename); + } +#endif + } + else + { + if (fp != NULL) + free_mt(fp); + } + return ret; +} + +#endif + +#if ((defined PROPERTY_PROV_REMOTE_EN) && (PROPERTY_PROV_REMOTE_EN != 0)) + +/************************************************************** + * Remote property provider + ************************************************************* + */ + +typedef struct +{ + INT32U destId; +} remote_provider; + +static INT32U RemotePropertyGet(const char *store, const char *key, const char *id, char *value, INT32U sizeOfValue, BOOL *isLocal, void *obj) +{ + INT8U outBuf[PROPERTY_LINE_MAX + sizeof(INT32U)]; + INT8U *inBuf; + INT8U *ptr; + INT32U sizeOfIn; + INT32U sizeOfOut; + INT32U ret = RET_EXT_NO_ERROR; + if ((store == NULL) || (*store == 0) || (key == NULL) || (*key == 0) || (value == NULL) || (obj == NULL)) + return RET_OS_INVALID_PARAM; + sizeOfIn = strlen(store) + strlen(key) + 3; + if (id != NULL) + sizeOfIn += strlen(id); + inBuf = (INT8U *)malloc_mt(sizeOfIn); + if (inBuf == NULL) + return RET_PROPERTY_HEAP_FULL; + ptr = inBuf; + memcpy(ptr, store, (strlen(store) + 1)); + ptr += (strlen(store) + 1); + if (id == NULL) + { + *ptr = 0; + ptr++; + } + else + { + memcpy(ptr, id, (strlen(id) + 1)); + ptr += (strlen(id) + 1); + } + memcpy(ptr, key, (strlen(key) + 1)); + sizeOfOut = (PROPERTY_LINE_MAX + sizeof(INT32U)); + ret = bus_host_execute(((remote_provider *)obj)->destId, 2, CMD_mgrGetProp, inBuf, sizeOfIn, outBuf, &sizeOfOut, NULL, NULL, NULL, NULL); + if (ret == RET_EXT_NO_ERROR) + { + if ((sizeOfOut > sizeof(INT32U)) && (outBuf[sizeOfOut - 1] == '\0')) + { + if (isLocal != NULL) + *isLocal = (((outBuf[0] & 0x01) == 0) ? FALSE : TRUE); + strncpy(value, (const char *)&outBuf[sizeof(INT32U)], sizeOfValue); + value[sizeOfValue - 1] = 0; + } + else + { + ret = RET_BUS_INVALID_RET_FORMAT; + } + } + free_mt(inBuf); + return ret; +} + +static INT32U RemotePropertySet(const char *store, const char *id, property_string_item *list, INT32U count, void *obj) +{ + INT32U i; + INT8U *inBuf; + INT8U *ptr; + INT32U sizeOfIn; + INT32U sizeOfOut = 0; + INT32U ret = RET_EXT_NO_ERROR; + if ((store == NULL) || (*store == 0) || (list == NULL) || (count == 0) || (obj == NULL)) + return RET_OS_INVALID_PARAM; + if (count > 0xff) + return RET_PROPERTY_SETP_LIST_EXCEED_MAX; + sizeOfIn = (strlen(store) + 2); + if ((id != NULL) && (*id != 0)) + sizeOfIn += strlen(id); + sizeOfIn += sizeof(INT8U); + for (i = 0; i < count; i++) + { + if ((list[i].key == NULL) || (*list[i].key == 0)) + return RET_OS_INVALID_PARAM; + sizeOfIn += sizeof(INT8U); + sizeOfIn += (strlen(list[i].key) + 2); + if ((list[i].value != NULL) && (*list[i].value != 0)) + sizeOfIn += strlen(list[i].value); + } + inBuf = (INT8U *)malloc_mt(sizeOfIn); + if (inBuf == NULL) + return RET_PROPERTY_HEAP_FULL; + ptr = inBuf; + memcpy(ptr, store, (strlen(store) + 1)); + ptr += (strlen(store) + 1); + if (id == NULL) + { + *ptr = 0; + ptr++; + } + else + { + memcpy(ptr, id, (strlen(id) + 1)); + ptr += (strlen(id) + 1); + } + *ptr = (count & 0xff); + ptr++; + for (i = 0; i < count; i++) + { + list[i].success = 0; + if (list[i].value == NULL) + *ptr = 0x01; // clear property + else + *ptr = 0x00; // set property + ptr++; + memcpy(ptr, list[i].key, (strlen(list[i].key) + 1)); + ptr += (strlen(list[i].key) + 1); + if (list[i].value == NULL) + { + *ptr = 0; + ptr++; + } + else + { + memcpy(ptr, list[i].value, (strlen(list[i].value) + 1)); + ptr += (strlen(list[i].value) + 1); + } + } + ret = bus_host_execute(((remote_provider *)obj)->destId, 2, CMD_mgrSetPropL, inBuf, sizeOfIn, NULL, &sizeOfOut, NULL, NULL, NULL, NULL); + if (ret == RET_EXT_NO_ERROR) + { + for (i = 0; i < count; i++) + list[i].success = 0; + } + free_mt(inBuf); + return ret; +} + +static INT32U RemotePropertyClear(const char *store, const char *id, void *obj) +{ + // RemotePropertyClear(), 杩滅缂撳瓨涓嶉渶瑕佸鎴风娓呴櫎, 鐢辫繙绔牴鎹疄闄呮儏鍐佃嚜琛屽喅瀹 + return RET_EXT_NO_ERROR; +} + +static INT32U RemotePropertyInit(INT32U providerId, const PropertyInitParam *param) +{ + INT32U ret = RET_EXT_NO_ERROR; + remote_provider *rp = (remote_provider *)malloc_mt(sizeof(remote_provider)); + if (rp == NULL) + ret = RET_PROPERTY_HEAP_FULL; + if (ret == RET_EXT_NO_ERROR) + { + memset(rp, 0, sizeof(remote_provider)); + rp->destId = param->destId; + pp[providerId].get = RemotePropertyGet; + pp[providerId].set = RemotePropertySet; + pp[providerId].clear = RemotePropertyClear; + pp[providerId].obj = rp; + pp[providerId].flag.cache = param->config.cache; + pp[providerId].flag.init = 1; + } + else + { + if (rp != NULL) + free_mt(rp); + } + return ret; +} + +#endif + +#if 1 +// store name +static char propStoreSystem[40] = "0x1820_system"; +static char propStorePanel[40] = "0x1820_0x0000_panel"; +static char propStoreTarget[40] = "0x1820_0x0000_target"; +static char propStorePipette[40] = "0x1820_0x0000_pipette"; +static char propStoreTip[40] = "0x1820_0x0000_tip"; +static char propStoreContainer[40] = "0x1820_0x0000_container"; +static char propStoreMotor[40] = "0x1820_0x0000_motor"; +static char propStoreDispense[40] = "0x1820_0x0000_dispense"; +static char propStoreDevMapping[40] = "0x1820_0x0000_dm"; +static char propStoreRoute[40] = "0x1820_0x0000_route"; +static char propStoreDiv[40] = "0x1820_0x0000_div"; +static char propStoreModule[40] = "0x1820_0x0000_module"; +static char propStoreWash[40] = "0x1820_0x0000_wash"; +static char propStoreRea[40] = "0x1820_0x0000_reagentplate"; +const char *GetStoreName(const char *store) +{ + if (store == NULL) + return NULL; + if (strcmp(store, "motor") == 0) + return propStoreMotor; + if (strcmp(store, "panel") == 0) + return propStorePanel; + if (strcmp(store, "target") == 0) + return propStoreTarget; + if (strcmp(store, "pipette") == 0) + return propStorePipette; + if (strcmp(store, "tip") == 0) + return propStoreTip; + if (strcmp(store, "container") == 0) + return propStoreContainer; + if (strcmp(store, "dispense") == 0) + return propStoreDispense; + if (strcmp(store, "module") == 0) + return propStoreModule; + if (strcmp(store, "dm") == 0) + return propStoreDevMapping; + if (strcmp(store, "route") == 0) + return propStoreRoute; + if (strcmp(store, "div") == 0) + return propStoreDiv; + if (strcmp(store, "system") == 0) + return propStoreSystem; + if (strcmp(store, "wash") == 0) + return propStoreWash; + return NULL; +} + +//unit test +int main(void) +{ + INT32U retCode = RET_EXT_NO_ERROR; + PropertyInitParam param; + param.config.cache = 1; + param.config.prefetch = 1; + param.id = 0; + param.type = PropertyTypeFS; + PropertyInit(0, ¶m); + INT32U ret = 0; + INT32U val = GetUnsigned(0, "0x1820_0x0000_container", "Container0.Bottom", 0, 0, &ret, NULL); + printf("%d,%d\n", val, ret); + val = GetUnsigned(0, "0x1820_0x0000_container", "Container0.Bottom", 0, 0, &ret, NULL); + printf("%d,%d\n", val, ret); +} + + + +#endif \ No newline at end of file diff --git a/property.exe b/property.exe new file mode 100644 index 0000000..64e6f8c Binary files /dev/null and b/property.exe differ diff --git a/property.h b/property.h new file mode 100644 index 0000000..dbeb76a --- /dev/null +++ b/property.h @@ -0,0 +1,145 @@ +#ifndef __PROFILE_H +#define __PROFILE_H + +#ifndef PROPERTY_PROVIDER_MAX +#define PROPERTY_PROVIDER_MAX 2 +#endif +#define PROPERTY_STORE_MAX 32 +#define PROPERTY_KEY_MAX 64 +#define PROPERTY_ID_MAX 24 +#define PROPERTY_LINE_MAX 80 + +#ifndef INT8U +#define BOOL unsigned char +#define INT8U unsigned char +#define INT8S char +#define INT16U unsigned short +#define INT16S short +#define INT32U unsigned int +#define INT32S int +#define INT64U unsigned long long +#define INT64S long long +#define FP32 float +#define FP64 double +#endif + +#if !defined(TRUE) +#define TRUE 1 +#define FALSE 0 +#endif // TRUE + +#if !defined(PI) +#define PI 3.14159 +#endif // PI + + +/* + config +*/ +#define PROPERTY_PROV_FS_EN 1 +#define PROPERTY_PROV_REMOTE_EN 0 + + + + +typedef enum { + VT_UI4 = 0, + VT_I4 = 1, + VT_UI2 = 2, + VT_I2 = 3, + VT_UI1 = 4, + VT_I1 = 5, + VT_R4 = 6, + VT_STR = 7, + VT_NULL = 8, + VT_BIT4 = 9 +} ValueType; + +typedef enum { + PropertyTypeFS = 1, + PropertyTypeRemote = 2 +} PropertyProviderType; + +typedef struct { + struct { + INT8U cache : 1; + INT8U prefetch : 1; + } config; + PropertyProviderType type; + const char* id; + INT32U destId; // use when PropertyTypeRemote +} PropertyInitParam; + +//灞炴ч櫎鏁 +typedef struct { + const char* key; + ValueType type; + union { + INT32S i4; + INT16S i2; + INT8S i1; + INT32U ui4; + INT16U ui2; + INT8U ui1; + FP32 r4; + const char* str; + struct { + INT32U val; + INT32U mask; + } bit4; + } value; + INT8U success : 1; +} PropertyItem; + +/* 鎼滅储寮曟搸鍒濆鍖 -- 浠ヤ笅鍑芥暟璋冪敤鍓嶅繀椤诲厛浠ユ鍑芥暟杩涜鍒濆鍖 +*/ +INT32U PropertyInit(INT32U providerId, const PropertyInitParam* param); + +/** + * key蹇呴』浠ュぇ鍐欐垨灏忓啓瀛楁瘝寮澶, 浠ュぇ鍐欐垨灏忓啓瀛楁瘝, 鏁板瓧, 鎴.-_[]绗﹀彿缁勬垚, key澶у皬鍐欐晱鎰 + */ +INT32U GetProperty(INT32U providerId, const char* store, const char* id, const char* key, BOOL tryLocal, char* value, INT32U sizeOfValue, BOOL* isLocal); +INT32U SetProperty(INT32U providerId, const char* store, const char* id, const char* key, const char* value); +INT32U SetPropertyList(INT32U providerId, const char* store, const char* id, PropertyItem* list, INT32U count); + +/* 鑾峰彇瀵瑰簲绫诲瀷鐨勫彉閲忓 +杈撳叆锛歱roviderId 榛樿锛0锛圥ROPERTY_PROV_ID锛 + store 鍙橀噺淇濆瓨鏂囦欢鍚 + key 鍙橀噺鍚 + tryLocal 鏄惁鎼滅储鏈湴鏂囦欢鍚 + defaultValue 榛樿璧嬪硷紙褰撹幏鍙栧け璐ユ椂锛岃繑鍥炵殑榛樿鍊硷級 +甯﹁繑鍥炲肩殑杈撳叆锛 + retCode 閿欒淇℃伅锛0涓烘甯革級 + isLocal 鎼滅储鎴愬姛鏃讹紝鏄惁涓烘湰鍦版枃浠 +杈撳嚭锛 + 鍙橀噺绫诲瀷 杩斿洖鍙橀噺鍊 +*/ +INT32S GetInteger(INT32U providerId, const char* store, const char* key, BOOL tryLocal, INT32S defaultValue, INT32U* retCode, BOOL* isLocal); +INT32U GetUnsigned(INT32U providerId, const char* store, const char* key, BOOL tryLocal, INT32U defaultValue, INT32U* retCode, BOOL* isLocal); +FP32 GetFloat(INT32U providerId, const char* store, const char* key, BOOL tryLocal, FP32 defaultValue, INT32U* retCode, BOOL* isLocal); +BOOL GetBoolean(INT32U providerId, const char* store, const char* key, BOOL tryLocal, BOOL defaultValue, INT32U* retCode, BOOL* isLocal); + +/* 璁剧疆鍙橀噺鍊 +杈撳叆锛歱roviderId 榛樿锛0锛圥ROPERTY_PROV_ID锛 + store 鍙橀噺淇濆瓨鏂囦欢鍚 + key 鍙橀噺鍚 + value 鍙橀噺鍊 + mask 瀵瑰簲value鐨勬帺鐮侊紙浠匰etBits()璋冪敤锛 +杈撳嚭锛 + INT32U 閿欒淇℃伅锛0涓烘甯革級 +*/ +INT32U SetInteger(INT32U providerId, const char* store, const char* key, INT32S value); +INT32U SetUnsigned(INT32U providerId, const char* store, const char* key, INT32U value); +INT32U SetFloat(INT32U providerId, const char* store, const char* key, FP32 value); +INT32U SetBits(INT32U providerId, const char* store, const char* key, INT32U value, INT32U mask); + +INT32U ClearPropertyCache(INT32U providerId, const char* store, const char* id); +//INT32U VerifyPropertyCache(INT32U providerId); + +/* + caseId: 娴嬭瘯鐢ㄤ緥缂栧彿 + 1: 鍐欏叆鍙傛暟鏃跺紓甯告柇鐢垫祴璇 +*/ +INT32U SetPropertyTestCase(INT32U caseId); + +#endif diff --git a/propo.cpp b/propo.cpp new file mode 100644 index 0000000..b3e07b3 --- /dev/null +++ b/propo.cpp @@ -0,0 +1,53 @@ +#include +using namespace std; + +// 鍙傛暟鏉ユ簮绫诲瀷 +typedef enum +{ + PropertyTypeFS = 1, + PropertyTypeRemote = 2 +} prop_src_type; + +// 鍙屽悜閾捐〃 +typedef struct link_list +{ + string key; + unsigned char data[8]; + link_list *nest; + link_list *pre; +} link_list; + +link_list *ll_start = NULL; + +class prop +{ +public: + prop(void); + prop(prop_src_type type, string str); + +}; + +prop::prop(void) +{ + for (int i = 0; i < 100; i++) + { + link_list *node = (link_list *)malloc(sizeof(link_list)); + + } +} + +prop::prop(prop_src_type type, string str) +{ + if (type == PropertyTypeFS) + { + } + else if (type == PropertyTypeRemote) + { + } +} + +int main(int argc, char *argv[]) +{ + + return 0; +} \ No newline at end of file diff --git a/read.c b/read.c new file mode 100644 index 0000000..44d0d70 --- /dev/null +++ b/read.c @@ -0,0 +1,25 @@ +#include + +#define READ_PATH "./conf" +#define FILE_NAME "0x1820_0x0000_wash.conf" + +int main(void) +{ + char path[50]; + + sprintf(path, "%s/%s", READ_PATH, FILE_NAME); + printf("%s\n", path); + FILE *fp = fopen((const char *)path, "r"); + char *read; + if (fp != NULL) + { + do + { + char temp[100]; + read = fgets(temp, sizeof(temp), fp); + printf("%s\n", temp); + + } while (read != NULL); + } + return 0; +} \ No newline at end of file diff --git a/read.exe b/read.exe new file mode 100644 index 0000000..f32123f Binary files /dev/null and b/read.exe differ