添加拘束/插拔钉机和堆垛机基类
为QuartzJob项目引入新机器实现和堆垛起重机框架:添加ConstraintMachine/IConstraintMachine、PinMachine/IPinMachine、IStackerCraneBase/StackerCraneBase及相关IStackerCrane、CommonStackerCrane与状态枚举。添加规格类(SpeTemperatureStackerCrane、SpeFormationStackerCrane)并更新堆垛起重机文件。添加/修改设备协议构件(DeviceProtocolDetail DTO/模型及DeviceProtocolDetailService/IDeviceProtocolDetailService),调整QuartzNetExtension和TaskService。在WIDESEAWCS_Tasks下添加新任务存根和数据库名称助手(ConveyorLineNewJob、PinMachine等)。同时包含工作空间元数据变更(.vs DocumentLayout和CopilotIndices)并添加一份DOCX规范文件。
| | |
| | | "WorkspaceRootPath": "D:\\Git\\ShanMeiXinNengYuan\\Code\\WCS\\WIDESEAWCS_Server\\", |
| | | "Documents": [ |
| | | { |
| | | "AbsoluteMoniker": "D:0:0:{294E4915-0241-4C8C-BA99-7588B945863A}|WIDESEAWCS_Tasks\\WIDESEAWCS_Tasks.csproj|d:\\git\\shanmeixinnengyuan\\code\\wcs\\wideseawcs_server\\wideseawcs_tasks\\socketserver\\tcpsocketserver.messaging.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}", |
| | | "RelativeMoniker": "D:0:0:{294E4915-0241-4C8C-BA99-7588B945863A}|WIDESEAWCS_Tasks\\WIDESEAWCS_Tasks.csproj|solutionrelative:wideseawcs_tasks\\socketserver\\tcpsocketserver.messaging.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}" |
| | | }, |
| | | { |
| | | "AbsoluteMoniker": "D:0:0:{294E4915-0241-4C8C-BA99-7588B945863A}|WIDESEAWCS_Tasks\\WIDESEAWCS_Tasks.csproj|d:\\git\\shanmeixinnengyuan\\code\\wcs\\wideseawcs_server\\wideseawcs_tasks\\socketserver\\socketserveroptions.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}", |
| | | "RelativeMoniker": "D:0:0:{294E4915-0241-4C8C-BA99-7588B945863A}|WIDESEAWCS_Tasks\\WIDESEAWCS_Tasks.csproj|solutionrelative:wideseawcs_tasks\\socketserver\\socketserveroptions.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}" |
| | | }, |
| | | { |
| | | "AbsoluteMoniker": "D:0:0:{294E4915-0241-4C8C-BA99-7588B945863A}|WIDESEAWCS_Tasks\\WIDESEAWCS_Tasks.csproj|d:\\git\\shanmeixinnengyuan\\code\\wcs\\wideseawcs_server\\wideseawcs_tasks\\socketserver\\tcpsocketserver.clients.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}", |
| | | "RelativeMoniker": "D:0:0:{294E4915-0241-4C8C-BA99-7588B945863A}|WIDESEAWCS_Tasks\\WIDESEAWCS_Tasks.csproj|solutionrelative:wideseawcs_tasks\\socketserver\\tcpsocketserver.clients.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}" |
| | | }, |
| | | { |
| | | "AbsoluteMoniker": "D:0:0:{294E4915-0241-4C8C-BA99-7588B945863A}|WIDESEAWCS_Tasks\\WIDESEAWCS_Tasks.csproj|d:\\git\\shanmeixinnengyuan\\code\\wcs\\wideseawcs_server\\wideseawcs_tasks\\robotjob\\robotjob.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}", |
| | | "RelativeMoniker": "D:0:0:{294E4915-0241-4C8C-BA99-7588B945863A}|WIDESEAWCS_Tasks\\WIDESEAWCS_Tasks.csproj|solutionrelative:wideseawcs_tasks\\robotjob\\robotjob.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}" |
| | | }, |
| | | { |
| | | "AbsoluteMoniker": "D:0:0:{487FA45B-EA1A-4ACA-BB5B-0F6708F462C0}|WIDESEAWCS_Server\\WIDESEAWCS_Server.csproj|d:\\git\\shanmeixinnengyuan\\code\\wcs\\wideseawcs_server\\wideseawcs_server\\appsettings.json||{90A6B3A7-C1A3-4009-A288-E2FF89E96FA0}", |
| | | "RelativeMoniker": "D:0:0:{487FA45B-EA1A-4ACA-BB5B-0F6708F462C0}|WIDESEAWCS_Server\\WIDESEAWCS_Server.csproj|solutionrelative:wideseawcs_server\\appsettings.json||{90A6B3A7-C1A3-4009-A288-E2FF89E96FA0}" |
| | | }, |
| | | { |
| | | "AbsoluteMoniker": "D:0:0:{294E4915-0241-4C8C-BA99-7588B945863A}|WIDESEAWCS_Tasks\\WIDESEAWCS_Tasks.csproj|d:\\git\\shanmeixinnengyuan\\code\\wcs\\wideseawcs_server\\wideseawcs_tasks\\socketserver\\tcpsocketserver.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}", |
| | | "RelativeMoniker": "D:0:0:{294E4915-0241-4C8C-BA99-7588B945863A}|WIDESEAWCS_Tasks\\WIDESEAWCS_Tasks.csproj|solutionrelative:wideseawcs_tasks\\socketserver\\tcpsocketserver.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}" |
| | | }, |
| | | { |
| | | "AbsoluteMoniker": "D:0:0:{294E4915-0241-4C8C-BA99-7588B945863A}|WIDESEAWCS_Tasks\\WIDESEAWCS_Tasks.csproj|d:\\git\\shanmeixinnengyuan\\code\\wcs\\wideseawcs_server\\wideseawcs_tasks\\socketserver\\tcpsocketserver.server.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}", |
| | | "RelativeMoniker": "D:0:0:{294E4915-0241-4C8C-BA99-7588B945863A}|WIDESEAWCS_Tasks\\WIDESEAWCS_Tasks.csproj|solutionrelative:wideseawcs_tasks\\socketserver\\tcpsocketserver.server.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}" |
| | | }, |
| | | { |
| | | "AbsoluteMoniker": "D:0:0:{83F18A31-5983-4587-A0B2-414BF70E50B5}|WIDESEAWCS_TaskInfoService\\WIDESEAWCS_TaskInfoService.csproj|d:\\git\\shanmeixinnengyuan\\code\\wcs\\wideseawcs_server\\wideseawcs_taskinfoservice\\taskservice.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}", |
| | | "RelativeMoniker": "D:0:0:{83F18A31-5983-4587-A0B2-414BF70E50B5}|WIDESEAWCS_TaskInfoService\\WIDESEAWCS_TaskInfoService.csproj|solutionrelative:wideseawcs_taskinfoservice\\taskservice.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}" |
| | | }, |
| | | { |
| | | "AbsoluteMoniker": "D:0:0:{9FBC654C-51DE-422D-9E1E-6A38268DE1E2}|WIDESEAWCS_Common\\WIDESEAWCS_Common.csproj|d:\\git\\shanmeixinnengyuan\\code\\wcs\\wideseawcs_server\\wideseawcs_common\\taskenum\\taskstatusenum.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}", |
| | | "RelativeMoniker": "D:0:0:{9FBC654C-51DE-422D-9E1E-6A38268DE1E2}|WIDESEAWCS_Common\\WIDESEAWCS_Common.csproj|solutionrelative:wideseawcs_common\\taskenum\\taskstatusenum.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}" |
| | | }, |
| | | { |
| | | "AbsoluteMoniker": "D:0:0:{9FBC654C-51DE-422D-9E1E-6A38268DE1E2}|WIDESEAWCS_Common\\WIDESEAWCS_Common.csproj|d:\\git\\shanmeixinnengyuan\\code\\wcs\\wideseawcs_server\\wideseawcs_common\\taskenum\\taskenumhelper.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}", |
| | | "RelativeMoniker": "D:0:0:{9FBC654C-51DE-422D-9E1E-6A38268DE1E2}|WIDESEAWCS_Common\\WIDESEAWCS_Common.csproj|solutionrelative:wideseawcs_common\\taskenum\\taskenumhelper.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}" |
| | | }, |
| | | { |
| | | "AbsoluteMoniker": "D:0:0:{9FBC654C-51DE-422D-9E1E-6A38268DE1E2}|WIDESEAWCS_Common\\WIDESEAWCS_Common.csproj|d:\\git\\shanmeixinnengyuan\\code\\wcs\\wideseawcs_server\\wideseawcs_common\\taskenum\\tasktypeenum.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}", |
| | | "RelativeMoniker": "D:0:0:{9FBC654C-51DE-422D-9E1E-6A38268DE1E2}|WIDESEAWCS_Common\\WIDESEAWCS_Common.csproj|solutionrelative:wideseawcs_common\\taskenum\\tasktypeenum.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}" |
| | | }, |
| | | { |
| | | "AbsoluteMoniker": "D:0:0:{294E4915-0241-4C8C-BA99-7588B945863A}|WIDESEAWCS_Tasks\\WIDESEAWCS_Tasks.csproj|d:\\git\\shanmeixinnengyuan\\code\\wcs\\wideseawcs_server\\wideseawcs_tasks\\stackercranejob\\commonstackercranejob.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}", |
| | | "RelativeMoniker": "D:0:0:{294E4915-0241-4C8C-BA99-7588B945863A}|WIDESEAWCS_Tasks\\WIDESEAWCS_Tasks.csproj|solutionrelative:wideseawcs_tasks\\stackercranejob\\commonstackercranejob.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}" |
| | | }, |
| | | { |
| | | "AbsoluteMoniker": "D:0:0:{7279A2AE-8D1F-4E66-A73A-01AF7927A336}|WIDESEAWCS_ITaskInfoService\\WIDESEAWCS_ITaskInfoService.csproj|d:\\git\\shanmeixinnengyuan\\code\\wcs\\wideseawcs_server\\wideseawcs_itaskinfoservice\\itaskservice.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}", |
| | | "RelativeMoniker": "D:0:0:{7279A2AE-8D1F-4E66-A73A-01AF7927A336}|WIDESEAWCS_ITaskInfoService\\WIDESEAWCS_ITaskInfoService.csproj|solutionrelative:wideseawcs_itaskinfoservice\\itaskservice.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}" |
| | | "AbsoluteMoniker": "D:0:0:{6236BFFF-173D-44A8-9FC3-7C001EA30347}|WIDESEAWCS_QuartzJob\\WIDESEAWCS_QuartzJob.csproj|d:\\git\\shanmeixinnengyuan\\code\\wcs\\wideseawcs_server\\wideseawcs_quartzjob\\quartznet\\quartznetextension.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}", |
| | | "RelativeMoniker": "D:0:0:{6236BFFF-173D-44A8-9FC3-7C001EA30347}|WIDESEAWCS_QuartzJob\\WIDESEAWCS_QuartzJob.csproj|solutionrelative:wideseawcs_quartzjob\\quartznet\\quartznetextension.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}" |
| | | }, |
| | | { |
| | | "AbsoluteMoniker": "D:0:0:{6236BFFF-173D-44A8-9FC3-7C001EA30347}|WIDESEAWCS_QuartzJob\\WIDESEAWCS_QuartzJob.csproj|d:\\git\\shanmeixinnengyuan\\code\\wcs\\wideseawcs_server\\wideseawcs_quartzjob\\service\\deviceprotocoldetailservice.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}", |
| | | "RelativeMoniker": "D:0:0:{6236BFFF-173D-44A8-9FC3-7C001EA30347}|WIDESEAWCS_QuartzJob\\WIDESEAWCS_QuartzJob.csproj|solutionrelative:wideseawcs_quartzjob\\service\\deviceprotocoldetailservice.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}" |
| | | }, |
| | | { |
| | | "AbsoluteMoniker": "D:0:0:{6236BFFF-173D-44A8-9FC3-7C001EA30347}|WIDESEAWCS_QuartzJob\\WIDESEAWCS_QuartzJob.csproj|d:\\git\\shanmeixinnengyuan\\code\\wcs\\wideseawcs_server\\wideseawcs_quartzjob\\service\\ideviceprotocoldetailservice.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}", |
| | | "RelativeMoniker": "D:0:0:{6236BFFF-173D-44A8-9FC3-7C001EA30347}|WIDESEAWCS_QuartzJob\\WIDESEAWCS_QuartzJob.csproj|solutionrelative:wideseawcs_quartzjob\\service\\ideviceprotocoldetailservice.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}" |
| | | }, |
| | | { |
| | | "AbsoluteMoniker": "D:0:0:{6236BFFF-173D-44A8-9FC3-7C001EA30347}|WIDESEAWCS_QuartzJob\\WIDESEAWCS_QuartzJob.csproj|d:\\git\\shanmeixinnengyuan\\code\\wcs\\wideseawcs_server\\wideseawcs_quartzjob\\stackercrane\\spec\\spetemperaturestackercrane.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}", |
| | | "RelativeMoniker": "D:0:0:{6236BFFF-173D-44A8-9FC3-7C001EA30347}|WIDESEAWCS_QuartzJob\\WIDESEAWCS_QuartzJob.csproj|solutionrelative:wideseawcs_quartzjob\\stackercrane\\spec\\spetemperaturestackercrane.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}" |
| | | }, |
| | | { |
| | | "AbsoluteMoniker": "D:0:0:{6236BFFF-173D-44A8-9FC3-7C001EA30347}|WIDESEAWCS_QuartzJob\\WIDESEAWCS_QuartzJob.csproj|d:\\git\\shanmeixinnengyuan\\code\\wcs\\wideseawcs_server\\wideseawcs_quartzjob\\stackercrane\\spec\\speformationstackercrane.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}", |
| | | "RelativeMoniker": "D:0:0:{6236BFFF-173D-44A8-9FC3-7C001EA30347}|WIDESEAWCS_QuartzJob\\WIDESEAWCS_QuartzJob.csproj|solutionrelative:wideseawcs_quartzjob\\stackercrane\\spec\\speformationstackercrane.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}" |
| | | }, |
| | | { |
| | | "AbsoluteMoniker": "D:0:0:{6236BFFF-173D-44A8-9FC3-7C001EA30347}|WIDESEAWCS_QuartzJob\\WIDESEAWCS_QuartzJob.csproj|d:\\git\\shanmeixinnengyuan\\code\\wcs\\wideseawcs_server\\wideseawcs_quartzjob\\stackercrane\\common\\commonstackercrane.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}", |
| | | "RelativeMoniker": "D:0:0:{6236BFFF-173D-44A8-9FC3-7C001EA30347}|WIDESEAWCS_QuartzJob\\WIDESEAWCS_QuartzJob.csproj|solutionrelative:wideseawcs_quartzjob\\stackercrane\\common\\commonstackercrane.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}" |
| | | }, |
| | | { |
| | | "AbsoluteMoniker": "D:0:0:{6236BFFF-173D-44A8-9FC3-7C001EA30347}|WIDESEAWCS_QuartzJob\\WIDESEAWCS_QuartzJob.csproj|d:\\git\\shanmeixinnengyuan\\code\\wcs\\wideseawcs_server\\wideseawcs_quartzjob\\stackercrane\\istackercrane.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}", |
| | | "RelativeMoniker": "D:0:0:{6236BFFF-173D-44A8-9FC3-7C001EA30347}|WIDESEAWCS_QuartzJob\\WIDESEAWCS_QuartzJob.csproj|solutionrelative:wideseawcs_quartzjob\\stackercrane\\istackercrane.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}" |
| | | }, |
| | | { |
| | | "AbsoluteMoniker": "D:0:0:{6236BFFF-173D-44A8-9FC3-7C001EA30347}|WIDESEAWCS_QuartzJob\\WIDESEAWCS_QuartzJob.csproj|d:\\git\\shanmeixinnengyuan\\code\\wcs\\wideseawcs_server\\wideseawcs_quartzjob\\stackercrane\\common\\istackercranebase.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}", |
| | | "RelativeMoniker": "D:0:0:{6236BFFF-173D-44A8-9FC3-7C001EA30347}|WIDESEAWCS_QuartzJob\\WIDESEAWCS_QuartzJob.csproj|solutionrelative:wideseawcs_quartzjob\\stackercrane\\common\\istackercranebase.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}" |
| | | }, |
| | | { |
| | | "AbsoluteMoniker": "D:0:0:{6236BFFF-173D-44A8-9FC3-7C001EA30347}|WIDESEAWCS_QuartzJob\\WIDESEAWCS_QuartzJob.csproj|d:\\git\\shanmeixinnengyuan\\code\\wcs\\wideseawcs_server\\wideseawcs_quartzjob\\stackercrane\\common\\stackercranebase.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}", |
| | | "RelativeMoniker": "D:0:0:{6236BFFF-173D-44A8-9FC3-7C001EA30347}|WIDESEAWCS_QuartzJob\\WIDESEAWCS_QuartzJob.csproj|solutionrelative:wideseawcs_quartzjob\\stackercrane\\common\\stackercranebase.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}" |
| | | }, |
| | | { |
| | | "AbsoluteMoniker": "D:0:0:{294E4915-0241-4C8C-BA99-7588B945863A}|WIDESEAWCS_Tasks\\WIDESEAWCS_Tasks.csproj|d:\\git\\shanmeixinnengyuan\\code\\wcs\\wideseawcs_server\\wideseawcs_tasks\\formationstackercranejob\\formationcommonstackercranejob.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}", |
| | | "RelativeMoniker": "D:0:0:{294E4915-0241-4C8C-BA99-7588B945863A}|WIDESEAWCS_Tasks\\WIDESEAWCS_Tasks.csproj|solutionrelative:wideseawcs_tasks\\formationstackercranejob\\formationcommonstackercranejob.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}" |
| | | }, |
| | | { |
| | | "AbsoluteMoniker": "D:0:0:{6236BFFF-173D-44A8-9FC3-7C001EA30347}|WIDESEAWCS_QuartzJob\\WIDESEAWCS_QuartzJob.csproj|d:\\git\\shanmeixinnengyuan\\code\\wcs\\wideseawcs_server\\wideseawcs_quartzjob\\quartznet\\quartznetextension.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}", |
| | | "RelativeMoniker": "D:0:0:{6236BFFF-173D-44A8-9FC3-7C001EA30347}|WIDESEAWCS_QuartzJob\\WIDESEAWCS_QuartzJob.csproj|solutionrelative:wideseawcs_quartzjob\\quartznet\\quartznetextension.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}" |
| | | } |
| | | ], |
| | | "DocumentGroupContainers": [ |
| | |
| | | "DocumentGroups": [ |
| | | { |
| | | "DockedWidth": 200, |
| | | "SelectedChildIndex": 14, |
| | | "SelectedChildIndex": 13, |
| | | "Children": [ |
| | | { |
| | | "$type": "Document", |
| | | "DocumentIndex": 3, |
| | | "Title": "IDeviceProtocolDetailService.cs", |
| | | "DocumentMoniker": "D:\\Git\\ShanMeiXinNengYuan\\Code\\WCS\\WIDESEAWCS_Server\\WIDESEAWCS_QuartzJob\\Service\\IDeviceProtocolDetailService.cs", |
| | | "RelativeDocumentMoniker": "WIDESEAWCS_QuartzJob\\Service\\IDeviceProtocolDetailService.cs", |
| | | "ToolTip": "D:\\Git\\ShanMeiXinNengYuan\\Code\\WCS\\WIDESEAWCS_Server\\WIDESEAWCS_QuartzJob\\Service\\IDeviceProtocolDetailService.cs", |
| | | "RelativeToolTip": "WIDESEAWCS_QuartzJob\\Service\\IDeviceProtocolDetailService.cs", |
| | | "ViewState": "AgIAABMAAAAAAAAAAAAWwCkAAAAAAAAAAAAAAA==", |
| | | "Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|", |
| | | "WhenOpened": "2026-02-05T02:09:38.844Z", |
| | | "EditorCaption": "" |
| | | }, |
| | | { |
| | | "$type": "Document", |
| | | "DocumentIndex": 2, |
| | | "Title": "DeviceProtocolDetailService.cs", |
| | | "DocumentMoniker": "D:\\Git\\ShanMeiXinNengYuan\\Code\\WCS\\WIDESEAWCS_Server\\WIDESEAWCS_QuartzJob\\Service\\DeviceProtocolDetailService.cs", |
| | | "RelativeDocumentMoniker": "WIDESEAWCS_QuartzJob\\Service\\DeviceProtocolDetailService.cs", |
| | | "ToolTip": "D:\\Git\\ShanMeiXinNengYuan\\Code\\WCS\\WIDESEAWCS_Server\\WIDESEAWCS_QuartzJob\\Service\\DeviceProtocolDetailService.cs", |
| | | "RelativeToolTip": "WIDESEAWCS_QuartzJob\\Service\\DeviceProtocolDetailService.cs", |
| | | "ViewState": "AgIAACgAAAAAAAAAAAAuwEIAAABPAAAAAAAAAA==", |
| | | "Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|", |
| | | "WhenOpened": "2026-02-05T02:02:05.669Z", |
| | | "EditorCaption": "" |
| | | }, |
| | | { |
| | | "$type": "Bookmark", |
| | | "Name": "ST:128:0:{116d2292-e37d-41cd-a077-ebacac4c8cc4}" |
| | |
| | | { |
| | | "$type": "Document", |
| | | "DocumentIndex": 1, |
| | | "Title": "SocketServerOptions.cs", |
| | | "DocumentMoniker": "D:\\Git\\ShanMeiXinNengYuan\\Code\\WCS\\WIDESEAWCS_Server\\WIDESEAWCS_Tasks\\SocketServer\\SocketServerOptions.cs", |
| | | "RelativeDocumentMoniker": "WIDESEAWCS_Tasks\\SocketServer\\SocketServerOptions.cs", |
| | | "ToolTip": "D:\\Git\\ShanMeiXinNengYuan\\Code\\WCS\\WIDESEAWCS_Server\\WIDESEAWCS_Tasks\\SocketServer\\SocketServerOptions.cs", |
| | | "RelativeToolTip": "WIDESEAWCS_Tasks\\SocketServer\\SocketServerOptions.cs", |
| | | "ViewState": "AgIAACEAAAAAAAAAAAAQwCAAAAA7AAAAAAAAAA==", |
| | | "Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|", |
| | | "WhenOpened": "2026-02-03T03:20:50.458Z", |
| | | "EditorCaption": "" |
| | | }, |
| | | { |
| | | "$type": "Document", |
| | | "DocumentIndex": 4, |
| | | "Title": "appsettings.json", |
| | | "DocumentMoniker": "D:\\Git\\ShanMeiXinNengYuan\\Code\\WCS\\WIDESEAWCS_Server\\WIDESEAWCS_Server\\appsettings.json", |
| | | "RelativeDocumentMoniker": "WIDESEAWCS_Server\\appsettings.json", |
| | | "ToolTip": "D:\\Git\\ShanMeiXinNengYuan\\Code\\WCS\\WIDESEAWCS_Server\\WIDESEAWCS_Server\\appsettings.json", |
| | | "RelativeToolTip": "WIDESEAWCS_Server\\appsettings.json", |
| | | "ViewState": "AgIAABUAAAAAAAAAAAAAADYAAAAbAAAAAAAAAA==", |
| | | "Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.001642|", |
| | | "WhenOpened": "2026-02-03T03:54:20.54Z", |
| | | "EditorCaption": "" |
| | | }, |
| | | { |
| | | "$type": "Document", |
| | | "DocumentIndex": 10, |
| | | "Title": "TaskTypeEnum.cs", |
| | | "DocumentMoniker": "D:\\Git\\ShanMeiXinNengYuan\\Code\\WCS\\WIDESEAWCS_Server\\WIDESEAWCS_Common\\TaskEnum\\TaskTypeEnum.cs", |
| | | "RelativeDocumentMoniker": "WIDESEAWCS_Common\\TaskEnum\\TaskTypeEnum.cs", |
| | | "ToolTip": "D:\\Git\\ShanMeiXinNengYuan\\Code\\WCS\\WIDESEAWCS_Server\\WIDESEAWCS_Common\\TaskEnum\\TaskTypeEnum.cs", |
| | | "RelativeToolTip": "WIDESEAWCS_Common\\TaskEnum\\TaskTypeEnum.cs", |
| | | "ViewState": "AgIAADYAAAAAAAAAAAAuwEwAAAAZAAAAAAAAAA==", |
| | | "Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|", |
| | | "WhenOpened": "2026-02-02T07:43:32.381Z" |
| | | }, |
| | | { |
| | | "$type": "Document", |
| | | "DocumentIndex": 9, |
| | | "Title": "TaskEnumHelper.cs", |
| | | "DocumentMoniker": "D:\\Git\\ShanMeiXinNengYuan\\Code\\WCS\\WIDESEAWCS_Server\\WIDESEAWCS_Common\\TaskEnum\\TaskEnumHelper.cs", |
| | | "RelativeDocumentMoniker": "WIDESEAWCS_Common\\TaskEnum\\TaskEnumHelper.cs", |
| | | "ToolTip": "D:\\Git\\ShanMeiXinNengYuan\\Code\\WCS\\WIDESEAWCS_Server\\WIDESEAWCS_Common\\TaskEnum\\TaskEnumHelper.cs", |
| | | "RelativeToolTip": "WIDESEAWCS_Common\\TaskEnum\\TaskEnumHelper.cs", |
| | | "ViewState": "AgIAABEAAAAAAAAAAAApwBgAAAAkAAAAAAAAAA==", |
| | | "Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|", |
| | | "WhenOpened": "2026-02-02T07:13:45.107Z" |
| | | }, |
| | | { |
| | | "$type": "Document", |
| | | "DocumentIndex": 7, |
| | | "Title": "TaskService.cs", |
| | | "DocumentMoniker": "D:\\Git\\ShanMeiXinNengYuan\\Code\\WCS\\WIDESEAWCS_Server\\WIDESEAWCS_TaskInfoService\\TaskService.cs", |
| | | "RelativeDocumentMoniker": "WIDESEAWCS_TaskInfoService\\TaskService.cs", |
| | | "ToolTip": "D:\\Git\\ShanMeiXinNengYuan\\Code\\WCS\\WIDESEAWCS_Server\\WIDESEAWCS_TaskInfoService\\TaskService.cs", |
| | | "RelativeToolTip": "WIDESEAWCS_TaskInfoService\\TaskService.cs", |
| | | "ViewState": "AgIAAGECAAAAAAAAAAAvwHMCAADaAAAAAAAAAA==", |
| | | "Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|", |
| | | "WhenOpened": "2026-02-02T07:10:41.925Z" |
| | | }, |
| | | { |
| | | "$type": "Document", |
| | | "DocumentIndex": 13, |
| | | "Title": "FormationCommonStackerCraneJob.cs", |
| | | "DocumentMoniker": "D:\\Git\\ShanMeiXinNengYuan\\Code\\WCS\\WIDESEAWCS_Server\\WIDESEAWCS_Tasks\\FormationStackerCraneJob\\FormationCommonStackerCraneJob.cs", |
| | | "RelativeDocumentMoniker": "WIDESEAWCS_Tasks\\FormationStackerCraneJob\\FormationCommonStackerCraneJob.cs", |
| | | "ToolTip": "D:\\Git\\ShanMeiXinNengYuan\\Code\\WCS\\WIDESEAWCS_Server\\WIDESEAWCS_Tasks\\FormationStackerCraneJob\\FormationCommonStackerCraneJob.cs", |
| | | "RelativeToolTip": "WIDESEAWCS_Tasks\\FormationStackerCraneJob\\FormationCommonStackerCraneJob.cs", |
| | | "ViewState": "AgIAAFkAAAAAAAAAAAAWwG0AAAAkAAAAAAAAAA==", |
| | | "Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|", |
| | | "WhenOpened": "2026-02-02T07:08:40.6Z" |
| | | }, |
| | | { |
| | | "$type": "Document", |
| | | "DocumentIndex": 12, |
| | | "Title": "ITaskService.cs", |
| | | "DocumentMoniker": "D:\\Git\\ShanMeiXinNengYuan\\Code\\WCS\\WIDESEAWCS_Server\\WIDESEAWCS_ITaskInfoService\\ITaskService.cs", |
| | | "RelativeDocumentMoniker": "WIDESEAWCS_ITaskInfoService\\ITaskService.cs", |
| | | "ToolTip": "D:\\Git\\ShanMeiXinNengYuan\\Code\\WCS\\WIDESEAWCS_Server\\WIDESEAWCS_ITaskInfoService\\ITaskService.cs", |
| | | "RelativeToolTip": "WIDESEAWCS_ITaskInfoService\\ITaskService.cs", |
| | | "ViewState": "AgIAACAAAAAAAAAAAAAjwDUAAAAnAAAAAAAAAA==", |
| | | "Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|", |
| | | "WhenOpened": "2026-02-02T07:08:06.875Z" |
| | | }, |
| | | { |
| | | "$type": "Document", |
| | | "DocumentIndex": 8, |
| | | "Title": "TaskStatusEnum.cs", |
| | | "DocumentMoniker": "D:\\Git\\ShanMeiXinNengYuan\\Code\\WCS\\WIDESEAWCS_Server\\WIDESEAWCS_Common\\TaskEnum\\TaskStatusEnum.cs", |
| | | "RelativeDocumentMoniker": "WIDESEAWCS_Common\\TaskEnum\\TaskStatusEnum.cs", |
| | | "ToolTip": "D:\\Git\\ShanMeiXinNengYuan\\Code\\WCS\\WIDESEAWCS_Server\\WIDESEAWCS_Common\\TaskEnum\\TaskStatusEnum.cs", |
| | | "RelativeToolTip": "WIDESEAWCS_Common\\TaskEnum\\TaskStatusEnum.cs", |
| | | "ViewState": "AgIAAJYAAAAAAAAAAAAAwJ8AAAAWAAAAAAAAAA==", |
| | | "Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|", |
| | | "WhenOpened": "2026-02-02T07:05:39.323Z" |
| | | }, |
| | | { |
| | | "$type": "Document", |
| | | "DocumentIndex": 11, |
| | | "Title": "CommonStackerCraneJob.cs", |
| | | "DocumentMoniker": "D:\\Git\\ShanMeiXinNengYuan\\Code\\WCS\\WIDESEAWCS_Server\\WIDESEAWCS_Tasks\\StackerCraneJob\\CommonStackerCraneJob.cs", |
| | | "RelativeDocumentMoniker": "WIDESEAWCS_Tasks\\StackerCraneJob\\CommonStackerCraneJob.cs", |
| | | "ToolTip": "D:\\Git\\ShanMeiXinNengYuan\\Code\\WCS\\WIDESEAWCS_Server\\WIDESEAWCS_Tasks\\StackerCraneJob\\CommonStackerCraneJob.cs", |
| | | "RelativeToolTip": "WIDESEAWCS_Tasks\\StackerCraneJob\\CommonStackerCraneJob.cs", |
| | | "ViewState": "AgIAAGwAAAAAAAAAAAApwH4AAAA1AAAAAAAAAA==", |
| | | "Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|", |
| | | "WhenOpened": "2026-02-02T06:13:24.454Z", |
| | | "EditorCaption": "" |
| | | }, |
| | | { |
| | | "$type": "Document", |
| | | "DocumentIndex": 14, |
| | | "Title": "QuartzNetExtension.cs", |
| | | "DocumentMoniker": "D:\\Git\\ShanMeiXinNengYuan\\Code\\WCS\\WIDESEAWCS_Server\\WIDESEAWCS_QuartzJob\\QuartzNet\\QuartzNetExtension.cs", |
| | | "RelativeDocumentMoniker": "WIDESEAWCS_QuartzJob\\QuartzNet\\QuartzNetExtension.cs", |
| | | "ToolTip": "D:\\Git\\ShanMeiXinNengYuan\\Code\\WCS\\WIDESEAWCS_Server\\WIDESEAWCS_QuartzJob\\QuartzNet\\QuartzNetExtension.cs", |
| | | "RelativeToolTip": "WIDESEAWCS_QuartzJob\\QuartzNet\\QuartzNetExtension.cs", |
| | | "ViewState": "AgIAAHAAAAAAAAAAAAAAAIYAAABzAAAAAAAAAA==", |
| | | "ViewState": "AgIAAEcAAAAAAAAAAAApwF8AAACaAAAAAAAAAA==", |
| | | "Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|", |
| | | "WhenOpened": "2026-02-02T06:11:52.348Z" |
| | | }, |
| | | { |
| | | "$type": "Document", |
| | | "DocumentIndex": 3, |
| | | "Title": "RobotJob.cs", |
| | | "DocumentMoniker": "D:\\Git\\ShanMeiXinNengYuan\\Code\\WCS\\WIDESEAWCS_Server\\WIDESEAWCS_Tasks\\RobotJob\\RobotJob.cs", |
| | | "RelativeDocumentMoniker": "WIDESEAWCS_Tasks\\RobotJob\\RobotJob.cs", |
| | | "ToolTip": "D:\\Git\\ShanMeiXinNengYuan\\Code\\WCS\\WIDESEAWCS_Server\\WIDESEAWCS_Tasks\\RobotJob\\RobotJob.cs", |
| | | "RelativeToolTip": "WIDESEAWCS_Tasks\\RobotJob\\RobotJob.cs", |
| | | "ViewState": "AgIAAFYAAAAAAAAAAAAAAGwAAAAMAAAAAAAAAA==", |
| | | "Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|", |
| | | "WhenOpened": "2026-02-02T03:52:06.502Z", |
| | | "WhenOpened": "2026-02-05T01:58:27.882Z", |
| | | "EditorCaption": "" |
| | | }, |
| | | { |
| | | "$type": "Document", |
| | | "DocumentIndex": 0, |
| | | "Title": "TcpSocketServer.Messaging.cs", |
| | | "DocumentMoniker": "D:\\Git\\ShanMeiXinNengYuan\\Code\\WCS\\WIDESEAWCS_Server\\WIDESEAWCS_Tasks\\SocketServer\\TcpSocketServer.Messaging.cs", |
| | | "RelativeDocumentMoniker": "WIDESEAWCS_Tasks\\SocketServer\\TcpSocketServer.Messaging.cs", |
| | | "ToolTip": "D:\\Git\\ShanMeiXinNengYuan\\Code\\WCS\\WIDESEAWCS_Server\\WIDESEAWCS_Tasks\\SocketServer\\TcpSocketServer.Messaging.cs", |
| | | "RelativeToolTip": "WIDESEAWCS_Tasks\\SocketServer\\TcpSocketServer.Messaging.cs", |
| | | "ViewState": "AgIAALYAAAAAAAAAAAAIwLsAAAAWAAAAAAAAAA==", |
| | | "DocumentIndex": 4, |
| | | "Title": "SpeTemperatureStackerCrane.cs", |
| | | "DocumentMoniker": "D:\\Git\\ShanMeiXinNengYuan\\Code\\WCS\\WIDESEAWCS_Server\\WIDESEAWCS_QuartzJob\\StackerCrane\\Spec\\SpeTemperatureStackerCrane.cs", |
| | | "RelativeDocumentMoniker": "WIDESEAWCS_QuartzJob\\StackerCrane\\Spec\\SpeTemperatureStackerCrane.cs", |
| | | "ToolTip": "D:\\Git\\ShanMeiXinNengYuan\\Code\\WCS\\WIDESEAWCS_Server\\WIDESEAWCS_QuartzJob\\StackerCrane\\Spec\\SpeTemperatureStackerCrane.cs", |
| | | "RelativeToolTip": "WIDESEAWCS_QuartzJob\\StackerCrane\\Spec\\SpeTemperatureStackerCrane.cs", |
| | | "ViewState": "AgIAAHgAAAAAAAAAAAArwAAAAAAAAAAAAAAAAA==", |
| | | "Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|", |
| | | "WhenOpened": "2026-02-02T03:38:35.325Z", |
| | | "WhenOpened": "2026-02-05T01:47:49.291Z", |
| | | "EditorCaption": "" |
| | | }, |
| | | { |
| | | "$type": "Document", |
| | | "DocumentIndex": 8, |
| | | "Title": "IStackerCraneBase.cs", |
| | | "DocumentMoniker": "D:\\Git\\ShanMeiXinNengYuan\\Code\\WCS\\WIDESEAWCS_Server\\WIDESEAWCS_QuartzJob\\StackerCrane\\Common\\IStackerCraneBase.cs", |
| | | "RelativeDocumentMoniker": "WIDESEAWCS_QuartzJob\\StackerCrane\\Common\\IStackerCraneBase.cs", |
| | | "ToolTip": "D:\\Git\\ShanMeiXinNengYuan\\Code\\WCS\\WIDESEAWCS_Server\\WIDESEAWCS_QuartzJob\\StackerCrane\\Common\\IStackerCraneBase.cs", |
| | | "RelativeToolTip": "WIDESEAWCS_QuartzJob\\StackerCrane\\Common\\IStackerCraneBase.cs", |
| | | "ViewState": "AgIAAAAAAAAAAAAAAAAAAAoAAAAmAAAAAAAAAA==", |
| | | "Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|", |
| | | "WhenOpened": "2026-02-05T01:35:31.591Z", |
| | | "EditorCaption": "" |
| | | }, |
| | | { |
| | | "$type": "Document", |
| | | "DocumentIndex": 7, |
| | | "Title": "IStackerCrane.cs", |
| | | "DocumentMoniker": "D:\\Git\\ShanMeiXinNengYuan\\Code\\WCS\\WIDESEAWCS_Server\\WIDESEAWCS_QuartzJob\\StackerCrane\\IStackerCrane.cs", |
| | | "RelativeDocumentMoniker": "WIDESEAWCS_QuartzJob\\StackerCrane\\IStackerCrane.cs", |
| | | "ToolTip": "D:\\Git\\ShanMeiXinNengYuan\\Code\\WCS\\WIDESEAWCS_Server\\WIDESEAWCS_QuartzJob\\StackerCrane\\IStackerCrane.cs", |
| | | "RelativeToolTip": "WIDESEAWCS_QuartzJob\\StackerCrane\\IStackerCrane.cs", |
| | | "ViewState": "AgIAAAAAAAAAAAAAAAAAAEUAAAAVAAAAAAAAAA==", |
| | | "Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|", |
| | | "WhenOpened": "2026-02-05T01:33:41.091Z", |
| | | "EditorCaption": "" |
| | | }, |
| | | { |
| | | "$type": "Document", |
| | | "DocumentIndex": 5, |
| | | "Title": "TcpSocketServer.cs", |
| | | "DocumentMoniker": "D:\\Git\\ShanMeiXinNengYuan\\Code\\WCS\\WIDESEAWCS_Server\\WIDESEAWCS_Tasks\\SocketServer\\TcpSocketServer.cs", |
| | | "RelativeDocumentMoniker": "WIDESEAWCS_Tasks\\SocketServer\\TcpSocketServer.cs", |
| | | "ToolTip": "D:\\Git\\ShanMeiXinNengYuan\\Code\\WCS\\WIDESEAWCS_Server\\WIDESEAWCS_Tasks\\SocketServer\\TcpSocketServer.cs", |
| | | "RelativeToolTip": "WIDESEAWCS_Tasks\\SocketServer\\TcpSocketServer.cs", |
| | | "ViewState": "AgIAAB8AAAAAAAAAAAAmwDsAAABaAAAAAAAAAA==", |
| | | "Title": "SpeFormationStackerCrane.cs", |
| | | "DocumentMoniker": "D:\\Git\\ShanMeiXinNengYuan\\Code\\WCS\\WIDESEAWCS_Server\\WIDESEAWCS_QuartzJob\\StackerCrane\\Spec\\SpeFormationStackerCrane.cs", |
| | | "RelativeDocumentMoniker": "WIDESEAWCS_QuartzJob\\StackerCrane\\Spec\\SpeFormationStackerCrane.cs", |
| | | "ToolTip": "D:\\Git\\ShanMeiXinNengYuan\\Code\\WCS\\WIDESEAWCS_Server\\WIDESEAWCS_QuartzJob\\StackerCrane\\Spec\\SpeFormationStackerCrane.cs", |
| | | "RelativeToolTip": "WIDESEAWCS_QuartzJob\\StackerCrane\\Spec\\SpeFormationStackerCrane.cs", |
| | | "ViewState": "AgIAAJgBAAAAAAAAAAAmwAAAAAAAAAAAAAAAAA==", |
| | | "Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|", |
| | | "WhenOpened": "2026-02-02T03:37:56.495Z", |
| | | "WhenOpened": "2026-02-05T01:32:15.17Z", |
| | | "EditorCaption": "" |
| | | }, |
| | | { |
| | | "$type": "Document", |
| | | "DocumentIndex": 2, |
| | | "Title": "TcpSocketServer.Clients.cs", |
| | | "DocumentMoniker": "D:\\Git\\ShanMeiXinNengYuan\\Code\\WCS\\WIDESEAWCS_Server\\WIDESEAWCS_Tasks\\SocketServer\\TcpSocketServer.Clients.cs", |
| | | "RelativeDocumentMoniker": "WIDESEAWCS_Tasks\\SocketServer\\TcpSocketServer.Clients.cs", |
| | | "ToolTip": "D:\\Git\\ShanMeiXinNengYuan\\Code\\WCS\\WIDESEAWCS_Server\\WIDESEAWCS_Tasks\\SocketServer\\TcpSocketServer.Clients.cs", |
| | | "RelativeToolTip": "WIDESEAWCS_Tasks\\SocketServer\\TcpSocketServer.Clients.cs", |
| | | "ViewState": "AgIAAEQAAAAAAAAAAAAkwGAAAAAAAAAAAAAAAA==", |
| | | "DocumentIndex": 10, |
| | | "Title": "FormationCommonStackerCraneJob.cs", |
| | | "DocumentMoniker": "D:\\Git\\ShanMeiXinNengYuan\\Code\\WCS\\WIDESEAWCS_Server\\WIDESEAWCS_Tasks\\FormationStackerCraneJob\\FormationCommonStackerCraneJob.cs", |
| | | "RelativeDocumentMoniker": "WIDESEAWCS_Tasks\\FormationStackerCraneJob\\FormationCommonStackerCraneJob.cs", |
| | | "ToolTip": "D:\\Git\\ShanMeiXinNengYuan\\Code\\WCS\\WIDESEAWCS_Server\\WIDESEAWCS_Tasks\\FormationStackerCraneJob\\FormationCommonStackerCraneJob.cs", |
| | | "RelativeToolTip": "WIDESEAWCS_Tasks\\FormationStackerCraneJob\\FormationCommonStackerCraneJob.cs", |
| | | "ViewState": "AgIAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA==", |
| | | "Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|", |
| | | "WhenOpened": "2026-02-02T03:37:53.636Z", |
| | | "WhenOpened": "2026-02-05T01:25:52.745Z", |
| | | "EditorCaption": "" |
| | | }, |
| | | { |
| | | "$type": "Document", |
| | | "DocumentIndex": 9, |
| | | "Title": "StackerCraneBase.cs", |
| | | "DocumentMoniker": "D:\\Git\\ShanMeiXinNengYuan\\Code\\WCS\\WIDESEAWCS_Server\\WIDESEAWCS_QuartzJob\\StackerCrane\\Common\\StackerCraneBase.cs", |
| | | "RelativeDocumentMoniker": "WIDESEAWCS_QuartzJob\\StackerCrane\\Common\\StackerCraneBase.cs", |
| | | "ToolTip": "D:\\Git\\ShanMeiXinNengYuan\\Code\\WCS\\WIDESEAWCS_Server\\WIDESEAWCS_QuartzJob\\StackerCrane\\Common\\StackerCraneBase.cs", |
| | | "RelativeToolTip": "WIDESEAWCS_QuartzJob\\StackerCrane\\Common\\StackerCraneBase.cs", |
| | | "ViewState": "AgIAAAMAAAAAAAAAAAAAABoAAAAAAAAAAAAAAA==", |
| | | "Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|", |
| | | "WhenOpened": "2026-02-04T09:07:44.097Z", |
| | | "EditorCaption": "" |
| | | }, |
| | | { |
| | | "$type": "Document", |
| | | "DocumentIndex": 6, |
| | | "Title": "TcpSocketServer.Server.cs", |
| | | "DocumentMoniker": "D:\\Git\\ShanMeiXinNengYuan\\Code\\WCS\\WIDESEAWCS_Server\\WIDESEAWCS_Tasks\\SocketServer\\TcpSocketServer.Server.cs", |
| | | "RelativeDocumentMoniker": "WIDESEAWCS_Tasks\\SocketServer\\TcpSocketServer.Server.cs", |
| | | "ToolTip": "D:\\Git\\ShanMeiXinNengYuan\\Code\\WCS\\WIDESEAWCS_Server\\WIDESEAWCS_Tasks\\SocketServer\\TcpSocketServer.Server.cs", |
| | | "RelativeToolTip": "WIDESEAWCS_Tasks\\SocketServer\\TcpSocketServer.Server.cs", |
| | | "ViewState": "AgIAAAAAAAAAAAAAAAAAAGwAAAAAAAAAAAAAAA==", |
| | | "Title": "CommonStackerCrane.cs", |
| | | "DocumentMoniker": "D:\\Git\\ShanMeiXinNengYuan\\Code\\WCS\\WIDESEAWCS_Server\\WIDESEAWCS_QuartzJob\\StackerCrane\\Common\\CommonStackerCrane.cs", |
| | | "RelativeDocumentMoniker": "WIDESEAWCS_QuartzJob\\StackerCrane\\Common\\CommonStackerCrane.cs", |
| | | "ToolTip": "D:\\Git\\ShanMeiXinNengYuan\\Code\\WCS\\WIDESEAWCS_Server\\WIDESEAWCS_QuartzJob\\StackerCrane\\Common\\CommonStackerCrane.cs", |
| | | "RelativeToolTip": "WIDESEAWCS_QuartzJob\\StackerCrane\\Common\\CommonStackerCrane.cs", |
| | | "ViewState": "AgIAAJUAAAAAAAAAAAAuwKIAAABXAAAAAAAAAA==", |
| | | "Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|", |
| | | "WhenOpened": "2026-02-02T03:37:49.526Z", |
| | | "WhenOpened": "2026-02-04T09:07:35.823Z", |
| | | "EditorCaption": "" |
| | | }, |
| | | { |
| | | "$type": "Document", |
| | | "DocumentIndex": 0, |
| | | "Title": "CommonStackerCraneJob.cs", |
| | | "DocumentMoniker": "D:\\Git\\ShanMeiXinNengYuan\\Code\\WCS\\WIDESEAWCS_Server\\WIDESEAWCS_Tasks\\StackerCraneJob\\CommonStackerCraneJob.cs", |
| | | "RelativeDocumentMoniker": "WIDESEAWCS_Tasks\\StackerCraneJob\\CommonStackerCraneJob.cs", |
| | | "ToolTip": "D:\\Git\\ShanMeiXinNengYuan\\Code\\WCS\\WIDESEAWCS_Server\\WIDESEAWCS_Tasks\\StackerCraneJob\\CommonStackerCraneJob.cs", |
| | | "RelativeToolTip": "WIDESEAWCS_Tasks\\StackerCraneJob\\CommonStackerCraneJob.cs", |
| | | "ViewState": "AgIAACoAAAAAAAAAAAAkwDwAAABIAAAAAAAAAA==", |
| | | "Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|", |
| | | "WhenOpened": "2026-02-04T07:48:56.632Z", |
| | | "EditorCaption": "" |
| | | } |
| | | ] |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | using HslCommunication; |
| | | using System; |
| | | using System.Collections.Generic; |
| | | using System.ComponentModel; |
| | | using System.Linq; |
| | | using System.Text; |
| | | using System.Threading.Tasks; |
| | | using WIDESEAWCS_Communicator; |
| | | using WIDESEAWCS_QuartzJob.DeviceBase; |
| | | using WIDESEAWCS_QuartzJob.DTO; |
| | | |
| | | namespace WIDESEAWCS_QuartzJob |
| | | { |
| | | /// <summary> |
| | | /// æææº |
| | | /// </summary> |
| | | [Description("æææº")] |
| | | public class ConstraintMachine : IConstraintMachine |
| | | { |
| | | #region Private Member |
| | | /// <summary> |
| | | /// æææºé讯对象 |
| | | /// </summary> |
| | | private readonly BaseCommunicator _communicator; |
| | | |
| | | /// <summary> |
| | | /// æææºåè®®ä¿¡æ¯ |
| | | /// </summary> |
| | | private readonly List<DeviceProDTO> _deviceProDTOs; |
| | | |
| | | /// <summary> |
| | | /// æææºåè®®æç»ä¿¡æ¯ |
| | | /// </summary> |
| | | private readonly List<DeviceProtocolDetailDTO> _deviceProtocolDetailDTOs; |
| | | |
| | | /// <summary> |
| | | /// 设å¤ç¼å· |
| | | /// </summary> |
| | | public readonly string _deviceCode; |
| | | |
| | | /// <summary> |
| | | /// 设å¤åç§° |
| | | /// </summary> |
| | | public readonly string _deviceName; |
| | | |
| | | private bool _heartStatr = true; |
| | | |
| | | private bool _isConnected = true; |
| | | #endregion |
| | | |
| | | #region Public Member |
| | | /// <summary> |
| | | /// é讯对象 |
| | | /// </summary> |
| | | public BaseCommunicator Communicator => _communicator; |
| | | |
| | | /// <summary> |
| | | /// åè®®ä¿¡æ¯ |
| | | /// </summary> |
| | | public List<DeviceProDTO> DeviceProDTOs => _deviceProDTOs; |
| | | |
| | | /// <summary> |
| | | /// è¾é线åè®®æç»ä¿¡æ¯ |
| | | /// </summary> |
| | | public List<DeviceProtocolDetailDTO> DeviceProtocolDetailDTOs => _deviceProtocolDetailDTOs; |
| | | |
| | | /// <summary> |
| | | /// 设å¤ç¼å· |
| | | /// </summary> |
| | | public string DeviceCode => _deviceCode; |
| | | |
| | | /// <summary> |
| | | /// 设å¤åç§° |
| | | /// </summary> |
| | | public string DeviceName => _deviceName; |
| | | |
| | | /// <summary> |
| | | /// è®¾å¤æ¯å¦å·²è¿æ¥ |
| | | /// </summary> |
| | | public bool IsConnected => Communicator.IsConnected && _isConnected; |
| | | #endregion |
| | | |
| | | #region Constructor Function |
| | | /// <summary> |
| | | /// æé 彿° |
| | | /// </summary> |
| | | /// <param name="communicator">设å¤é讯对象</param> |
| | | /// <param name="deviceProDTOs">设å¤å议信æ¯</param> |
| | | /// <param name="deviceProtocolDetailDTOs">设å¤åè®®æç»ä¿¡æ¯</param> |
| | | /// <param name="deviceCode">设å¤ç¼å·</param> |
| | | /// <param name="deviceName">设å¤åç§°</param> |
| | | public ConstraintMachine(BaseCommunicator communicator, List<DeviceProDTO> deviceProDTOs, List<DeviceProtocolDetailDTO> deviceProtocolDetailDTOs, string deviceCode, string deviceName) |
| | | { |
| | | _communicator = communicator; |
| | | _deviceProDTOs = deviceProDTOs; |
| | | _deviceProtocolDetailDTOs = deviceProtocolDetailDTOs; |
| | | _deviceCode = deviceCode; |
| | | _deviceName = deviceName; |
| | | CheckConnect(); |
| | | } |
| | | #endregion |
| | | |
| | | #region Private Method |
| | | private void CheckConnect() |
| | | { |
| | | Task.Run(() => |
| | | { |
| | | while (_heartStatr) |
| | | { |
| | | try |
| | | { |
| | | DeviceProDTO? devicePro = _deviceProDTOs.FirstOrDefault(); |
| | | if (devicePro == null) |
| | | _isConnected = false; |
| | | else |
| | | Communicator.ReadAsObj(devicePro.DeviceProAddress, devicePro.DeviceDataType); |
| | | _isConnected = true; |
| | | } |
| | | catch (Exception ex) |
| | | { |
| | | _isConnected = false; |
| | | } |
| | | Thread.Sleep(500); |
| | | } |
| | | }); |
| | | } |
| | | #endregion |
| | | |
| | | #region Public Method |
| | | /// <summary> |
| | | /// 读åPLCåè®®å°åçæ°æ® |
| | | /// </summary> |
| | | /// <typeparam name="TEnum">å议信æ¯çæä¸¾å¯¹è±¡ä¿¡æ¯ã</typeparam> |
| | | /// <typeparam name="TResult">è¯»åæ°æ®çç±»å对象信æ¯ã</typeparam> |
| | | /// <param name="value">æä¸¾å¼</param> |
| | | /// <returns>读åå°çæ°æ®</returns> |
| | | public TResult GetValue<TEnum, TResult>(TEnum value) where TEnum : Enum |
| | | { |
| | | if (!IsConnected) throw new Exception($"éè®¯è¿æ¥é误ï¼è¯·æ£æ¥ç½ç»"); |
| | | DeviceProDTO? devicePro = _deviceProDTOs.FirstOrDefault(x => x.DeviceProParamName == value.ToString()); |
| | | return devicePro == null ? throw new Exception($"è¯»åæ°æ®é误,æªå¨å议信æ¯é颿¾å°åæ°{value.ToString()}") : (TResult)Communicator.ReadAsObj(devicePro.DeviceProAddress, devicePro.DeviceDataType); |
| | | } |
| | | |
| | | /// <summary> |
| | | /// 读åPLCåè®®å°åçæ°æ® |
| | | /// </summary> |
| | | /// <typeparam name="TEnum">å议信æ¯çæä¸¾å¯¹è±¡ä¿¡æ¯ã</typeparam> |
| | | /// <typeparam name="TResult">è¯»åæ°æ®çç±»å对象信æ¯ã</typeparam> |
| | | /// <param name="value">æä¸¾å¼</param> |
| | | /// <param name="deviceChildCode">设å¤åç¼å·</param> |
| | | /// <returns>读åå°çæ°æ®</returns> |
| | | public TResult GetValue<TEnum, TResult>(TEnum value, string deviceChildCode) where TEnum : Enum |
| | | { |
| | | if (!IsConnected) throw new Exception($"éè®¯è¿æ¥é误ï¼è¯·æ£æ¥ç½ç»"); |
| | | DeviceProDTO? devicePro = _deviceProDTOs.FirstOrDefault(x => x.DeviceProParamName == value.ToString() && x.DeviceChildCode == deviceChildCode); |
| | | return devicePro == null ? throw new Exception($"è¯»åæ°æ®é误,æªå¨å议信æ¯é颿¾å°åæ°{value.ToString()}") : (TResult)Communicator.ReadAsObj(devicePro.DeviceProAddress, devicePro.DeviceDataType); |
| | | } |
| | | |
| | | /// <summary> |
| | | /// ä¸è®¾å¤çå¿è·³ |
| | | /// </summary> |
| | | public void Heartbeat() |
| | | { |
| | | } |
| | | |
| | | /// <summary> |
| | | /// æ ¹æ®åæ°åç§°ã设å¤åç¼å·åå
¥å¯¹åºçæ°æ®ã |
| | | /// </summary> |
| | | /// <typeparam name="TEnum">åæ°åç§°æä¸¾ç±»åã</typeparam> |
| | | /// <typeparam name="TValue">è¦åå
¥çæ°æ®ç±»åã</typeparam> |
| | | /// <param name="enum">åæ°åç§°ã</param> |
| | | /// <param name="value">è¦åå
¥çæ°æ®ã</param> |
| | | /// <param name="deviceChildCode">设å¤åç¼å·å</param> |
| | | /// <returns>è¿ååå
¥æåæå¤±è´¥</returns> |
| | | public bool SetValue<TEnum, TValue>(TEnum @enum, TValue value, string deviceChildCode) |
| | | where TEnum : Enum |
| | | where TValue : notnull |
| | | { |
| | | if (!IsConnected) throw new Exception($"éè®¯è¿æ¥é误ï¼è¯·æ£æ¥ç½ç»"); |
| | | DeviceProDTO? devicePro = _deviceProDTOs.FirstOrDefault(x => x.DeviceProParamName == @enum.ToString() && x.DeviceChildCode == deviceChildCode); |
| | | return devicePro == null ? throw new Exception($"åå
¥æ°æ®é误,æªå¨å议信æ¯é颿¾å°åæ°{value.ToString()}") : Communicator.WriteObj(devicePro.DeviceProAddress, devicePro.DeviceDataType, value); |
| | | } |
| | | |
| | | /// <summary> |
| | | /// æ ¹æ®åæ°åç§°åå
¥æææºå¯¹åºçæ°æ®ã |
| | | /// </summary> |
| | | /// <typeparam name="TEnum">åæ°åç§°æä¸¾ç±»åã</typeparam> |
| | | /// <typeparam name="TValue">è¦åå
¥çæ°æ®ç±»åã</typeparam> |
| | | /// <param name="enum">åæ°åç§°ã</param> |
| | | /// <param name="value">è¦åå
¥çæ°æ®ã</param> |
| | | /// <returns>è¿ååå
¥æåæå¤±è´¥</returns> |
| | | /// <exception cref="Exception"></exception> |
| | | public bool SetValue<TEnum, TValue>(TEnum @enum, TValue value) |
| | | where TEnum : Enum |
| | | where TValue : notnull |
| | | { |
| | | if (!IsConnected) throw new Exception($"éè®¯è¿æ¥é误ï¼è¯·æ£æ¥ç½ç»"); |
| | | DeviceProDTO? devicePro = _deviceProDTOs.FirstOrDefault(x => x.DeviceProParamName == @enum.ToString()); |
| | | return devicePro == null ? throw new Exception($"åå
¥æ°æ®é误,æªå¨å议信æ¯é颿¾å°åæ°{value.ToString()}") : Communicator.WriteObj(devicePro.DeviceProAddress, devicePro.DeviceDataType, value); |
| | | } |
| | | |
| | | /// <summary> |
| | | /// éæ¾å¯¹è±¡ |
| | | /// </summary> |
| | | public void Dispose() |
| | | { |
| | | _heartStatr = false; |
| | | _communicator.Dispose(); |
| | | GC.SuppressFinalize(this); |
| | | } |
| | | #endregion |
| | | } |
| | | } |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | using System; |
| | | using System.Collections.Generic; |
| | | using System.Linq; |
| | | using System.Text; |
| | | using System.Threading.Tasks; |
| | | using WIDESEAWCS_Communicator; |
| | | using WIDESEAWCS_QuartzJob.DeviceBase; |
| | | using WIDESEAWCS_QuartzJob.DTO; |
| | | |
| | | namespace WIDESEAWCS_QuartzJob |
| | | { |
| | | /// <summary> |
| | | /// æææº |
| | | /// </summary> |
| | | public interface IConstraintMachine : IDevice |
| | | { |
| | | /// <summary> |
| | | /// è®¾å¤æ¯å¦å·²è¿æ¥ |
| | | /// </summary> |
| | | bool IsConnected { get; } |
| | | |
| | | /// <summary> |
| | | /// 读åPLCåè®®å°åçæ°æ® |
| | | /// </summary> |
| | | /// <typeparam name="TEnum">å议信æ¯çæä¸¾å¯¹è±¡ä¿¡æ¯ã</typeparam> |
| | | /// <typeparam name="TResult">è¯»åæ°æ®çç±»å对象信æ¯ã</typeparam> |
| | | /// <param name="value">æä¸¾å¼</param> |
| | | /// <returns>读åå°çæ°æ®</returns> |
| | | TResult GetValue<TEnum, TResult>(TEnum value) where TEnum : Enum; |
| | | |
| | | /// <summary> |
| | | /// æ ¹æ®åæ°åç§°åå
¥å åæºå¯¹åºçæ°æ®ã |
| | | /// </summary> |
| | | /// <typeparam name="TEnum">åæ°åç§°æä¸¾ç±»åã</typeparam> |
| | | /// <typeparam name="TValue">è¦åå
¥çæ°æ®ç±»åã</typeparam> |
| | | /// <param name="enum">åæ°åç§°ã</param> |
| | | /// <param name="value">è¦åå
¥çæ°æ®ã</param> |
| | | /// <returns>è¿ååå
¥æåæå¤±è´¥</returns> |
| | | /// <exception cref="Exception"></exception> |
| | | bool SetValue<TEnum, TValue>(TEnum @enum, TValue value) where TEnum : Enum where TValue : notnull; |
| | | |
| | | /// <summary> |
| | | /// 读åPLCåè®®å°åçæ°æ® |
| | | /// </summary> |
| | | /// <typeparam name="TEnum">å议信æ¯çæä¸¾å¯¹è±¡ä¿¡æ¯ã</typeparam> |
| | | /// <typeparam name="TResult">è¯»åæ°æ®çç±»å对象信æ¯ã</typeparam> |
| | | /// <param name="value">æä¸¾å¼</param> |
| | | /// <param name="deviceChildCode">设å¤åç¼å·</param> |
| | | /// <returns>读åå°çæ°æ®</returns> |
| | | TResult GetValue<TEnum, TResult>(TEnum value, string deviceChildCode) where TEnum : Enum; |
| | | |
| | | /// <summary> |
| | | /// æ ¹æ®åæ°åç§°ã设å¤åç¼å·åå
¥å¯¹åºçæ°æ®ã |
| | | /// </summary> |
| | | /// <typeparam name="TEnum">åæ°åç§°æä¸¾ç±»åã</typeparam> |
| | | /// <typeparam name="TValue">è¦åå
¥çæ°æ®ç±»åã</typeparam> |
| | | /// <param name="enum">åæ°åç§°ã</param> |
| | | /// <param name="value">è¦åå
¥çæ°æ®ã</param> |
| | | /// <param name="deviceChildCode">设å¤åç¼å·å</param> |
| | | /// <returns>è¿ååå
¥æåæå¤±è´¥</returns> |
| | | bool SetValue<TEnum, TValue>(TEnum @enum, TValue value, string deviceChildCode) where TEnum : Enum where TValue : notnull; |
| | | } |
| | | } |
| | |
| | | public class DeviceProtocolDetailDTO |
| | | { |
| | | /// <summary> |
| | | /// 设å¤ID |
| | | /// </summary> |
| | | public int DeviceId { get; set; } |
| | | |
| | | /// <summary> |
| | | /// 设å¤ç±»å |
| | | /// </summary> |
| | | public string DeviceType { get; set; } |
| | |
| | | public int Id { get; set; } |
| | | |
| | | /// <summary> |
| | | /// 设å¤Id |
| | | /// </summary> |
| | | [ImporterHeader(Name = "设å¤Id")] |
| | | [ExporterHeader(DisplayName = "设å¤Id")] |
| | | [SugarColumn(IsNullable = false, ColumnDescription = "设å¤Id")] |
| | | public int DeviceId { get; set; } |
| | | |
| | | /// <summary> |
| | | /// 设å¤ç±»å |
| | | /// </summary> |
| | | [ImporterHeader(Name = "设å¤ç±»å")] |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | using System; |
| | | using System.Collections.Generic; |
| | | using System.Linq; |
| | | using System.Text; |
| | | using System.Threading.Tasks; |
| | | using WIDESEAWCS_Communicator; |
| | | using WIDESEAWCS_QuartzJob.DeviceBase; |
| | | using WIDESEAWCS_QuartzJob.DTO; |
| | | |
| | | namespace WIDESEAWCS_QuartzJob |
| | | { |
| | | /// <summary> |
| | | /// æææº |
| | | /// </summary> |
| | | public interface IPinMachine : IDevice |
| | | { |
| | | /// <summary> |
| | | /// è®¾å¤æ¯å¦å·²è¿æ¥ |
| | | /// </summary> |
| | | bool IsConnected { get; } |
| | | |
| | | /// <summary> |
| | | /// 读åPLCåè®®å°åçæ°æ® |
| | | /// </summary> |
| | | /// <typeparam name="TEnum">å议信æ¯çæä¸¾å¯¹è±¡ä¿¡æ¯ã</typeparam> |
| | | /// <typeparam name="TResult">è¯»åæ°æ®çç±»å对象信æ¯ã</typeparam> |
| | | /// <param name="value">æä¸¾å¼</param> |
| | | /// <returns>读åå°çæ°æ®</returns> |
| | | TResult GetValue<TEnum, TResult>(TEnum value) where TEnum : Enum; |
| | | |
| | | /// <summary> |
| | | /// æ ¹æ®åæ°åç§°åå
¥å åæºå¯¹åºçæ°æ®ã |
| | | /// </summary> |
| | | /// <typeparam name="TEnum">åæ°åç§°æä¸¾ç±»åã</typeparam> |
| | | /// <typeparam name="TValue">è¦åå
¥çæ°æ®ç±»åã</typeparam> |
| | | /// <param name="enum">åæ°åç§°ã</param> |
| | | /// <param name="value">è¦åå
¥çæ°æ®ã</param> |
| | | /// <returns>è¿ååå
¥æåæå¤±è´¥</returns> |
| | | /// <exception cref="Exception"></exception> |
| | | bool SetValue<TEnum, TValue>(TEnum @enum, TValue value) where TEnum : Enum where TValue : notnull; |
| | | |
| | | /// <summary> |
| | | /// 读åPLCåè®®å°åçæ°æ® |
| | | /// </summary> |
| | | /// <typeparam name="TEnum">å议信æ¯çæä¸¾å¯¹è±¡ä¿¡æ¯ã</typeparam> |
| | | /// <typeparam name="TResult">è¯»åæ°æ®çç±»å对象信æ¯ã</typeparam> |
| | | /// <param name="value">æä¸¾å¼</param> |
| | | /// <param name="deviceChildCode">设å¤åç¼å·</param> |
| | | /// <returns>读åå°çæ°æ®</returns> |
| | | TResult GetValue<TEnum, TResult>(TEnum value, string deviceChildCode) where TEnum : Enum; |
| | | |
| | | /// <summary> |
| | | /// æ ¹æ®åæ°åç§°ã设å¤åç¼å·åå
¥å¯¹åºçæ°æ®ã |
| | | /// </summary> |
| | | /// <typeparam name="TEnum">åæ°åç§°æä¸¾ç±»åã</typeparam> |
| | | /// <typeparam name="TValue">è¦åå
¥çæ°æ®ç±»åã</typeparam> |
| | | /// <param name="enum">åæ°åç§°ã</param> |
| | | /// <param name="value">è¦åå
¥çæ°æ®ã</param> |
| | | /// <param name="deviceChildCode">设å¤åç¼å·å</param> |
| | | /// <returns>è¿ååå
¥æåæå¤±è´¥</returns> |
| | | bool SetValue<TEnum, TValue>(TEnum @enum, TValue value, string deviceChildCode) where TEnum : Enum where TValue : notnull; |
| | | } |
| | | } |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | using HslCommunication; |
| | | using System; |
| | | using System.Collections.Generic; |
| | | using System.ComponentModel; |
| | | using System.Linq; |
| | | using System.Text; |
| | | using System.Threading.Tasks; |
| | | using WIDESEAWCS_Communicator; |
| | | using WIDESEAWCS_QuartzJob.DeviceBase; |
| | | using WIDESEAWCS_QuartzJob.DTO; |
| | | |
| | | namespace WIDESEAWCS_QuartzJob |
| | | { |
| | | /// <summary> |
| | | /// ææéæº |
| | | /// </summary> |
| | | [Description("ææéæº")] |
| | | public class PinMachine : IPinMachine |
| | | { |
| | | #region Private Member |
| | | /// <summary> |
| | | /// æææºé讯对象 |
| | | /// </summary> |
| | | private readonly BaseCommunicator _communicator; |
| | | |
| | | /// <summary> |
| | | /// æææºåè®®ä¿¡æ¯ |
| | | /// </summary> |
| | | private readonly List<DeviceProDTO> _deviceProDTOs; |
| | | |
| | | /// <summary> |
| | | /// æææºåè®®æç»ä¿¡æ¯ |
| | | /// </summary> |
| | | private readonly List<DeviceProtocolDetailDTO> _deviceProtocolDetailDTOs; |
| | | |
| | | /// <summary> |
| | | /// 设å¤ç¼å· |
| | | /// </summary> |
| | | public readonly string _deviceCode; |
| | | |
| | | /// <summary> |
| | | /// 设å¤åç§° |
| | | /// </summary> |
| | | public readonly string _deviceName; |
| | | |
| | | private bool _heartStatr = true; |
| | | |
| | | private bool _isConnected = true; |
| | | #endregion |
| | | |
| | | #region Public Member |
| | | /// <summary> |
| | | /// é讯对象 |
| | | /// </summary> |
| | | public BaseCommunicator Communicator => _communicator; |
| | | |
| | | /// <summary> |
| | | /// åè®®ä¿¡æ¯ |
| | | /// </summary> |
| | | public List<DeviceProDTO> DeviceProDTOs => _deviceProDTOs; |
| | | |
| | | /// <summary> |
| | | /// è¾é线åè®®æç»ä¿¡æ¯ |
| | | /// </summary> |
| | | public List<DeviceProtocolDetailDTO> DeviceProtocolDetailDTOs => _deviceProtocolDetailDTOs; |
| | | |
| | | /// <summary> |
| | | /// 设å¤ç¼å· |
| | | /// </summary> |
| | | public string DeviceCode => _deviceCode; |
| | | |
| | | /// <summary> |
| | | /// 设å¤åç§° |
| | | /// </summary> |
| | | public string DeviceName => _deviceName; |
| | | |
| | | /// <summary> |
| | | /// è®¾å¤æ¯å¦å·²è¿æ¥ |
| | | /// </summary> |
| | | public bool IsConnected => Communicator.IsConnected && _isConnected; |
| | | #endregion |
| | | |
| | | #region Constructor Function |
| | | /// <summary> |
| | | /// æé 彿° |
| | | /// </summary> |
| | | /// <param name="communicator">设å¤é讯对象</param> |
| | | /// <param name="deviceProDTOs">设å¤å议信æ¯</param> |
| | | /// <param name="deviceProtocolDetailDTOs">设å¤åè®®æç»ä¿¡æ¯</param> |
| | | /// <param name="deviceCode">设å¤ç¼å·</param> |
| | | /// <param name="deviceName">设å¤åç§°</param> |
| | | public PinMachine(BaseCommunicator communicator, List<DeviceProDTO> deviceProDTOs, List<DeviceProtocolDetailDTO> deviceProtocolDetailDTOs, string deviceCode, string deviceName) |
| | | { |
| | | _communicator = communicator; |
| | | _deviceProDTOs = deviceProDTOs; |
| | | _deviceProtocolDetailDTOs = deviceProtocolDetailDTOs; |
| | | _deviceCode = deviceCode; |
| | | _deviceName = deviceName; |
| | | CheckConnect(); |
| | | } |
| | | #endregion |
| | | |
| | | #region Private Method |
| | | private void CheckConnect() |
| | | { |
| | | Task.Run(() => |
| | | { |
| | | while (_heartStatr) |
| | | { |
| | | try |
| | | { |
| | | DeviceProDTO? devicePro = _deviceProDTOs.FirstOrDefault(); |
| | | if (devicePro == null) |
| | | _isConnected = false; |
| | | else |
| | | Communicator.ReadAsObj(devicePro.DeviceProAddress, devicePro.DeviceDataType); |
| | | _isConnected = true; |
| | | } |
| | | catch (Exception ex) |
| | | { |
| | | _isConnected = false; |
| | | } |
| | | Thread.Sleep(500); |
| | | } |
| | | }); |
| | | } |
| | | #endregion |
| | | |
| | | #region Public Method |
| | | /// <summary> |
| | | /// 读åPLCåè®®å°åçæ°æ® |
| | | /// </summary> |
| | | /// <typeparam name="TEnum">å议信æ¯çæä¸¾å¯¹è±¡ä¿¡æ¯ã</typeparam> |
| | | /// <typeparam name="TResult">è¯»åæ°æ®çç±»å对象信æ¯ã</typeparam> |
| | | /// <param name="value">æä¸¾å¼</param> |
| | | /// <returns>读åå°çæ°æ®</returns> |
| | | public TResult GetValue<TEnum, TResult>(TEnum value) where TEnum : Enum |
| | | { |
| | | if (!IsConnected) throw new Exception($"éè®¯è¿æ¥é误ï¼è¯·æ£æ¥ç½ç»"); |
| | | DeviceProDTO? devicePro = _deviceProDTOs.FirstOrDefault(x => x.DeviceProParamName == value.ToString()); |
| | | return devicePro == null ? throw new Exception($"è¯»åæ°æ®é误,æªå¨å议信æ¯é颿¾å°åæ°{value.ToString()}") : (TResult)Communicator.ReadAsObj(devicePro.DeviceProAddress, devicePro.DeviceDataType); |
| | | } |
| | | |
| | | /// <summary> |
| | | /// 读åPLCåè®®å°åçæ°æ® |
| | | /// </summary> |
| | | /// <typeparam name="TEnum">å议信æ¯çæä¸¾å¯¹è±¡ä¿¡æ¯ã</typeparam> |
| | | /// <typeparam name="TResult">è¯»åæ°æ®çç±»å对象信æ¯ã</typeparam> |
| | | /// <param name="value">æä¸¾å¼</param> |
| | | /// <param name="deviceChildCode">设å¤åç¼å·</param> |
| | | /// <returns>读åå°çæ°æ®</returns> |
| | | public TResult GetValue<TEnum, TResult>(TEnum value, string deviceChildCode) where TEnum : Enum |
| | | { |
| | | if (!IsConnected) throw new Exception($"éè®¯è¿æ¥é误ï¼è¯·æ£æ¥ç½ç»"); |
| | | DeviceProDTO? devicePro = _deviceProDTOs.FirstOrDefault(x => x.DeviceProParamName == value.ToString() && x.DeviceChildCode == deviceChildCode); |
| | | return devicePro == null ? throw new Exception($"è¯»åæ°æ®é误,æªå¨å议信æ¯é颿¾å°åæ°{value.ToString()}") : (TResult)Communicator.ReadAsObj(devicePro.DeviceProAddress, devicePro.DeviceDataType); |
| | | } |
| | | |
| | | /// <summary> |
| | | /// ä¸è®¾å¤çå¿è·³ |
| | | /// </summary> |
| | | public void Heartbeat() |
| | | { |
| | | } |
| | | |
| | | /// <summary> |
| | | /// æ ¹æ®åæ°åç§°ã设å¤åç¼å·åå
¥å¯¹åºçæ°æ®ã |
| | | /// </summary> |
| | | /// <typeparam name="TEnum">åæ°åç§°æä¸¾ç±»åã</typeparam> |
| | | /// <typeparam name="TValue">è¦åå
¥çæ°æ®ç±»åã</typeparam> |
| | | /// <param name="enum">åæ°åç§°ã</param> |
| | | /// <param name="value">è¦åå
¥çæ°æ®ã</param> |
| | | /// <param name="deviceChildCode">设å¤åç¼å·å</param> |
| | | /// <returns>è¿ååå
¥æåæå¤±è´¥</returns> |
| | | public bool SetValue<TEnum, TValue>(TEnum @enum, TValue value, string deviceChildCode) |
| | | where TEnum : Enum |
| | | where TValue : notnull |
| | | { |
| | | if (!IsConnected) throw new Exception($"éè®¯è¿æ¥é误ï¼è¯·æ£æ¥ç½ç»"); |
| | | DeviceProDTO? devicePro = _deviceProDTOs.FirstOrDefault(x => x.DeviceProParamName == @enum.ToString() && x.DeviceChildCode == deviceChildCode); |
| | | return devicePro == null ? throw new Exception($"åå
¥æ°æ®é误,æªå¨å议信æ¯é颿¾å°åæ°{value.ToString()}") : Communicator.WriteObj(devicePro.DeviceProAddress, devicePro.DeviceDataType, value); |
| | | } |
| | | |
| | | /// <summary> |
| | | /// æ ¹æ®åæ°åç§°åå
¥æææºå¯¹åºçæ°æ®ã |
| | | /// </summary> |
| | | /// <typeparam name="TEnum">åæ°åç§°æä¸¾ç±»åã</typeparam> |
| | | /// <typeparam name="TValue">è¦åå
¥çæ°æ®ç±»åã</typeparam> |
| | | /// <param name="enum">åæ°åç§°ã</param> |
| | | /// <param name="value">è¦åå
¥çæ°æ®ã</param> |
| | | /// <returns>è¿ååå
¥æåæå¤±è´¥</returns> |
| | | /// <exception cref="Exception"></exception> |
| | | public bool SetValue<TEnum, TValue>(TEnum @enum, TValue value) |
| | | where TEnum : Enum |
| | | where TValue : notnull |
| | | { |
| | | if (!IsConnected) throw new Exception($"éè®¯è¿æ¥é误ï¼è¯·æ£æ¥ç½ç»"); |
| | | DeviceProDTO? devicePro = _deviceProDTOs.FirstOrDefault(x => x.DeviceProParamName == @enum.ToString()); |
| | | return devicePro == null ? throw new Exception($"åå
¥æ°æ®é误,æªå¨å议信æ¯é颿¾å°åæ°{value.ToString()}") : Communicator.WriteObj(devicePro.DeviceProAddress, devicePro.DeviceDataType, value); |
| | | } |
| | | |
| | | /// <summary> |
| | | /// éæ¾å¯¹è±¡ |
| | | /// </summary> |
| | | public void Dispose() |
| | | { |
| | | _heartStatr = false; |
| | | _communicator.Dispose(); |
| | | GC.SuppressFinalize(this); |
| | | } |
| | | #endregion |
| | | } |
| | | } |
| | |
| | | { |
| | | try |
| | | { |
| | | if (!x.DeviceName.Contains("æºæ¢°æ")) |
| | | if (!x.DevicePlcType.Contains("Socket")) |
| | | { |
| | | #region è¿æ¥PLC |
| | | |
| | |
| | | }).ToList(); |
| | | |
| | | // æ ¹æ®è®¾å¤ç±»åè·å设å¤å议详æ
|
| | | List<DeviceProtocolDetailDTO> deviceProtocolDetails = _deviceProtocolDetailService.GetDeviceProtocolDetailsByDeviceType(x.DeviceType); |
| | | List<DeviceProtocolDetailDTO> deviceProtocolDetails = _deviceProtocolDetailService.GetDeviceProtocolDetailsByDeviceId(x.Id); |
| | | |
| | | // å 载设å¤ç¨åºé |
| | | Assembly assemblyDevice = Assembly.Load($"WIDESEAWCS_QuartzJob"); |
| | |
| | | }); |
| | | for (int i = 0; i < dispatches.Count; i++) |
| | | { |
| | | var targetDevice = deviceInfos.FirstOrDefault(x => x.Id == dispatches[i].Id); |
| | | var targetDevice = deviceInfos.FirstOrDefault(x => x.DispatchId == dispatches[i].Id); |
| | | |
| | | if (targetDevice is null) continue; |
| | | |
| | | // ä½¿ç¨æ¨¡å¼å¹é
|
| | | dispatches[i].JobParams = targetDevice switch |
| | | { |
| | | { DeviceName: var name } when name.Contains("æºæ¢°æ") |
| | | { DevicePlcType: var type } when type.Contains("Socket") |
| | | => new RobotCraneDevice { DeviceCode = targetDevice.DeviceCode, DeviceName = targetDevice.DeviceName, IPAddress = targetDevice.DeviceIp + ":" + targetDevice.DevicePort }, |
| | | _ => targetDevice.Device |
| | | }; |
| | |
| | | { |
| | | return BaseDal.QueryData(x => x.DeviceType == deviceType).Select(x => new DeviceProtocolDetailDTO { DeviceType = x.DeviceType, DeviceProParamName = x.DeviceProParamName, ProtocalDetailValue = x.ProtocalDetailValue, ProtocolDetailDes = x.ProtocolDetailDes, ProtocolDetailType = x.ProtocolDetailType }).ToList(); |
| | | } |
| | | |
| | | |
| | | /// <summary> |
| | | /// æ ¹æ®è®¾å¤IDè·ååè®®æç»ä¿¡æ¯ |
| | | /// </summary> |
| | | /// <param name="deviceId">设å¤ID</param> |
| | | /// <returns>è¿å设å¤åè®®æç»DTOéå</returns> |
| | | public List<DeviceProtocolDetailDTO> GetDeviceProtocolDetailsByDeviceId(int deviceId) |
| | | { |
| | | return BaseDal.QueryData(x => x.DeviceId == deviceId).Select(x => new DeviceProtocolDetailDTO { DeviceId = x.DeviceId, DeviceProParamName = x.DeviceProParamName, ProtocalDetailValue = x.ProtocalDetailValue, ProtocolDetailDes = x.ProtocolDetailDes, ProtocolDetailType = x.ProtocolDetailType }).ToList(); |
| | | } |
| | | } |
| | | } |
| | |
| | | /// <param name="deviceType">设å¤ç±»å</param> |
| | | /// <returns>è¿å设å¤åè®®æç»DTOéå</returns> |
| | | List<DeviceProtocolDetailDTO> GetDeviceProtocolDetailsByDeviceType(string deviceType); |
| | | |
| | | |
| | | /// <summary> |
| | | /// æ ¹æ®è®¾å¤IDè·ååè®®æç»ä¿¡æ¯ |
| | | /// </summary> |
| | | /// <param name="deviceId">设å¤ID</param> |
| | | /// <returns>è¿å设å¤åè®®æç»DTOéå</returns> |
| | | public List<DeviceProtocolDetailDTO> GetDeviceProtocolDetailsByDeviceId(int deviceId); |
| | | } |
| | | } |
| | |
| | | List<Dt_Router> QueryNextRoutes(string startPosi, string endPosi, int routeType); |
| | | |
| | | /// <summary> |
| | | /// æ ¹æ®èµ·ç¹è·åä¸ä¸ä¸ªå个åèç¹è·¯ç± |
| | | /// æ ¹æ®èµ·ç¹/å½åä½ç½®è·åä¸ä¸ä¸ªå个åèç¹è·¯ç± |
| | | /// </summary> |
| | | /// <param name="startPosi">èµ·ç¹/å½åä½ç½®</param> |
| | | /// <returns>è¿åä¸ä¸ä¸ªè·¯ç±èç¹ï¼å¦ææ²¡æåè¿ånull</returns> |
| | | public Dt_Router QueryNextRoute(string startPosi); |
| | | |
| | | /// <summary> |
| | | /// æ ¹æ®èµ·ç¹åè·¯ç±ç±»åè·åä¸ä¸ä¸ªå个åèç¹è·¯ç± |
| | | /// æ ¹æ®èµ·ç¹/å½åä½ç½®åè·¯ç±ç±»åè·åä¸ä¸ä¸ªå个åèç¹è·¯ç± |
| | | /// </summary> |
| | | /// <param name="startPosi">èµ·ç¹/å½åä½ç½®</param> |
| | | /// <param name="routeType">è·¯ç±ç±»å</param> |
| | |
| | | public Dt_Router QueryNextRoute(string startPosi, int routeType); |
| | | |
| | | /// <summary> |
| | | /// æ ¹æ®èµ·ç¹ãç»ç¹æ¹ååè·¯ç±ç±»åè·åä¸ä¸ä¸ªå个åèç¹è·¯ç±ï¼æºè½éæ©æåç»ç¹çè·¯ç±ï¼ |
| | | /// æ ¹æ®èµ·ç¹/å½åä½ç½®ãç»ç¹æ¹ååè·¯ç±ç±»åè·åä¸ä¸ä¸ªå个åèç¹è·¯ç±ï¼æºè½éæ©æåç»ç¹çè·¯ç±ï¼ |
| | | /// </summary> |
| | | /// <param name="startPosi">èµ·ç¹/å½åä½ç½®</param> |
| | | /// <param name="endPosi">ç»ç¹ä½ç½®ï¼ç¨äºæ¹å夿ï¼</param> |
| | |
| | | using WIDESEAWCS_QuartzJob.DeviceBase; |
| | | using WIDESEAWCS_QuartzJob.DTO; |
| | | using WIDESEAWCS_QuartzJob.StackerCrane; |
| | | using WIDESEAWCS_QuartzJob.StackerCrane.Common; |
| | | using WIDESEAWCS_QuartzJob.StackerCrane.Enum; |
| | | |
| | | namespace WIDESEAWCS_QuartzJob |
| | |
| | | /// ä¸è¬å åæºå®ç°ç±»ï¼å®ç°å åæºæ¥å£å± |
| | | /// </summary> |
| | | [Description("å åæº")] |
| | | public class CommonStackerCrane : IStackerCrane |
| | | public class CommonStackerCrane : StackerCraneBase, IStackerCrane |
| | | { |
| | | #region Private Member |
| | | |
| | |
| | | public bool IsConnected => Communicator.IsConnected && _isConnected; |
| | | |
| | | /// <summary> |
| | | /// å åæºå®æäºä»¶æ¯å¦å·²è®¢é
|
| | | /// </summary> |
| | | public bool IsEventSubscribed => StackerCraneTaskCompletedEventHandler != null; |
| | | |
| | | /// <summary> |
| | | /// å åæºä»»å¡å®æäºä»¶ |
| | | /// </summary> |
| | | public event EventHandler<StackerCraneTaskCompletedEventArgs> StackerCraneTaskCompletedEventHandler; |
| | |
| | | /// </summary> |
| | | public object StackerCraneTaskCommand { get; set; } |
| | | |
| | | /// <summary> |
| | | /// å åæºå®æäºä»¶æ¯å¦å·²è®¢é
|
| | | /// </summary> |
| | | public bool IsEventSubscribed => StackerCraneTaskCompletedEventHandler != null; |
| | | |
| | | /// <summary> |
| | | /// ä¸ä¸æ¬¡ä»»å¡çç±»å |
| | |
| | | _isChecked = true; |
| | | try |
| | | { |
| | | DeviceProDTO? devicePro = _deviceProDTOs.FirstOrDefault(x => x.DeviceProParamName == nameof(StackerCraneWorkStatus)); |
| | | DeviceProDTO? devicePro = _deviceProDTOs.FirstOrDefault(x => x.DeviceProParamName == nameof(StackerCraneCompleted)); |
| | | if (devicePro != null) |
| | | { |
| | | DeviceProtocolDetailDTO? deviceProtocolDetail = _deviceProtocolDetailDTOs.FirstOrDefault(x => x.DeviceProParamName == devicePro.DeviceProParamName && x.ProtocolDetailType == StackerCraneWorkStatus.WorkCompleted.ToString()); |
| | | DeviceProtocolDetailDTO? deviceProtocolDetail = _deviceProtocolDetailDTOs.FirstOrDefault(x => x.DeviceProParamName == devicePro.DeviceProParamName && x.ProtocolDetailType == StackerCraneCompleted.Completed.ToString()); |
| | | if (deviceProtocolDetail != null) |
| | | { |
| | | OperateResult<TimeSpan> operateResult = new OperateResult<TimeSpan>(); |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | using System; |
| | | using System.Collections.Generic; |
| | | using System.Linq; |
| | | using System.Text; |
| | | using System.Threading.Tasks; |
| | | using WIDESEAWCS_Communicator; |
| | | using WIDESEAWCS_QuartzJob.DTO; |
| | | |
| | | namespace WIDESEAWCS_QuartzJob.StackerCrane.Common |
| | | { |
| | | public interface IStackerCraneBase |
| | | { |
| | | public bool IsCanSendTask(BaseCommunicator communicator, List<DeviceProDTO> DeviceProDTOs, List<DeviceProtocolDetailDTO> DeviceProtocolDetailDTOs); |
| | | |
| | | |
| | | public bool IsCanSendTask(BaseCommunicator communicator, List<DeviceProDTO> DeviceProDTOs, List<DeviceProtocolDetailDTO> DeviceProtocolDetailDTOs, params string[] suffixes); |
| | | |
| | | |
| | | } |
| | | } |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | using System; |
| | | using System.Collections.Generic; |
| | | using System.Linq; |
| | | using WIDESEAWCS_Communicator; |
| | | using WIDESEAWCS_QuartzJob.DTO; |
| | | |
| | | namespace WIDESEAWCS_QuartzJob.StackerCrane.Common |
| | | { |
| | | public class StackerCraneBase : IStackerCraneBase |
| | | { |
| | | public bool IsCanSendTask(BaseCommunicator communicator, List<DeviceProDTO> DeviceProDTOs, List<DeviceProtocolDetailDTO> DeviceProtocolDetailDTOs) |
| | | { |
| | | List<string> paramNames = ResolveDefaultParamNames(DeviceProDTOs, DeviceProtocolDetailDTOs); |
| | | if (paramNames.Count == 0) |
| | | { |
| | | return false; |
| | | } |
| | | |
| | | return IsCanSendTaskByParamNames(communicator, DeviceProDTOs, DeviceProtocolDetailDTOs, paramNames); |
| | | } |
| | | |
| | | public bool IsCanSendTask(BaseCommunicator communicator, List<DeviceProDTO> DeviceProDTOs, List<DeviceProtocolDetailDTO> DeviceProtocolDetailDTOs, params string[] suffixes) |
| | | { |
| | | if (suffixes == null || suffixes.Length == 0) |
| | | { |
| | | return false; |
| | | } |
| | | |
| | | List<string> paramNames = new List<string>(suffixes.Length); |
| | | foreach (string suffix in suffixes) |
| | | { |
| | | string? paramName = ResolveParamName(DeviceProDTOs, DeviceProtocolDetailDTOs, suffix); |
| | | if (paramName == null) |
| | | { |
| | | return false; |
| | | } |
| | | |
| | | paramNames.Add(paramName); |
| | | } |
| | | |
| | | return IsCanSendTaskByParamNames(communicator, DeviceProDTOs, DeviceProtocolDetailDTOs, paramNames); |
| | | } |
| | | |
| | | private static List<string> ResolveDefaultParamNames(List<DeviceProDTO> deviceProDTOs, List<DeviceProtocolDetailDTO> deviceProtocolDetailDTOs) |
| | | { |
| | | List<string> paramNames = new List<string>(); |
| | | foreach (var devicePro in deviceProDTOs) |
| | | { |
| | | if (!devicePro.DeviceProParamName.Contains("StackerCrane", StringComparison.Ordinal)) |
| | | { |
| | | continue; |
| | | } |
| | | |
| | | if (!devicePro.DeviceProParamName.EndsWith("Status", StringComparison.Ordinal)) |
| | | { |
| | | continue; |
| | | } |
| | | |
| | | if (deviceProtocolDetailDTOs.Any(x => x.DeviceProParamName == devicePro.DeviceProParamName)) |
| | | { |
| | | paramNames.Add(devicePro.DeviceProParamName); |
| | | } |
| | | } |
| | | |
| | | return paramNames; |
| | | } |
| | | |
| | | private bool IsCanSendTaskByParamNames(BaseCommunicator communicator, List<DeviceProDTO> DeviceProDTOs, List<DeviceProtocolDetailDTO> DeviceProtocolDetailDTOs, List<string> paramNames) |
| | | { |
| | | for (int i = 0; i < paramNames.Count; i++) |
| | | { |
| | | DeviceProDTO? devicePro = DeviceProDTOs.FirstOrDefault(x => x.DeviceProParamName == paramNames[i]); |
| | | if (devicePro == null) |
| | | { |
| | | throw new Exception(); |
| | | } |
| | | |
| | | DeviceProtocolDetailDTO? deviceProtocolDetail = DeviceProtocolDetailDTOs.FirstOrDefault(x => x.DeviceProParamName == paramNames[i]); |
| | | if (deviceProtocolDetail == null) |
| | | { |
| | | throw new Exception(); |
| | | } |
| | | |
| | | object obj = communicator.ReadAsObj(devicePro.DeviceProAddress, devicePro.DeviceDataType); |
| | | |
| | | if (!(obj?.ToString() ?? "").Equals(deviceProtocolDetail.ProtocalDetailValue)) |
| | | { |
| | | return false; |
| | | } |
| | | } |
| | | |
| | | return true; |
| | | } |
| | | |
| | | private static string? ResolveParamName(List<DeviceProDTO> deviceProDTOs, List<DeviceProtocolDetailDTO> deviceProtocolDetailDTOs, string suffix) |
| | | { |
| | | foreach (var devicePro in deviceProDTOs) |
| | | { |
| | | if (!devicePro.DeviceProParamName.EndsWith(suffix, StringComparison.Ordinal)) |
| | | { |
| | | continue; |
| | | } |
| | | |
| | | if (deviceProtocolDetailDTOs.Any(x => x.DeviceProParamName == devicePro.DeviceProParamName)) |
| | | { |
| | | return devicePro.DeviceProParamName; |
| | | } |
| | | } |
| | | |
| | | return null; |
| | | } |
| | | } |
| | | } |
| | |
| | | #region << ç æ¬ 注 é >> |
| | | |
| | | /*---------------------------------------------------------------- |
| | | * å½å空é´ï¼WIDESEAWCS_QuartzJob |
| | | * å建è
ï¼è¡ç«¥åº |
| | |
| | | * ä¿®æ¹æ¶é´ï¼ |
| | | * çæ¬ï¼V1.0.1 |
| | | * ä¿®æ¹è¯´æï¼ |
| | | * |
| | | * |
| | | *----------------------------------------------------------------*/ |
| | | |
| | | #endregion << ç æ¬ 注 é >> |
| | | |
| | | using System; |
| | |
| | | [Description("æªç¥")] |
| | | Unkonw |
| | | } |
| | | } |
| | | |
| | | /// <summary> |
| | | /// ä»»å¡å®æç¶ææä¸¾ |
| | | /// </summary> |
| | | public enum StackerCraneCompleted |
| | | { |
| | | /// <summary> |
| | | /// æªå®æ |
| | | /// </summary> |
| | | [Description("æªå®æ")] |
| | | NotCompleted, |
| | | |
| | | /// <summary> |
| | | /// 已宿 |
| | | /// </summary> |
| | | [Description("已宿")] |
| | | Completed, |
| | | |
| | | /// <summary> |
| | | /// å¼å¸¸å®æ |
| | | /// </summary> |
| | | [Description("å¼å¸¸å®æ")] |
| | | AbnormalCompleted |
| | | } |
| | | } |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | #region << ç æ¬ 注 é >> |
| | | |
| | | /*---------------------------------------------------------------- |
| | | * å½å空é´ï¼WIDESEAWCS_QuartzJob |
| | | * å建è
ï¼è¡ç«¥åº |
| | | * å建æ¶é´ï¼2024/8/2 16:13:36 |
| | | * çæ¬ï¼V1.0.0 |
| | | * æè¿°ï¼å åæºç¶ææä¸¾ |
| | | * |
| | | * ---------------------------------------------------------------- |
| | | * ä¿®æ¹äººï¼ |
| | | * ä¿®æ¹æ¶é´ï¼ |
| | | * çæ¬ï¼V1.0.1 |
| | | * ä¿®æ¹è¯´æï¼ |
| | | * |
| | | *----------------------------------------------------------------*/ |
| | | |
| | | #endregion << ç æ¬ 注 é >> |
| | | |
| | | using System.ComponentModel; |
| | | |
| | | namespace WIDESEAWCS_QuartzJob.StackerCrane.Enum |
| | | { |
| | | /// <summary> |
| | | /// å åæºç¶ææä¸¾ |
| | | /// </summary> |
| | | public enum TemperatureStackerCraneStatus |
| | | { |
| | | /// <summary> |
| | | /// æªç¥ |
| | | /// </summary> |
| | | [Description("æªç¥")] |
| | | Unkonw, |
| | | |
| | | /// <summary> |
| | | /// æ£å¸¸ |
| | | /// </summary> |
| | | [Description("æ£å¸¸")] |
| | | Normal, |
| | | } |
| | | |
| | | /// <summary> |
| | | /// å åæºæèªå¨ç¶ææä¸¾ |
| | | /// </summary> |
| | | public enum TemperatureStackerCraneAutoStatus |
| | | { |
| | | /// <summary> |
| | | /// æ æ¨¡å¼ |
| | | /// </summary> |
| | | [Description("æªç¥")] |
| | | Unkonw, |
| | | |
| | | /// <summary> |
| | | /// æªç¥ |
| | | /// </summary> |
| | | [Description("æªç¥")] |
| | | Unkonw1, |
| | | |
| | | /// <summary> |
| | | /// ç»´ä¿®/ç»´æ¤/ä¿å
» |
| | | /// </summary> |
| | | [Description("ç»´ä¿®")] |
| | | Maintenance, |
| | | |
| | | /// <summary> |
| | | /// æå¨ |
| | | /// </summary> |
| | | [Description("æå¨")] |
| | | Manual, |
| | | |
| | | /// <summary> |
| | | /// åèªå¨ |
| | | /// </summary> |
| | | [Description("åèªå¨")] |
| | | SemiAutomatic, |
| | | |
| | | /// <summary> |
| | | /// èªå¨ |
| | | /// </summary> |
| | | [Description("èªå¨")] |
| | | Automatic |
| | | } |
| | | |
| | | /// <summary> |
| | | /// å åæºå·¥ä½ç¶ææä¸¾ |
| | | /// </summary> |
| | | public enum TemperatureStackerCraneWorkStatus |
| | | { |
| | | /// <summary> |
| | | /// æªç¥ |
| | | /// </summary> |
| | | [Description("æªç¥")] |
| | | Unkonw, |
| | | |
| | | /// <summary> |
| | | /// å¾
æº |
| | | /// </summary> |
| | | [Description("å¾
æº")] |
| | | Standby, |
| | | |
| | | /// <summary> |
| | | /// æ¥æ¶ä»»å¡ |
| | | /// </summary> |
| | | [Description("æ¥æ¶ä»»å¡")] |
| | | ReceiveTask, |
| | | |
| | | /// <summary> |
| | | /// åè´§ç§»å¨ |
| | | /// </summary> |
| | | [Description("åè´§ç§»å¨")] |
| | | PickUpMoving, |
| | | |
| | | /// <summary> |
| | | /// åè´§ä¸ |
| | | /// </summary> |
| | | [Description("åè´§ä¸")] |
| | | PickUp, |
| | | |
| | | /// <summary> |
| | | /// æªç¥ |
| | | /// </summary> |
| | | [Description("æªç¥")] |
| | | Unkonw1, |
| | | |
| | | /// <summary> |
| | | /// æ¾è´§ç§»å¨ |
| | | /// </summary> |
| | | [Description("æ¾è´§ç§»å¨")] |
| | | PutUpMoving, |
| | | |
| | | /// <summary> |
| | | /// æ¾è´§ä¸ |
| | | /// </summary> |
| | | [Description("æ¾è´§ä¸")] |
| | | Putting, |
| | | |
| | | /// <summary> |
| | | /// æ¾è´§å®æ |
| | | /// </summary> |
| | | [Description("æ¾è´§å®æ")] |
| | | PutCompleted, |
| | | } |
| | | } |
| | |
| | | #region << ç æ¬ 注 é >> |
| | | |
| | | /*---------------------------------------------------------------- |
| | | * å½å空é´ï¼WIDESEAWCS_QuartzJob |
| | | * å建è
ï¼è¡ç«¥åº |
| | |
| | | * ä¿®æ¹æ¶é´ï¼ |
| | | * çæ¬ï¼V1.0.1 |
| | | * ä¿®æ¹è¯´æï¼ |
| | | * |
| | | * |
| | | *----------------------------------------------------------------*/ |
| | | |
| | | #endregion << ç æ¬ 注 é >> |
| | | |
| | | using HslCommunication; |
| | |
| | | using WIDESEAWCS_QuartzJob.DeviceBase; |
| | | using WIDESEAWCS_QuartzJob.DTO; |
| | | using WIDESEAWCS_QuartzJob.StackerCrane; |
| | | using WIDESEAWCS_QuartzJob.StackerCrane.Common; |
| | | |
| | | namespace WIDESEAWCS_QuartzJob |
| | | { |
| | | /// <summary> |
| | | /// å åæºæ¥å£å± |
| | | /// </summary> |
| | | public interface IStackerCrane : IDevice |
| | | public interface IStackerCrane : IStackerCraneBase, IDevice |
| | | { |
| | | /// <summary> |
| | | /// è®¾å¤æ¯å¦å·²è¿æ¥ |
| | |
| | | void Heartbeat(); |
| | | |
| | | /// <summary> |
| | | /// å åæºå®æäºä»¶æ¯å¦å·²è®¢é
|
| | | /// </summary> |
| | | bool IsEventSubscribed { get; } |
| | | |
| | | /// <summary> |
| | | /// å åæºä»»å¡å®æäºä»¶ |
| | | /// </summary> |
| | | event EventHandler<StackerCraneTaskCompletedEventArgs> StackerCraneTaskCompletedEventHandler; |
| | | |
| | | /// <summary> |
| | | /// çæµå åæºä»»å¡æ¯å¦å®æ(鲿¢ä»»å¡å®æäºä»¶çæµè¶
æ¶ï¼å®ä¹æå¨è§¦ååè½) |
| | | /// </summary> |
| | | public void CheckStackerCraneTaskCompleted(); |
| | | |
| | | /// <summary> |
| | | /// åéä»»å¡å½ä»¤ |
| | | /// </summary> |
| | | /// <param name="command">ä»»å¡å½ä»¤</param> |
| | |
| | | /// <returns>è¿ååå
¥æåæå¤±è´¥</returns> |
| | | /// <exception cref="Exception"></exception> |
| | | bool SetValue<TEnum, TValue>(TEnum @enum, TValue value) where TEnum : Enum where TValue : notnull; |
| | | |
| | | } |
| | | } |
| | | } |
| | |
| | | using WIDESEAWCS_QuartzJob.DTO; |
| | | using WIDESEAWCS_QuartzJob.StackerCrane; |
| | | using WIDESEAWCS_QuartzJob.StackerCrane.Enum; |
| | | using WIDESEAWCS_QuartzJob.StackerCrane.Common; |
| | | |
| | | namespace WIDESEAWCS_QuartzJob |
| | | { |
| | |
| | | /// èªå®ä¹å åæº |
| | | /// </summary> |
| | | [Description("åæå容å åæº")] |
| | | public class SpeFormationStackerCrane : IStackerCrane |
| | | public class SpeFormationStackerCrane : StackerCraneBase, IStackerCrane |
| | | { |
| | | #region Private Member |
| | | |
| | |
| | | public object StackerCraneTaskCommand { get; set; } |
| | | |
| | | /// <summary> |
| | | /// å åæºä»»å¡å®æäºä»¶ |
| | | /// </summary> |
| | | public event EventHandler<StackerCraneTaskCompletedEventArgs> StackerCraneTaskCompletedEventHandler; |
| | | |
| | | /// <summary> |
| | | /// å åæºå®æäºä»¶æ¯å¦å·²è®¢é
|
| | | /// </summary> |
| | | public bool IsEventSubscribed => StackerCraneTaskCompletedEventHandler != null; |
| | | |
| | | /// <summary> |
| | | /// å åæºä»»å¡å®æäºä»¶ |
| | | /// </summary> |
| | | public event EventHandler<StackerCraneTaskCompletedEventArgs> StackerCraneTaskCompletedEventHandler; |
| | | |
| | | #endregion Public Member |
| | | |
| | | #region Constructor Function |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | using HslCommunication; |
| | | using System.ComponentModel; |
| | | using System.Reflection; |
| | | using WIDESEAWCS_Communicator; |
| | | using WIDESEAWCS_QuartzJob.DeviceBase; |
| | | using WIDESEAWCS_QuartzJob.DTO; |
| | | using WIDESEAWCS_QuartzJob.StackerCrane; |
| | | using WIDESEAWCS_QuartzJob.StackerCrane.Enum; |
| | | using WIDESEAWCS_QuartzJob.StackerCrane.Common; |
| | | |
| | | namespace WIDESEAWCS_QuartzJob |
| | | { |
| | | /// <summary> |
| | | /// èªå®ä¹å åæº |
| | | /// </summary> |
| | | [Description("é«å¸¸æ¸©å åæº")] |
| | | public class SpeTemperatureStackerCrane : StackerCraneBase, IStackerCrane |
| | | { |
| | | #region Private Member |
| | | |
| | | /// <summary> |
| | | /// å åæºé讯对象 |
| | | /// </summary> |
| | | private BaseCommunicator _communicator; |
| | | |
| | | /// <summary> |
| | | /// å åæºåè®®ä¿¡æ¯ |
| | | /// </summary> |
| | | private readonly List<DeviceProDTO> _deviceProDTOs; |
| | | |
| | | /// <summary> |
| | | /// å åæºåè®®æç»ä¿¡æ¯ |
| | | /// </summary> |
| | | private readonly List<DeviceProtocolDetailDTO> _deviceProtocolDetailDTOs; |
| | | |
| | | /// <summary> |
| | | /// 设å¤ç¼å· |
| | | /// </summary> |
| | | public readonly string _deviceCode; |
| | | |
| | | /// <summary> |
| | | /// 设å¤åç§° |
| | | /// </summary> |
| | | public readonly string _deviceName; |
| | | |
| | | /// <summary> |
| | | /// ä¸ä¸æ¬¡ä»»å¡å· |
| | | /// </summary> |
| | | private int _lastTaskNum; |
| | | |
| | | private bool _isChecked = false; |
| | | |
| | | private bool _heartStart = true; |
| | | |
| | | private bool _isConnected = true; |
| | | |
| | | #endregion Private Member |
| | | |
| | | #region Public Member |
| | | |
| | | /// <summary> |
| | | /// é讯对象 |
| | | /// </summary> |
| | | public BaseCommunicator Communicator => _communicator; |
| | | |
| | | /// <summary> |
| | | /// é讯åè®®ä¿¡æ¯ |
| | | /// </summary> |
| | | public List<DeviceProDTO> DeviceProDTOs => _deviceProDTOs; |
| | | |
| | | /// <summary> |
| | | /// é讯åè®®æç»ä¿¡æ¯ |
| | | /// </summary> |
| | | public List<DeviceProtocolDetailDTO> DeviceProtocolDetailDTOs => _deviceProtocolDetailDTOs; |
| | | |
| | | /// <summary> |
| | | /// å åæºç¶æ |
| | | /// </summary> |
| | | public TemperatureStackerCraneStatus StackerCraneStatusValue => GetStackerCraneStatus(); |
| | | |
| | | /// <summary> |
| | | /// å åæºç¶æä¸æè¯´æ |
| | | /// </summary> |
| | | public string StackerCraneStatusDes => GetEnumDes(StackerCraneStatusValue); |
| | | |
| | | /// <summary> |
| | | /// æèªå¨ç¶æ |
| | | /// </summary> |
| | | public TemperatureStackerCraneAutoStatus StackerCraneAutoStatusValue => GetStackerCraneAutoStatus(); |
| | | |
| | | /// <summary> |
| | | /// ä½ä¸ç¶æ |
| | | /// </summary> |
| | | public TemperatureStackerCraneWorkStatus StackerCraneWorkStatusValue => GetStackerCraneWorkStatus(); |
| | | |
| | | /// <summary> |
| | | /// ä½ä¸ç¶æä¸æè¯´æ |
| | | /// </summary> |
| | | public string StackerCraneWorkStatusDes => GetEnumDes(StackerCraneWorkStatusValue); |
| | | |
| | | /// <summary> |
| | | /// ä¸ä¸æ¬¡æ§è¡çä»»å¡å· |
| | | /// </summary> |
| | | public int LastTaskNum => _lastTaskNum; |
| | | |
| | | /// <summary> |
| | | /// å½åæ£å¨æ§è¡çä»»å¡å· |
| | | /// </summary> |
| | | public int CurrentTaskNum => GetCurrentTaskNum(); |
| | | |
| | | /// <summary> |
| | | /// ä¸ä¸æ¬¡æ§è¡çä»»å¡ç±»å |
| | | /// </summary> |
| | | public int? LastTaskType { get; set; } = null; |
| | | |
| | | /// <summary> |
| | | /// 设å¤ç¼å· |
| | | /// </summary> |
| | | public string DeviceCode => _deviceCode; |
| | | |
| | | /// <summary> |
| | | /// 设å¤åç§° |
| | | /// </summary> |
| | | public string DeviceName => _deviceName; |
| | | |
| | | /// <summary> |
| | | /// è®¾å¤æ¯å¦å·²è¿æ¥ |
| | | /// </summary> |
| | | public bool IsConnected => Communicator.IsConnected && _isConnected; |
| | | |
| | | /// <summary> |
| | | /// å åæºä»»å¡å½ä»¤ |
| | | /// </summary> |
| | | public object StackerCraneTaskCommand { get; set; } |
| | | |
| | | /// <summary> |
| | | /// å åæºå®æäºä»¶æ¯å¦å·²è®¢é
|
| | | /// </summary> |
| | | public bool IsEventSubscribed => StackerCraneTaskCompletedEventHandler != null; |
| | | |
| | | /// <summary> |
| | | /// å åæºä»»å¡å®æäºä»¶ |
| | | /// </summary> |
| | | public event EventHandler<StackerCraneTaskCompletedEventArgs> StackerCraneTaskCompletedEventHandler; |
| | | |
| | | #endregion Public Member |
| | | |
| | | #region Constructor Function |
| | | |
| | | /// <summary> |
| | | /// æé 彿° |
| | | /// </summary> |
| | | /// <param name="communicator">å åæºé讯对象</param> |
| | | /// <param name="deviceProDTOs">å åæºå议信æ¯</param> |
| | | /// <param name="deviceProtocolDetailDTOs">å åæºåè®®æç»ä¿¡æ¯</param> |
| | | /// <param name="deviceCode">设å¤ç¼å·</param> |
| | | /// <param name="deviceName">设å¤åç§°</param> |
| | | public SpeTemperatureStackerCrane(BaseCommunicator communicator, List<DeviceProDTO> deviceProDTOs, List<DeviceProtocolDetailDTO> deviceProtocolDetailDTOs, string deviceCode, string deviceName) |
| | | { |
| | | _communicator = communicator; |
| | | _deviceProDTOs = deviceProDTOs; |
| | | _deviceProtocolDetailDTOs = deviceProtocolDetailDTOs; |
| | | _deviceCode = deviceCode; |
| | | _deviceName = deviceName; |
| | | CheckConnect(); |
| | | } |
| | | |
| | | #endregion Constructor Function |
| | | |
| | | #region Private Method |
| | | |
| | | private object GetStatus(string protocolParamType) |
| | | { |
| | | if (!Communicator.IsConnected) |
| | | { |
| | | return StackerCraneStatus.Unkonw.ToString(); |
| | | } |
| | | |
| | | List<DeviceProDTO> devicePros = _deviceProDTOs.Where(x => x.DeviceProParamType == protocolParamType).ToList(); |
| | | if (devicePros.Count == 0) |
| | | { |
| | | throw new Exception($"æªè·åå°å议信æ¯ï¼åè®®åæ°ç±»åï¼{protocolParamType}"); |
| | | } |
| | | |
| | | foreach (var devicePro in devicePros) |
| | | { |
| | | object readStatus = Communicator.ReadAsObj(devicePro.DeviceProAddress, devicePro.DeviceDataType); |
| | | |
| | | DeviceProtocolDetailDTO? deviceProtocolDetail = _deviceProtocolDetailDTOs.FirstOrDefault( |
| | | x => x.DeviceProParamName == devicePro.DeviceProParamType |
| | | && x.ProtocalDetailValue.Equals(readStatus.ToString())); |
| | | |
| | | if (deviceProtocolDetail != null) |
| | | { |
| | | return Convert.ToInt32(readStatus); |
| | | } |
| | | } |
| | | |
| | | return StackerCraneStatus.Unkonw.ToString(); |
| | | } |
| | | |
| | | /// <summary> |
| | | /// è·åå åæºè®¾å¤ç¶æ |
| | | /// </summary> |
| | | /// <returns></returns> |
| | | private TemperatureStackerCraneStatus GetStackerCraneStatus() |
| | | { |
| | | return (TemperatureStackerCraneStatus)GetStatus(nameof(TemperatureStackerCraneStatus)); |
| | | } |
| | | |
| | | /// <summary> |
| | | /// è·åå åæºæèªå¨ç¶æ |
| | | /// </summary> |
| | | /// <returns></returns> |
| | | private TemperatureStackerCraneAutoStatus GetStackerCraneAutoStatus() |
| | | { |
| | | return (TemperatureStackerCraneAutoStatus)GetStatus(nameof(TemperatureStackerCraneWorkStatus)); |
| | | } |
| | | |
| | | /// <summary> |
| | | /// è·åå åæºå·¥ä½ç¶æ |
| | | /// </summary> |
| | | /// <returns></returns> |
| | | private TemperatureStackerCraneWorkStatus GetStackerCraneWorkStatus() |
| | | { |
| | | return (TemperatureStackerCraneWorkStatus)GetStatus(nameof(TemperatureStackerCraneWorkStatus)); |
| | | } |
| | | |
| | | |
| | | |
| | | /// <summary> |
| | | /// è·åæä¸¾è¯´æ |
| | | /// </summary> |
| | | /// <typeparam name="T">æä¸¾æ³å</typeparam> |
| | | /// <param name="value"></param> |
| | | /// <returns></returns> |
| | | private string GetEnumDes<T>(T value) where T : Enum |
| | | { |
| | | FieldInfo? fieldInfo = typeof(T).GetField(value.ToString()); |
| | | if (fieldInfo != null) |
| | | { |
| | | DescriptionAttribute? descriptionAttribute = fieldInfo.GetCustomAttribute<DescriptionAttribute>(); |
| | | if (descriptionAttribute != null) |
| | | { |
| | | return descriptionAttribute.Description; |
| | | } |
| | | return "æªå®ä¹"; |
| | | } |
| | | return "æªç¥"; |
| | | } |
| | | |
| | | private int GetCurrentTaskNum() |
| | | { |
| | | DeviceProDTO? devicePro = _deviceProDTOs.FirstOrDefault(x => x.DeviceProParamName == nameof(CurrentTaskNum)); |
| | | return devicePro == null ? throw new Exception($"读åå½åä»»å¡å·é误,æªè·åå°å议信æ¯,è¯·æ£æ¥é
ç½®åæ°åç§°æ¯å¦é
ç½®,ä¸é
置为{nameof(CurrentTaskNum)}") : (int)Communicator.ReadAsObj(devicePro.DeviceProAddress, devicePro.DeviceDataType); |
| | | } |
| | | |
| | | private void CheckConnect() |
| | | { |
| | | Task.Run(() => |
| | | { |
| | | while (_heartStart) |
| | | { |
| | | try |
| | | { |
| | | DeviceProDTO? devicePro = _deviceProDTOs.FirstOrDefault(); |
| | | if (devicePro == null) |
| | | { |
| | | _isConnected = false; |
| | | } |
| | | else |
| | | { |
| | | Communicator.ReadAsObj(devicePro.DeviceProAddress, devicePro.DeviceDataType); |
| | | _isConnected = true; |
| | | } |
| | | } |
| | | catch (Exception ex) |
| | | { |
| | | _isConnected = false; |
| | | } |
| | | Thread.Sleep(500); |
| | | } |
| | | }); |
| | | } |
| | | |
| | | #endregion Private Method |
| | | |
| | | #region Public Method |
| | | |
| | | /// <summary> |
| | | /// è·åå åæºç¶æ |
| | | /// </summary> |
| | | public T GetStackerCraneStatus<T>() where T : notnull, Enum |
| | | { |
| | | return (T)GetStatus(typeof(T).Name); |
| | | } |
| | | |
| | | /// <summary> |
| | | /// éæ¾å¯¹è±¡ |
| | | /// </summary> |
| | | public void Dispose() |
| | | { |
| | | _heartStart = false; |
| | | _communicator.Dispose(); |
| | | GC.SuppressFinalize(this); |
| | | } |
| | | |
| | | /// <summary> |
| | | /// æ ¹æ®åæ°å称读åå åæºå¯¹åºçæ°æ®ã |
| | | /// </summary> |
| | | /// <typeparam name="TEnum">åæ°åç§°æä¸¾ç±»åã</typeparam> |
| | | /// <typeparam name="TResult">读åç»æçè¿åå¼ç±»åã</typeparam> |
| | | /// <param name="value">åæ°åç§°ã</param> |
| | | /// <returns>è¿å读åå°çæ°æ®ã</returns> |
| | | /// <exception cref="Exception"></exception> |
| | | public TResult GetValue<TEnum, TResult>(TEnum value) where TEnum : Enum |
| | | { |
| | | if (!IsConnected) throw new Exception($"éè®¯è¿æ¥é误ï¼è¯·æ£æ¥ç½ç»"); |
| | | DeviceProDTO? devicePro = _deviceProDTOs.FirstOrDefault(x => x.DeviceProParamName == value.ToString()); |
| | | return devicePro == null ? throw new Exception($"è¯»åæ°æ®é误,æªå¨å议信æ¯é颿¾å°åæ°{value.ToString()}") : (TResult)Communicator.ReadAsObj(devicePro.DeviceProAddress, devicePro.DeviceDataType); |
| | | } |
| | | |
| | | /// <summary> |
| | | /// å¿è·³ |
| | | /// </summary> |
| | | public void Heartbeat() |
| | | { |
| | | } |
| | | |
| | | /// <summary> |
| | | /// åéä»»å¡å½ä»¤ |
| | | /// </summary> |
| | | /// <param name="command">ä»»å¡å½ä»¤</param> |
| | | /// <returns></returns> |
| | | public bool SendCommand<T>(T command) where T : IDataTransfer, new() |
| | | { |
| | | if (Communicator is SiemensS7) |
| | | { |
| | | if (!IsConnected) throw new Exception($"éè®¯è¿æ¥é误ï¼è¯·æ£æ¥ç½ç»"); |
| | | DeviceProDTO? devicePro = _deviceProDTOs.Where(x => x.DeviceProParamType == nameof(DeviceCommand)).OrderBy(x => x.DeviceProOffset).FirstOrDefault(); |
| | | if (devicePro == null) |
| | | { |
| | | return false; |
| | | } |
| | | if (Communicator.WriteCustomer(devicePro.DeviceProAddress, command)) |
| | | { |
| | | StackerCraneTaskCommand = command; |
| | | //CheckStackerCraneTaskCompleted(); |
| | | return true; |
| | | } |
| | | return false; |
| | | } |
| | | else |
| | | { |
| | | throw new Exception("æä¸æ¯æé¤è¥¿é¨åä¹å¤çPLC"); |
| | | } |
| | | } |
| | | |
| | | /// <summary> |
| | | /// çæµå åæºä»»å¡æ¯å¦å®æ(鲿¢ä»»å¡å®æäºä»¶çæµè¶
æ¶ï¼å®ä¹æå¨è§¦ååè½) |
| | | /// </summary> |
| | | public void CheckStackerCraneTaskCompleted() |
| | | { |
| | | if (_isChecked) |
| | | return; |
| | | |
| | | Task.Run(() => |
| | | { |
| | | _isChecked = true; |
| | | try |
| | | { |
| | | DeviceProDTO? devicePro = _deviceProDTOs.FirstOrDefault(x => x.DeviceProParamName == nameof(FormationStackerCraneTaskCompletionStatus)); |
| | | if (devicePro == null) |
| | | return; |
| | | |
| | | DeviceProtocolDetailDTO? deviceProtocolDetail = _deviceProtocolDetailDTOs.FirstOrDefault( |
| | | x => x.DeviceProParamName == devicePro.DeviceProParamName |
| | | && x.ProtocolDetailType == FormationStackerCraneTaskCompletionStatus.NormalCompleted.ToString()); |
| | | |
| | | if (deviceProtocolDetail == null) |
| | | return; |
| | | |
| | | OperateResult<TimeSpan> operateResult = WaitForCompletion(devicePro, deviceProtocolDetail); |
| | | |
| | | if (operateResult.IsSuccess) |
| | | { |
| | | int taskNum = CurrentTaskNum; |
| | | StackerCraneTaskCompletedEventArgs args = new(taskNum); |
| | | StackerCraneTaskCompletedEventHandler?.Invoke(this, args); |
| | | _lastTaskNum = taskNum; |
| | | } |
| | | } |
| | | catch (Exception ex) |
| | | { |
| | | // TODO: æ·»å æ¥å¿è®°å½ |
| | | } |
| | | finally |
| | | { |
| | | _isChecked = false; |
| | | } |
| | | }); |
| | | } |
| | | |
| | | /// <summary> |
| | | /// çå¾
ä»»å¡å®æä¿¡å· |
| | | /// </summary> |
| | | private OperateResult<TimeSpan> WaitForCompletion(DeviceProDTO devicePro, DeviceProtocolDetailDTO deviceProtocolDetail) |
| | | { |
| | | TypeCode typeCode = SiemensDBDataType.GetTypeCode(devicePro.DeviceDataType); |
| | | |
| | | return typeCode switch |
| | | { |
| | | TypeCode.Boolean => Communicator.Wait(devicePro.DeviceProAddress, 500, 10 * 6000, |
| | | Convert.ToBoolean(deviceProtocolDetail.ProtocalDetailValue)), |
| | | |
| | | TypeCode.Byte => Communicator.Wait(devicePro.DeviceProAddress, 500, 10 * 6000, |
| | | Convert.ToByte(deviceProtocolDetail.ProtocalDetailValue)), |
| | | |
| | | TypeCode.Int16 => Communicator.Wait(devicePro.DeviceProAddress, 500, 10 * 6000, |
| | | Convert.ToInt16(deviceProtocolDetail.ProtocalDetailValue)), |
| | | |
| | | TypeCode.Int32 => Communicator.Wait(devicePro.DeviceProAddress, 500, 10 * 6000, |
| | | Convert.ToInt32(deviceProtocolDetail.ProtocalDetailValue)), |
| | | |
| | | TypeCode.UInt16 => Communicator.Wait(devicePro.DeviceProAddress, 500, 10 * 6000, |
| | | Convert.ToUInt16(deviceProtocolDetail.ProtocalDetailValue)), |
| | | |
| | | TypeCode.UInt32 => Communicator.Wait(devicePro.DeviceProAddress, 500, 10 * 6000, |
| | | Convert.ToUInt32(deviceProtocolDetail.ProtocalDetailValue)), |
| | | |
| | | _ => new OperateResult<TimeSpan>() |
| | | }; |
| | | } |
| | | |
| | | /// <summary> |
| | | /// æ ¹æ®åæ°åç§°åå
¥å åæºå¯¹åºçæ°æ®ã |
| | | /// </summary> |
| | | /// <typeparam name="TEnum">åæ°åç§°æä¸¾ç±»åã</typeparam> |
| | | /// <typeparam name="TValue">è¦åå
¥çæ°æ®ç±»åã</typeparam> |
| | | /// <param name="enum">åæ°åç§°ã</param> |
| | | /// <param name="value">è¦åå
¥çæ°æ®ã</param> |
| | | /// <returns>è¿ååå
¥æåæå¤±è´¥</returns> |
| | | /// <exception cref="Exception"></exception> |
| | | public bool SetValue<TEnum, TValue>(TEnum @enum, TValue value) |
| | | where TEnum : Enum |
| | | where TValue : notnull |
| | | { |
| | | if (!IsConnected) throw new Exception($"éè®¯è¿æ¥é误ï¼è¯·æ£æ¥ç½ç»"); |
| | | DeviceProDTO? devicePro = _deviceProDTOs.FirstOrDefault(x => x.DeviceProParamName == @enum.ToString()); |
| | | return devicePro == null ? throw new Exception($"åå
¥æ°æ®é误,æªå¨å议信æ¯é颿¾å°åæ°{value.ToString()}") : Communicator.WriteObj(devicePro.DeviceProAddress, devicePro.DeviceDataType, value); |
| | | } |
| | | |
| | | #endregion Public Method |
| | | } |
| | | } |
| | |
| | | string oldCurrentPos = task.CurrentAddress; |
| | | string oldNextPos = task.NextAddress; |
| | | |
| | | List<Dt_Router> routers = _routerService.QueryNextRoutes(task.NextAddress, task.TargetAddress); |
| | | if (!routers.Any()) throw new Exception($"æªæ¾å°è®¾å¤è·¯ç±ä¿¡æ¯"); |
| | | Dt_Router routers = _routerService.QueryNextRoute(task.CurrentAddress); |
| | | if (routers == null) throw new Exception($"æªæ¾å°è®¾å¤è·¯ç±ä¿¡æ¯"); |
| | | |
| | | task.CurrentAddress = task.NextAddress; |
| | | task.NextAddress = routers.FirstOrDefault().ChildPosi; |
| | | task.NextAddress = routers.ChildPosi; |
| | | |
| | | task.ModifyDate = DateTime.Now; |
| | | task.Modifier = "System"; |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | #region << ç æ¬ 注 é >> |
| | | |
| | | /*---------------------------------------------------------------- |
| | | * å½å空é´ï¼WIDESEAWCS_Tasks.ConveyorLineJob |
| | | * å建è
ï¼è¡ç«¥åº |
| | | * å建æ¶é´ï¼2024/8/2 16:13:36 |
| | | * çæ¬ï¼V1.0.0 |
| | | * æè¿°ï¼ |
| | | * |
| | | * ---------------------------------------------------------------- |
| | | * ä¿®æ¹äººï¼ |
| | | * ä¿®æ¹æ¶é´ï¼ |
| | | * çæ¬ï¼V1.0.1 |
| | | * ä¿®æ¹è¯´æï¼ |
| | | * |
| | | *----------------------------------------------------------------*/ |
| | | |
| | | #endregion << ç æ¬ 注 é >> |
| | | |
| | | using AutoMapper; |
| | | using Quartz; |
| | | using WIDESEAWCS_Common.TaskEnum; |
| | | using WIDESEAWCS_Core; |
| | | using WIDESEAWCS_Core.Helper; |
| | | using WIDESEAWCS_ITaskInfoService; |
| | | using WIDESEAWCS_Model.Models; |
| | | using WIDESEAWCS_QuartzJob; |
| | | using WIDESEAWCS_QuartzJob.Service; |
| | | |
| | | namespace WIDESEAWCS_Tasks |
| | | { |
| | | [DisallowConcurrentExecution] |
| | | public class CommonConveyorLineNewJob : IJob |
| | | { |
| | | private readonly ITaskService _taskService; |
| | | private readonly ITaskExecuteDetailService _taskExecuteDetailService; |
| | | private readonly IRouterService _routerService; |
| | | private readonly IMapper _mapper; |
| | | ConveyorLineDispatchHandler _conveyorLineDispatch; |
| | | |
| | | public CommonConveyorLineNewJob(ITaskService taskService, ITaskExecuteDetailService taskExecuteDetailService, IRouterService routerService, IMapper mapper) |
| | | { |
| | | _taskService = taskService; |
| | | _taskExecuteDetailService = taskExecuteDetailService; |
| | | _routerService = routerService; |
| | | _mapper = mapper; |
| | | _conveyorLineDispatch = new ConveyorLineDispatchHandler(_taskService, _taskExecuteDetailService, _routerService, _mapper); |
| | | } |
| | | |
| | | public Task Execute(IJobExecutionContext context) |
| | | { |
| | | try |
| | | { |
| | | CommonConveyorLine conveyorLine = (CommonConveyorLine)context.JobDetail.JobDataMap.Get("JobParams"); |
| | | if (conveyorLine != null) |
| | | { |
| | | List<string> childDeviceCodes = _routerService.QueryAllPositions(conveyorLine.DeviceCode); |
| | | if (childDeviceCodes == null || childDeviceCodes.Count == 0) |
| | | { |
| | | Console.WriteLine($"è¾é线 {conveyorLine.DeviceCode} 没æå设å¤"); |
| | | return Task.CompletedTask; |
| | | } |
| | | |
| | | // å建并è¡é项 |
| | | var parallelOptions = new ParallelOptions |
| | | { |
| | | MaxDegreeOfParallelism = Math.Min(childDeviceCodes.Count, Environment.ProcessorCount * 2), // åçéå¶å¹¶åæ° |
| | | }; |
| | | Parallel.For(0, childDeviceCodes.Count, parallelOptions, i => |
| | | { |
| | | string childDeviceCode = childDeviceCodes[i]; |
| | | var correlationId = Guid.NewGuid().ToString("N"); |
| | | try |
| | | { |
| | | ConveyorLineTaskCommandNew command = conveyorLine.ReadCustomer<ConveyorLineTaskCommandNew>(childDeviceCode); |
| | | if (command == null || command.PLC_STB == 0) |
| | | { |
| | | return; |
| | | } |
| | | |
| | | if (command.Barcode.IsNullOrEmpty()) |
| | | { |
| | | //æ æçå·æ¶ |
| | | _conveyorLineDispatch.RequestOutbound(conveyorLine, command, childDeviceCode); |
| | | return; |
| | | } |
| | | |
| | | Dt_Task task = _taskService.QueryExecutingConveyorLineTask(command.TaskNo, childDeviceCode); |
| | | if (task.IsNullOrEmpty()) |
| | | { |
| | | _conveyorLineDispatch.RequestInbound(conveyorLine, command, childDeviceCode); |
| | | return; |
| | | } |
| | | |
| | | // å¤çä»»å¡ç¶æ |
| | | ProcessTaskState(conveyorLine, command, task, childDeviceCode); |
| | | } |
| | | catch (Exception innerEx) |
| | | { |
| | | Console.Error.WriteLine($"{DateTime.UtcNow:O} [{childDeviceCode}] CorrelationId={correlationId} {innerEx}"); |
| | | } |
| | | }); |
| | | } |
| | | } |
| | | catch (Exception ex) |
| | | { |
| | | Console.Error.WriteLine(ex); |
| | | } |
| | | return Task.CompletedTask; |
| | | } |
| | | |
| | | |
| | | /// <summary> |
| | | /// å¤çä»»å¡ç¶æ |
| | | /// </summary> |
| | | /// <param name="conveyorLine">è¾é线å®ä¾å¯¹è±¡</param> |
| | | /// <param name="command">读åç请æ±ä¿¡æ¯</param> |
| | | /// <param name="task">å设å¤ç¼å·</param> |
| | | /// <param name="childDeviceCode"></param> |
| | | private void ProcessTaskState(CommonConveyorLine conveyorLine, ConveyorLineTaskCommandNew command, Dt_Task task, string childDeviceCode) |
| | | { |
| | | // å®ä¹ç¶æå¸¸éï¼å¦æç±»ä¸å·²å®ä¹åå¯ç§»é¤ï¼ |
| | | const int InExecuting = (int)TaskInStatusEnum.Line_InExecuting; |
| | | const int OutExecuting = (int)TaskOutStatusEnum.Line_OutExecuting; |
| | | const int InFinish = (int)TaskInStatusEnum.InFinish; |
| | | const int OutFinish = (int)TaskOutStatusEnum.OutFinish; |
| | | |
| | | int state = task.TaskState; |
| | | bool isTargetAddress = task.TargetAddress == childDeviceCode; |
| | | |
| | | // å¤çç¶æé»è¾ |
| | | switch (state) |
| | | { |
| | | case InExecuting: |
| | | if (isTargetAddress) |
| | | _conveyorLineDispatch.ConveyorLineInFinish(conveyorLine, command, childDeviceCode); |
| | | else |
| | | _conveyorLineDispatch.RequestInNextAddress(conveyorLine, command, childDeviceCode); |
| | | break; |
| | | |
| | | case OutExecuting: |
| | | if (isTargetAddress) |
| | | _conveyorLineDispatch.ConveyorLineOutFinish(conveyorLine, command, childDeviceCode); |
| | | else |
| | | _conveyorLineDispatch.RequestOutNextAddress(conveyorLine, command, childDeviceCode); |
| | | break; |
| | | |
| | | case InFinish: |
| | | _conveyorLineDispatch.ConveyorLineInFinish(conveyorLine, command, childDeviceCode); |
| | | break; |
| | | |
| | | case OutFinish: |
| | | _conveyorLineDispatch.ConveyorLineOutFinish(conveyorLine, command, childDeviceCode); |
| | | break; |
| | | } |
| | | } |
| | | |
| | | |
| | | } |
| | | } |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | using System; |
| | | using System.Collections.Generic; |
| | | using System.Linq; |
| | | using System.Text; |
| | | using System.Threading.Tasks; |
| | | |
| | | namespace WIDESEAWCS_Tasks |
| | | { |
| | | public enum ConstraintMachineDBName |
| | | { |
| | | /// <summary> |
| | | /// ç©æµçº¿è¿è¡ä¿¡å· |
| | | /// </summary> |
| | | LogisticsLineRunningSignal, |
| | | |
| | | /// <summary> |
| | | /// æææºè¿è¡ä¿¡å· |
| | | /// </summary> |
| | | ConstraintMachineRunningSignal, |
| | | |
| | | /// <summary> |
| | | /// è¦æè¯·æ±-ä¸å± |
| | | /// </summary> |
| | | MaterialRequestUpper, |
| | | |
| | | /// <summary> |
| | | /// ææçå¯åºæ-ä¸å± |
| | | /// </summary> |
| | | ConstraintTrayOutputReadyUpper, |
| | | |
| | | /// <summary> |
| | | /// åºæè¯·æ±-ä¸å± |
| | | /// </summary> |
| | | OutputRequestUpper, |
| | | |
| | | /// <summary> |
| | | /// è¦æè¯·æ±-ä¸å± |
| | | /// </summary> |
| | | MaterialRequestLower, |
| | | |
| | | /// <summary> |
| | | /// ææçå¯åºæ-ä¸å± |
| | | /// </summary> |
| | | ConstraintTrayOutputReadyLower, |
| | | |
| | | /// <summary> |
| | | /// åºæè¯·æ±-ä¸å± |
| | | /// </summary> |
| | | OutputRequestLower |
| | | } |
| | | } |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | #region << ç æ¬ 注 é >> |
| | | /*---------------------------------------------------------------- |
| | | * å½å空é´ï¼WIDESEAWCS_Tasks.ConveyorLineJob |
| | | * å建è
ï¼è¡ç«¥åº |
| | | * å建æ¶é´ï¼2024/8/2 16:13:36 |
| | | * çæ¬ï¼V1.0.0 |
| | | * æè¿°ï¼ |
| | | * |
| | | * ---------------------------------------------------------------- |
| | | * ä¿®æ¹äººï¼ |
| | | * ä¿®æ¹æ¶é´ï¼ |
| | | * çæ¬ï¼V1.0.1 |
| | | * ä¿®æ¹è¯´æï¼ |
| | | * |
| | | *----------------------------------------------------------------*/ |
| | | #endregion << ç æ¬ 注 é >> |
| | | |
| | | using System; |
| | | using System.Collections.Generic; |
| | | using System.Linq; |
| | | using System.Text; |
| | | using System.Threading.Tasks; |
| | | |
| | | namespace WIDESEAWCS_Tasks |
| | | { |
| | | public enum ConveyorLineDBNameNew |
| | | { |
| | | TaskNo, |
| | | Source, |
| | | Target, |
| | | BoxType, |
| | | CV_State, |
| | | CV_ERRCode, |
| | | WCS_STB, |
| | | WCS_ACK, |
| | | PLC_STB, |
| | | PLC_ACK, |
| | | PLC_REQ, |
| | | WCS_ERRCode, |
| | | WCS_Special, |
| | | Equ_Auto, |
| | | Last_pallet, |
| | | Barcode |
| | | } |
| | | } |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | #region << ç æ¬ 注 é >> |
| | | /*---------------------------------------------------------------- |
| | | * å½å空é´ï¼WIDESEAWCS_Tasks.ConveyorLineJob |
| | | * å建è
ï¼è¡ç«¥åº |
| | | * å建æ¶é´ï¼2024/8/2 16:13:36 |
| | | * çæ¬ï¼V1.0.0 |
| | | * æè¿°ï¼ |
| | | * |
| | | * ---------------------------------------------------------------- |
| | | * ä¿®æ¹äººï¼ |
| | | * ä¿®æ¹æ¶é´ï¼ |
| | | * çæ¬ï¼V1.0.1 |
| | | * ä¿®æ¹è¯´æï¼ |
| | | * |
| | | *----------------------------------------------------------------*/ |
| | | #endregion << ç æ¬ 注 é >> |
| | | |
| | | using System; |
| | | using System.Collections.Generic; |
| | | using System.Linq; |
| | | using System.Runtime.InteropServices; |
| | | using System.Text; |
| | | using System.Threading.Tasks; |
| | | using WIDESEAWCS_QuartzJob.DeviceBase; |
| | | |
| | | namespace WIDESEAWCS_Tasks |
| | | { |
| | | public class ConveyorLineTaskCommandNew : DeviceCommand |
| | | { |
| | | /// <summary> |
| | | /// ä»»å¡å· |
| | | /// </summary> |
| | | public int TaskNo { get; set; } |
| | | |
| | | /// <summary> |
| | | /// æºä½ç½® å¼å§å°å |
| | | /// </summary> |
| | | public int Source { get; set; } |
| | | |
| | | /// <summary> |
| | | /// ç®æ ä½ç½® |
| | | /// </summary> |
| | | public int Target { get; set; } |
| | | |
| | | /// <summary> |
| | | /// ç®±å |
| | | /// </summary> |
| | | public byte BoxType { get; set; } |
| | | |
| | | /// <summary> |
| | | /// è¾éçº¿ç¶æ 设å¤ç©ºé²ç¶æ |
| | | /// </summary> |
| | | public byte CV_State { get; set; } |
| | | |
| | | /// <summary> |
| | | /// è¾é线é误代ç |
| | | /// </summary> |
| | | public byte CV_ERRCode { get; set; } |
| | | |
| | | /// <summary> |
| | | /// WCS就绪æ å¿ WCSä¸å宿æ¶ï¼è§¦å为1 |
| | | /// </summary> |
| | | public byte WCS_STB { get; set; } |
| | | |
| | | /// <summary> |
| | | /// WCSåºçæ å¿ WCSæ¶å°å®ææ¶ï¼è§¦å为1 |
| | | /// </summary> |
| | | public byte WCS_ACK { get; set; } |
| | | |
| | | /// <summary> |
| | | /// PLC就绪æ å¿ å®æä»»å¡æ¶ï¼è§¦å为1 |
| | | /// </summary> |
| | | public byte PLC_STB { get; set; } |
| | | |
| | | /// <summary> |
| | | /// PLCåºçæ å¿ æ¶å°ä»»å¡æ¶ï¼è§¦å为1 |
| | | /// </summary> |
| | | public byte PLC_ACK { get; set; } |
| | | |
| | | /// <summary> |
| | | /// PLCè¯·æ±æ å¿ å
¥åºç«å°ï¼å°ä½å1 |
| | | /// </summary> |
| | | public byte PLC_REQ { get; set; } |
| | | |
| | | /// <summary> |
| | | /// WCSé误代ç |
| | | /// </summary> |
| | | public byte WCS_ERRCode { get; set; } |
| | | |
| | | /// <summary> |
| | | /// WCSç¹æ®æ å¿ (æè½¬æ è¯ãå¼ºå¶æ¾è¡ã循ç¯ãç¹æ®ç³è¯·ãæ¯å¦å çãæ¯å¦å µå¡) |
| | | /// </summary> |
| | | public byte WCS_Special { get; set; } |
| | | |
| | | /// <summary> |
| | | /// 设å¤èªå¨æ¨¡å¼ æå¨1ï¼èªå¨2 |
| | | /// </summary> |
| | | public byte Equ_Auto { get; set; } |
| | | |
| | | /// <summary> |
| | | /// å°¾æ¿æ å¿ |
| | | /// </summary> |
| | | public byte Last_pallet { get; set; } |
| | | |
| | | /// <summary> |
| | | /// æ¡ç ï¼22个åç¬¦ï¼ |
| | | /// </summary> |
| | | [DataLength(22)] |
| | | public string Barcode { get; set; } |
| | | } |
| | | } |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | #region << ç æ¬ 注 é >> |
| | | |
| | | /*---------------------------------------------------------------- |
| | | * å½å空é´ï¼WIDESEAWCS_Tasks.ConveyorLineJob |
| | | * å建è
ï¼è¡ç«¥åº |
| | | * å建æ¶é´ï¼2024/8/2 16:13:36 |
| | | * çæ¬ï¼V1.0.0 |
| | | * æè¿°ï¼ |
| | | * |
| | | * ---------------------------------------------------------------- |
| | | * ä¿®æ¹äººï¼ |
| | | * ä¿®æ¹æ¶é´ï¼ |
| | | * çæ¬ï¼V1.0.1 |
| | | * ä¿®æ¹è¯´æï¼ |
| | | * |
| | | *----------------------------------------------------------------*/ |
| | | |
| | | #endregion << ç æ¬ 注 é >> |
| | | |
| | | using AutoMapper; |
| | | using System.Data; |
| | | using WIDESEAWCS_Core; |
| | | using WIDESEAWCS_Core.Helper; |
| | | using WIDESEAWCS_ITaskInfoService; |
| | | using WIDESEAWCS_Model.Models; |
| | | using WIDESEAWCS_QuartzJob; |
| | | using WIDESEAWCS_QuartzJob.Service; |
| | | |
| | | namespace WIDESEAWCS_Tasks |
| | | { |
| | | public class ConveyorLineDispatchHandler |
| | | { |
| | | private readonly ITaskService _taskService; |
| | | private readonly ITaskExecuteDetailService _taskExecuteDetailService; |
| | | private readonly IRouterService _routerService; |
| | | private readonly IMapper _mapper; |
| | | |
| | | public ConveyorLineDispatchHandler(ITaskService taskService, ITaskExecuteDetailService taskExecuteDetailService, IRouterService routerService, IMapper mapper) |
| | | { |
| | | _taskService = taskService; |
| | | _taskExecuteDetailService = taskExecuteDetailService; |
| | | _routerService = routerService; |
| | | _mapper = mapper; |
| | | } |
| | | |
| | | /// <summary> |
| | | /// å¿è·³å¤ç |
| | | /// </summary> |
| | | /// <param name="conveyorLine"></param> |
| | | /// <param name="command"></param> |
| | | /// <param name="childDeviceCode"></param> |
| | | public void HeartBeat(CommonConveyorLine conveyorLine, ConveyorLineTaskCommandNew command, string childDeviceCode) |
| | | { |
| | | //å¿è·³å¤çé»è¾ |
| | | conveyorLine.SetValue(ConveyorLineDBNameNew.TaskNo, 0, childDeviceCode); |
| | | } |
| | | |
| | | /// <summary> |
| | | /// è¾é线请æ±å
¥åº |
| | | /// </summary> |
| | | /// <param name="conveyorLine">è¾é线å®ä¾å¯¹è±¡</param> |
| | | /// <param name="command">读åç请æ±ä¿¡æ¯</param> |
| | | /// <param name="childDeviceCode">å设å¤ç¼å·</param> |
| | | public void RequestInbound(CommonConveyorLine conveyorLine, ConveyorLineTaskCommandNew command, string childDeviceCode) |
| | | { |
| | | if (_taskService.RequestWMSTask(command.Barcode, childDeviceCode).Status) |
| | | { |
| | | Dt_Task task = _taskService.QueryConveyorLineTask(conveyorLine.DeviceCode, childDeviceCode); |
| | | if (task != null) |
| | | { |
| | | ConveyorLineTaskCommandNew taskCommand = _mapper.Map<ConveyorLineTaskCommandNew>(task); |
| | | taskCommand.WCS_ACK = command.WCS_ACK; |
| | | conveyorLine.SendCommand(taskCommand, childDeviceCode); |
| | | |
| | | _taskService.UpdateTaskStatusToNext(task); |
| | | } |
| | | } |
| | | } |
| | | |
| | | /// <summary> |
| | | /// è¾é线请æ±å
¥åºä¸ä¸å°å |
| | | /// </summary> |
| | | /// <param name="conveyorLine">è¾é线å®ä¾å¯¹è±¡</param> |
| | | /// <param name="command">读åç请æ±ä¿¡æ¯</param> |
| | | /// <param name="childDeviceCode">å设å¤ç¼å·</param> |
| | | public void RequestInNextAddress(CommonConveyorLine conveyorLine, ConveyorLineTaskCommandNew command, string childDeviceCode) |
| | | { |
| | | Dt_Task task = _taskService.QueryExecutingConveyorLineTask(command.TaskNo, childDeviceCode); |
| | | if (task != null) |
| | | { |
| | | const string ConstraintMachineName = "æææº"; |
| | | const string PinMachineName = "ææéæº"; |
| | | |
| | | var devices = Storage.Devices; |
| | | |
| | | if (string.Equals(task.NextAddress, ConstraintMachineName, StringComparison.Ordinal)) |
| | | { |
| | | ConstraintMachine? constraint = devices.OfType<ConstraintMachine>().FirstOrDefault(d => d.DeviceName == ConstraintMachineName); |
| | | if (constraint == null) |
| | | { |
| | | // å¤ç processing 为空çæ
åµï¼å¯æ ¹æ®å®é
ä¸å¡éæ±æ·»å å¤çé»è¾ï¼ |
| | | return; |
| | | } |
| | | |
| | | ProcessDeviceRequest(conveyorLine, constraint, childDeviceCode, |
| | | () => constraint.GetValue<ConstraintMachineDBName, bool>(ConstraintMachineDBName.MaterialRequestUpper), |
| | | () => constraint.GetValue<ConstraintMachineDBName, bool>(ConstraintMachineDBName.OutputRequestUpper), |
| | | outputReq => constraint.SetValue(ConstraintMachineDBName.ConstraintTrayOutputReadyUpper, outputReq ? 1 : 0)); |
| | | } |
| | | else if (string.Equals(task.NextAddress, PinMachineName, StringComparison.Ordinal)) |
| | | { |
| | | PinMachine? pinMachine = devices.OfType<PinMachine>().FirstOrDefault(d => d.DeviceName == PinMachineName); |
| | | if (pinMachine == null) |
| | | { |
| | | // å¤ç pinMachine 为空çæ
åµï¼å¯æ ¹æ®å®é
ä¸å¡éæ±æ·»å å¤çé»è¾ï¼ |
| | | return; |
| | | } |
| | | |
| | | ProcessDeviceRequest(conveyorLine, pinMachine, childDeviceCode, |
| | | () => pinMachine.GetValue<PinMachineDBName, bool>(PinMachineDBName.MaterialRequestUpper), |
| | | () => pinMachine.GetValue<PinMachineDBName, bool>(PinMachineDBName.OutputRequestUpper), |
| | | outputReq => pinMachine.SetValue(PinMachineDBName.PlugPinTrayOutputReadyUpper, outputReq ? 1 : 0)); |
| | | } |
| | | |
| | | Dt_Task? newTask = _taskService.UpdatePosition(task.TaskNum, task.CurrentAddress); |
| | | //if (newTask != null) |
| | | //{ |
| | | // _taskService.UpdateTaskStatusToNext(task); |
| | | //} |
| | | } |
| | | } |
| | | |
| | | /// <summary> |
| | | /// è¾é线å
¥åºå®æ |
| | | /// </summary> |
| | | /// <param name="conveyorLine">è¾é线å®ä¾å¯¹è±¡</param> |
| | | /// <param name="command">读åç请æ±ä¿¡æ¯</param> |
| | | /// <param name="childDeviceCode">å设å¤ç¼å·</param> |
| | | public void ConveyorLineInFinish(CommonConveyorLine conveyorLine, ConveyorLineTaskCommandNew command, string childDeviceCode) |
| | | { |
| | | Dt_Task task = _taskService.QueryExecutingConveyorLineTask(command.TaskNo, childDeviceCode); |
| | | if (task != null) |
| | | { |
| | | conveyorLine.SetValue(ConveyorLineDBNameNew.WCS_ACK, 1, childDeviceCode); |
| | | WebResponseContent content = _taskService.UpdateTaskStatusToNext(task); |
| | | Console.Out.WriteLine(content.Serialize()); |
| | | } |
| | | } |
| | | |
| | | /// <summary> |
| | | /// è¾é线请æ±åºä¿¡æ¯ |
| | | /// </summary> |
| | | /// <param name="conveyorLine">è¾é线å®ä¾å¯¹è±¡</param> |
| | | /// <param name="command">读åç请æ±ä¿¡æ¯</param> |
| | | /// <param name="childDeviceCode">å设å¤ç¼å·</param> |
| | | public void RequestOutbound(CommonConveyorLine conveyorLine, ConveyorLineTaskCommandNew command, string childDeviceCode) |
| | | { |
| | | Dt_Task task = _taskService.QueryConveyorLineTask(conveyorLine.DeviceCode, childDeviceCode); |
| | | if (task != null) |
| | | { |
| | | ConveyorLineTaskCommandNew taskCommand = _mapper.Map<ConveyorLineTaskCommandNew>(task); |
| | | taskCommand.WCS_ACK = command.WCS_ACK; |
| | | conveyorLine.SendCommand(taskCommand, childDeviceCode); |
| | | |
| | | _taskService.UpdateTaskStatusToNext(task); |
| | | } |
| | | } |
| | | |
| | | /// <summary> |
| | | /// è¾é线请æ±åºåºä¸ä¸å°å |
| | | /// </summary> |
| | | /// <param name="conveyorLine">è¾é线å®ä¾å¯¹è±¡</param> |
| | | /// <param name="command">读åç请æ±ä¿¡æ¯</param> |
| | | /// <param name="childDeviceCode">å设å¤ç¼å·</param> |
| | | public void RequestOutNextAddress(CommonConveyorLine conveyorLine, ConveyorLineTaskCommandNew command, string childDeviceCode) |
| | | { |
| | | Dt_Task task = _taskService.QueryExecutingConveyorLineTask(command.TaskNo, childDeviceCode); |
| | | if (task != null) |
| | | { |
| | | const string ConstraintMachineName = "æææº"; |
| | | const string PinMachineName = "ææéæº"; |
| | | |
| | | var devices = Storage.Devices; |
| | | |
| | | if (string.Equals(task.NextAddress, ConstraintMachineName, StringComparison.Ordinal)) |
| | | { |
| | | ConstraintMachine? constraint = devices.OfType<ConstraintMachine>().FirstOrDefault(d => d.DeviceName == ConstraintMachineName); |
| | | if (constraint == null) |
| | | { |
| | | // å¤ç processing 为空çæ
åµï¼å¯æ ¹æ®å®é
ä¸å¡éæ±æ·»å å¤çé»è¾ï¼ |
| | | return; |
| | | } |
| | | ProcessDeviceRequest(conveyorLine, constraint, childDeviceCode, |
| | | () => constraint.GetValue<ConstraintMachineDBName, bool>(ConstraintMachineDBName.MaterialRequestLower), |
| | | () => constraint.GetValue<ConstraintMachineDBName, bool>(ConstraintMachineDBName.OutputRequestLower), |
| | | outputReq => constraint.SetValue(ConstraintMachineDBName.ConstraintTrayOutputReadyLower, outputReq ? 1 : 0)); |
| | | } |
| | | else if (string.Equals(task.NextAddress, PinMachineName, StringComparison.Ordinal)) |
| | | { |
| | | PinMachine? pinMachine = devices.OfType<PinMachine>().FirstOrDefault(d => d.DeviceName == PinMachineName); |
| | | if (pinMachine == null) |
| | | { |
| | | // å¤ç pinMachine 为空çæ
åµï¼å¯æ ¹æ®å®é
ä¸å¡éæ±æ·»å å¤çé»è¾ï¼ |
| | | return; |
| | | } |
| | | ProcessDeviceRequest(conveyorLine, pinMachine, childDeviceCode, |
| | | () => pinMachine.GetValue<PinMachineDBName, bool>(PinMachineDBName.MaterialRequestLower), |
| | | () => pinMachine.GetValue<PinMachineDBName, bool>(PinMachineDBName.OutputRequestLower), |
| | | outputReq => pinMachine.SetValue(PinMachineDBName.PlugPinTrayOutputReadyLower, outputReq ? 1 : 0)); |
| | | } |
| | | |
| | | Dt_Task? newTask = _taskService.UpdatePosition(task.TaskNum, task.CurrentAddress); |
| | | } |
| | | } |
| | | |
| | | /// <summary> |
| | | /// è¾é线åºåºå®æ |
| | | /// </summary> |
| | | /// <param name="conveyorLine">è¾é线å®ä¾å¯¹è±¡</param> |
| | | /// <param name="command">读åç请æ±ä¿¡æ¯</param> |
| | | /// <param name="childDeviceCode">å设å¤ç¼å·</param> |
| | | public void ConveyorLineOutFinish(CommonConveyorLine conveyorLine, ConveyorLineTaskCommandNew command, string childDeviceCode) |
| | | { |
| | | Dt_Task task = _taskService.QueryExecutingConveyorLineTask(command.TaskNo, childDeviceCode); |
| | | if (task != null) |
| | | { |
| | | conveyorLine.SetValue(ConveyorLineDBNameNew.WCS_ACK, 1, childDeviceCode); |
| | | WebResponseContent content = _taskService.UpdateTaskStatusToNext(task); |
| | | Console.Out.WriteLine(content.Serialize()); |
| | | } |
| | | } |
| | | |
| | | /// <summary> |
| | | /// å
¥åºæææºè¯·æ±å¤ç |
| | | /// </summary> |
| | | /// <param name="conveyorLine"></param> |
| | | /// <param name="command"></param> |
| | | /// <param name="constraint"></param> |
| | | /// <param name="childDeviceCode"></param> |
| | | public void InboundConstraintMachineRequest(CommonConveyorLine conveyorLine, ConveyorLineTaskCommandNew command, ConstraintMachine? constraint, string childDeviceCode) |
| | | { |
| | | //å
¥åºæææºè¯·æ±å¤çé»è¾ |
| | | bool materialReq = constraint.GetValue<ConstraintMachineDBName, bool>(ConstraintMachineDBName.MaterialRequestUpper); |
| | | bool outputReq = constraint.GetValue<ConstraintMachineDBName, bool>(ConstraintMachineDBName.OutputRequestUpper); |
| | | |
| | | if (materialReq) |
| | | { |
| | | conveyorLine.SetValue(ConveyorLineDBNameNew.Target, 1, childDeviceCode); |
| | | conveyorLine.SetValue(ConveyorLineDBNameNew.WCS_ACK, 1, childDeviceCode); |
| | | } |
| | | else |
| | | { |
| | | constraint.SetValue(ConstraintMachineDBName.ConstraintTrayOutputReadyUpper, outputReq ? 1 : 0); |
| | | } |
| | | } |
| | | |
| | | /// <summary> |
| | | /// å
¥åºææéæºè¯·æ±å¤ç |
| | | /// </summary> |
| | | /// <param name="conveyorLine"></param> |
| | | /// <param name="command"></param> |
| | | /// <param name="pinMachine"></param> |
| | | /// <param name="childDeviceCode"></param> |
| | | public void InboundPinMachineRequest(CommonConveyorLine conveyorLine, ConveyorLineTaskCommandNew command, PinMachine? pinMachine, string childDeviceCode) |
| | | { |
| | | //å
¥åºææéæºè¯·æ±å¤çé»è¾ |
| | | bool materialReq = pinMachine.GetValue<PinMachineDBName, bool>(PinMachineDBName.MaterialRequestUpper); |
| | | bool outputReq = pinMachine.GetValue<PinMachineDBName, bool>(PinMachineDBName.OutputRequestUpper); |
| | | if (materialReq) |
| | | { |
| | | conveyorLine.SetValue(ConveyorLineDBNameNew.Target, 1, childDeviceCode); |
| | | conveyorLine.SetValue(ConveyorLineDBNameNew.WCS_ACK, 1, childDeviceCode); |
| | | } |
| | | else |
| | | { |
| | | pinMachine.SetValue(PinMachineDBName.PlugPinTrayOutputReadyUpper, outputReq ? 1 : 0); |
| | | } |
| | | } |
| | | |
| | | /// <summary> |
| | | /// åºåºæææºè¯·æ±å¤ç |
| | | /// </summary> |
| | | /// <param name="conveyorLine"></param> |
| | | /// <param name="command"></param> |
| | | /// <param name="constraint"></param> |
| | | /// <param name="childDeviceCode"></param> |
| | | public void OutConstraintMachineRequest(CommonConveyorLine conveyorLine, ConveyorLineTaskCommandNew command, ConstraintMachine? constraint, string childDeviceCode) |
| | | { |
| | | //åºåºæææºè¯·æ±å¤çé»è¾ |
| | | |
| | | bool materialReq = constraint.GetValue<ConstraintMachineDBName, bool>(ConstraintMachineDBName.MaterialRequestLower); |
| | | bool outputReq = constraint.GetValue<ConstraintMachineDBName, bool>(ConstraintMachineDBName.OutputRequestLower); |
| | | |
| | | if (materialReq) |
| | | { |
| | | conveyorLine.SetValue(ConveyorLineDBNameNew.Target, 1, childDeviceCode); |
| | | conveyorLine.SetValue(ConveyorLineDBNameNew.WCS_ACK, 1, childDeviceCode); |
| | | } |
| | | else |
| | | { |
| | | constraint.SetValue(ConstraintMachineDBName.ConstraintTrayOutputReadyLower, outputReq ? 1 : 0); |
| | | } |
| | | } |
| | | |
| | | /// <summary> |
| | | /// åºåºææéæºè¯·æ±å¤ç |
| | | /// </summary> |
| | | /// <param name="conveyorLine"></param> |
| | | /// <param name="command"></param> |
| | | /// <param name="pinMachine"></param> |
| | | /// <param name="childDeviceCode"></param> |
| | | public void OutPinMachineRequest(CommonConveyorLine conveyorLine, ConveyorLineTaskCommandNew command, PinMachine? pinMachine, string childDeviceCode) |
| | | { |
| | | //åºåºææéæºè¯·æ±å¤çé»è¾ |
| | | bool materialReq = pinMachine.GetValue<PinMachineDBName, bool>(PinMachineDBName.MaterialRequestLower); |
| | | bool outputReq = pinMachine.GetValue<PinMachineDBName, bool>(PinMachineDBName.OutputRequestLower); |
| | | if (materialReq) |
| | | { |
| | | conveyorLine.SetValue(ConveyorLineDBNameNew.Target, 1, childDeviceCode); |
| | | conveyorLine.SetValue(ConveyorLineDBNameNew.WCS_ACK, 1, childDeviceCode); |
| | | } |
| | | else |
| | | { |
| | | pinMachine.SetValue(PinMachineDBName.PlugPinTrayOutputReadyLower, outputReq ? 1 : 0); |
| | | } |
| | | } |
| | | |
| | | /// <summary> |
| | | /// éç¨ç设å¤è¯·æ±å¤çæ¹æ³ |
| | | /// </summary> |
| | | private void ProcessDeviceRequest<T>(CommonConveyorLine conveyorLine, T device, string childDeviceCode, |
| | | Func<bool> getMaterialRequest, Func<bool> getOutputRequest, Action<bool> setOutputReady) |
| | | { |
| | | bool materialReq = getMaterialRequest(); |
| | | bool outputReq = getOutputRequest(); |
| | | |
| | | if (materialReq) |
| | | { |
| | | conveyorLine.SetValue(ConveyorLineDBNameNew.Target, 1, childDeviceCode); |
| | | conveyorLine.SetValue(ConveyorLineDBNameNew.WCS_ACK, 1, childDeviceCode); |
| | | } |
| | | else |
| | | { |
| | | setOutputReady(outputReq); |
| | | } |
| | | } |
| | | } |
| | | } |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | using System; |
| | | using System.Collections.Generic; |
| | | using System.Linq; |
| | | using System.Text; |
| | | using System.Threading.Tasks; |
| | | using WIDESEAWCS_QuartzJob.DeviceBase; |
| | | |
| | | namespace WIDESEAWCS_Tasks |
| | | { |
| | | public class PinMachineCommand : DeviceCommand |
| | | { |
| | | /// <summary> |
| | | /// ç©æµçº¿è¿è¡ä¿¡å· |
| | | /// </summary> |
| | | public short LogisticsLineRunningSignal { get; set; } |
| | | |
| | | /// <summary> |
| | | /// ææéæºè¿è¡ä¿¡å· |
| | | /// </summary> |
| | | public short PlugPinMachineRunningSignal { get; set; } |
| | | |
| | | /// <summary> |
| | | /// è¦æè¯·æ±-ä¸å± |
| | | /// </summary> |
| | | public short MaterialRequestUpper { get; set; } |
| | | |
| | | /// <summary> |
| | | /// åºæè¯·æ±-ä¸å± |
| | | /// </summary> |
| | | public short OutputRequestUpper { get; set; } |
| | | |
| | | /// <summary> |
| | | /// ææéçå¯åºæ-ä¸å± |
| | | /// </summary> |
| | | public short PlugPinTrayOutputReadyUpper { get; set; } |
| | | |
| | | /// <summary> |
| | | /// è¦æè¯·æ±-ä¸å± |
| | | /// </summary> |
| | | public short MaterialRequestLower { get; set; } |
| | | |
| | | /// <summary> |
| | | /// åºæè¯·æ±-ä¸å± |
| | | /// </summary> |
| | | public short OutputRequestLower { get; set; } |
| | | |
| | | /// <summary> |
| | | /// ææéçå¯åºæ-ä¸å± |
| | | /// </summary> |
| | | public short PlugPinTrayOutputReadyLower { get; set; } |
| | | } |
| | | } |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | namespace WIDESEAWCS_Tasks |
| | | { |
| | | public enum PinMachineDBName |
| | | { |
| | | /// <summary> |
| | | /// ç©æµçº¿è¿è¡ä¿¡å· |
| | | /// </summary> |
| | | LogisticsLineRunningSignal, |
| | | |
| | | /// <summary> |
| | | /// ææéæºè¿è¡ä¿¡å· |
| | | /// </summary> |
| | | PlugPinMachineRunningSignal, |
| | | |
| | | /// <summary> |
| | | /// è¦æè¯·æ±-ä¸å± |
| | | /// </summary> |
| | | MaterialRequestUpper, |
| | | |
| | | /// <summary> |
| | | /// åºæè¯·æ±-ä¸å± |
| | | /// </summary> |
| | | OutputRequestUpper, |
| | | |
| | | /// <summary> |
| | | /// ææéçå¯åºæ-ä¸å± |
| | | /// </summary> |
| | | PlugPinTrayOutputReadyUpper, |
| | | |
| | | /// <summary> |
| | | /// è¦æè¯·æ±-ä¸å± |
| | | /// </summary> |
| | | MaterialRequestLower, |
| | | |
| | | /// <summary> |
| | | /// åºæè¯·æ±-ä¸å± |
| | | /// </summary> |
| | | OutputRequestLower, |
| | | |
| | | /// <summary> |
| | | /// ææéçå¯åºæ-ä¸å± |
| | | /// </summary> |
| | | PlugPinTrayOutputReadyLower |
| | | } |
| | | } |
| | |
| | | Console.WriteLine(DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss") + " CommonStackerCraneJob Start"); |
| | | |
| | | bool flag = context.JobDetail.JobDataMap.TryGetValue("JobParams", out object? value); |
| | | if (!flag || value is not CommonStackerCrane commonStackerCrane) |
| | | if (!flag || value is not IStackerCrane commonStackerCrane) |
| | | { |
| | | return Task.CompletedTask; |
| | | } |
| | |
| | | commonStackerCrane.StackerCraneTaskCompletedEventHandler += CommonStackerCrane_StackerCraneTaskCompletedEventHandler; |
| | | } |
| | | |
| | | if (commonStackerCrane.StackerCraneAutoStatusValue != StackerCraneAutoStatus.Automatic |
| | | || commonStackerCrane.StackerCraneStatusValue != StackerCraneStatus.Normal) |
| | | if (commonStackerCrane.IsCanSendTask(commonStackerCrane.Communicator, commonStackerCrane.DeviceProDTOs, commonStackerCrane.DeviceProtocolDetailDTOs)) |
| | | { |
| | | return Task.CompletedTask; |
| | | } |
| | | commonStackerCrane.CheckStackerCraneTaskCompleted(); |
| | | |
| | | commonStackerCrane.CheckStackerCraneTaskCompleted(); |
| | | |
| | | if (commonStackerCrane.StackerCraneWorkStatusValue == StackerCraneWorkStatus.Standby) |
| | | { |
| | | Dt_Task? task = GetTask(commonStackerCrane); |
| | | if (task != null) |
| | | { |
| | |
| | | /// </summary> |
| | | /// <param name="commonStackerCrane">å åæºå¯¹è±¡</param> |
| | | /// <returns></returns> |
| | | private Dt_Task? GetTask(CommonStackerCrane commonStackerCrane) |
| | | private Dt_Task? GetTask(IStackerCrane commonStackerCrane) |
| | | { |
| | | Dt_Task? task = null; |
| | | if (commonStackerCrane.LastTaskType == null) |
| | |
| | | && short.TryParse(parts[2], out layer); |
| | | } |
| | | } |
| | | } |
| | | } |