Commit 16cdd782 刘韬

使用remotedecode

1 个父辈 a9c5a5a2
......@@ -33,9 +33,9 @@
<Prefer32Bit>false</Prefer32Bit>
</PropertyGroup>
<ItemGroup>
<Reference Include="log4net, Version=2.0.8.0, Culture=neutral, PublicKeyToken=669e0ddf0bb1aa2a, processorArchitecture=MSIL">
<Reference Include="log4net, Version=1.2.10.0, Culture=neutral, PublicKeyToken=692fbea5521e1304, processorArchitecture=x86">
<SpecificVersion>False</SpecificVersion>
<HintPath>..\..\..\增广夹爪\log4net.dll</HintPath>
<HintPath>..\..\..\HuichuanLibrary\HuichuanLibrary\bin\Debug\log4net.dll</HintPath>
</Reference>
<Reference Include="Newtonsoft.Json">
<HintPath>..\..\dll\Newtonsoft.Json.dll</HintPath>
......
......@@ -50,9 +50,9 @@
<SpecificVersion>False</SpecificVersion>
<HintPath>..\..\..\HuichuanLibrary\HuichuanLibrary\bin\Debug\HuichuanLibrary.dll</HintPath>
</Reference>
<Reference Include="log4net, Version=2.0.8.0, Culture=neutral, PublicKeyToken=669e0ddf0bb1aa2a, processorArchitecture=MSIL">
<Reference Include="log4net, Version=1.2.10.0, Culture=neutral, PublicKeyToken=692fbea5521e1304, processorArchitecture=x86">
<SpecificVersion>False</SpecificVersion>
<HintPath>..\..\..\增广夹爪\log4net.dll</HintPath>
<HintPath>..\..\..\增广夹爪\Rmaxis\bin\Debug\log4net.dll</HintPath>
</Reference>
<Reference Include="System" />
<Reference Include="System.Configuration" />
......
......@@ -45,10 +45,6 @@
<Reference Include="Asa.Camera.VisionLib">
<HintPath>..\..\..\camera\Asa.Camera.VisionLib.dll</HintPath>
</Reference>
<Reference Include="Asa.IOModule.AIOBOX, Version=2.4.0.7, Culture=neutral, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
<HintPath>..\..\..\AIOBOX\AIOBOX\bin\Debug\Asa.IOModule.AIOBOX.dll</HintPath>
</Reference>
<Reference Include="Asa.RFID.HiStation">
<HintPath>..\..\..\..\work\RFID\Asa.RFID.HiStation.dll</HintPath>
</Reference>
......@@ -66,9 +62,9 @@
<Reference Include="HuichuanLibrary">
<HintPath>..\..\..\HuichuanLibrary\HuichuanLibrary\bin\Debug\HuichuanLibrary.dll</HintPath>
</Reference>
<Reference Include="log4net, Version=2.0.8.0, Culture=neutral, PublicKeyToken=669e0ddf0bb1aa2a, processorArchitecture=MSIL">
<Reference Include="log4net, Version=1.2.10.0, Culture=neutral, PublicKeyToken=692fbea5521e1304, processorArchitecture=x86">
<SpecificVersion>False</SpecificVersion>
<HintPath>..\..\..\增广夹爪\log4net.dll</HintPath>
<HintPath>..\..\..\HuichuanLibrary\HuichuanLibrary\bin\Debug\log4net.dll</HintPath>
</Reference>
<Reference Include="Neotel.Rmaxis, Version=1.0.0.0, Culture=neutral, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
......@@ -107,7 +103,6 @@
<Compile Include="duoStore\DUOStoreBean.cs" />
<Compile Include="duoStore\StoreManager.cs" />
<Compile Include="device\halcon\CodeManager.cs" />
<Compile Include="device\IO\AIOBOX\AIOBOXManager.cs" />
<Compile Include="device\IO\IOManager.cs" />
<Compile Include="Properties\Settings1.Designer.cs">
<AutoGen>True</AutoGen>
......@@ -149,7 +144,6 @@
</ItemGroup>
<ItemGroup />
<ItemGroup>
<None Include="app.config" />
<None Include="Properties\Settings1.settings">
<Generator>SettingsSingleFileGenerator</Generator>
<LastGenOutput>Settings1.Designer.cs</LastGenOutput>
......
<?xml version="1.0" encoding="utf-8"?>
<configuration>
<configSections>
<sectionGroup name="userSettings" type="System.Configuration.UserSettingsGroup, System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<section name="OnlineStore.DeviceLibrary.Properties.Settings1" type="System.Configuration.ClientSettingsSection, System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" allowExeDefinition="MachineToLocalUser" requirePermission="false"/>
</sectionGroup>
</configSections>
<userSettings>
<OnlineStore.DeviceLibrary.Properties.Settings1>
<setting name="CurrShelfNum" serializeAs="String">
<value/>
</setting>
<setting name="CurrShelfType" serializeAs="String">
<value>0</value>
</setting>
<setting name="LastOutShelfType" serializeAs="String">
<value>0</value>
</setting>
</OnlineStore.DeviceLibrary.Properties.Settings1>
</userSettings>
<startup><supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.7.2"/></startup></configuration>
......@@ -173,22 +173,7 @@ namespace OnlineStore.DeviceLibrary
#endregion
public static void Init()
{
bool UseHCBoard = true;// ConfigAppSettings.GetIntValue(Setting_Init.UseHCBoard).Equals(1);
if (UseHCBoard)
{
instance = new HCIOManager();
}
else
{
bool isAIOBox = ConfigAppSettings.GetIntValue(Setting_Init.UseAIOBOX).Equals(1); if (isAIOBox)
{
instance = new AIOBOXManager();
}
//else
//{
// instance = new KNDManager();
//}
}
instance = new HCIOManager();
}
public abstract void ReadAllDI(string deviceName, byte slaveId);
......
......@@ -179,29 +179,25 @@ namespace OnlineStore.DeviceLibrary
}
}
}
RemoteDecodeHelper.RemoteDecodeParam remoteDecodeParam = new RemoteDecodeHelper.RemoteDecodeParam
{
codeTypeList = codeTypeList.ToArray(),
codeCount = 3,
timeout = 3000
};
List<CodeInfo> cc = new List<CodeInfo>();
foreach (string codeType in codeTypeList)
cc = RemoteDecodeHelper.DecodeRequest(ho_Image, remoteDecodeParam);
if (codeList == null) return codeList;
foreach (CodeInfo c in cc)
{
//判断是否是一维码
if (codeType.ToLower().Equals("barcode"))
{
cc = HDCodeHelper.DecodeBarCode(ho_Image);
}
else
{
cc = HDCodeHelper.DecodeCode(ho_Image, codeType, GetCodeParamFilePath(codeType), codeCount, 2500);
}
foreach (CodeInfo c in cc)
string str = CodeManager.ReplaceCode(c.CodeStr);
lock (codeList)
{
string str = CodeManager.ReplaceCode(c.CodeStr);
lock (codeList)
if (!codeList.Contains(str))
{
if (!codeList.Contains(str))
{
codeList.Add(str);
r = r + "##" + str;
}
codeList.Add(str);
r = r + "##" + str;
}
}
}
......
......@@ -661,7 +661,7 @@ namespace OnlineStore.DeviceLibrary
if (result) {
AgvClient.SetStatus(StoreManager.Config.AgvInName, "", Agv.ClientAction.FinishEnter);
_=Task.Run(() => {
Task.Delay(2000);
Task.Delay(2000).Wait();
AgvClient.SetStatus(StoreManager.Config.AgvInName, "", Agv.ClientAction.None);
});
}
......@@ -681,7 +681,9 @@ namespace OnlineStore.DeviceLibrary
Thread.Sleep(1000 * 20);
//等待进料检测信号
result = WaitIo(IO_Type.Line_InCheck, IO_VALUE.LOW, 10000);
//InOutStoreLog($"Line_InCheck:{result}");
result = WaitIo(IO_Type.Line_WaitCheck, IO_VALUE.HIGH, 50000);
//InOutStoreLog($"Line_WaitCheck:{result}");
}
catch (Exception ex)
{
......
......@@ -33,9 +33,9 @@
<Prefer32Bit>false</Prefer32Bit>
</PropertyGroup>
<ItemGroup>
<Reference Include="log4net, Version=2.0.8.0, Culture=neutral, PublicKeyToken=669e0ddf0bb1aa2a, processorArchitecture=MSIL">
<Reference Include="log4net, Version=1.2.10.0, Culture=neutral, PublicKeyToken=692fbea5521e1304, processorArchitecture=x86">
<SpecificVersion>False</SpecificVersion>
<HintPath>..\..\..\增广夹爪\log4net.dll</HintPath>
<HintPath>..\..\..\HuichuanLibrary\HuichuanLibrary\bin\Debug\log4net.dll</HintPath>
</Reference>
<Reference Include="System" />
<Reference Include="System.Core" />
......
支持 Markdown 格式
你添加了 0 到此讨论。请谨慎行事。
Finish editing this message first!