예제 #1
0
        public void TraceDataInitializationRequestEvent(TraceDataInitializationRequest traceDataInitializationRequest, bool needReply = true)
        {
            if (!needReply)
            {
                return;
            }
            TraceDataInitializationReport report = new TraceDataInitializationReport()
            {
                TRID     = traceDataInitializationRequest.TRID,
                SMPLN    = "00001",
                STIME    = DateTime.Now.ToString("yyyyMMddHHmmss"),
                SVIDLIST = new Func <SVIDS>(() =>
                {
                    SVIDS svidList = new SVIDS();
                    svidList.Add(new SVIDS()
                    {
                        SVID = "10003",
                        SV   = "0.015",
                    });
                    svidList.Add(new SVIDS()
                    {
                        SVID = "10004",
                        SV   = "0.015",
                    });
                    return(svidList);
                })(),
            };

            cimClient?.LaunchTraceDataInitializationReportProcess(report);
        }
예제 #2
0
        public void HandleSecsMessage(SecsMessage secsMessage)
        {
            PrimaryMessage = secsMessage;
            switch (PrimaryMessage.GetSFString())
            {
            case "S6F3":    //Discrete Variable Data Send
                SubScenarioName = Resource.DCS_Discrete_Variable_Data_Send;
                PrimaryMessage.S6F4(0);
                break;

            case "S2F23":    // trace data initialization request
                SubScenarioName = Resource.DCS_Host_Initiates_Trace_Report;
                PrimaryMessage.S2F24("0");
                TraceDataInitializationRequest traceDataInitializationRequest = new TraceDataInitializationRequest();
                traceDataInitializationRequest.Parse(PrimaryMessage.SecsItem);
                dataCollection.TraceDataInitializationRequestEvent(traceDataInitializationRequest);
                break;

            case "S6F1":
                break;

            case "S1F3":    // Selected Equipment Status Request
                SubScenarioName = Resource.DCS_Host_request_value_status;
                handleS1F3();
                break;

            case "S1F5":    // Request formatted status
                SubScenarioName = Resource.DCS_Host_request_Formatted_status;
                handleS1F5();
                break;

            case "S2F13":    // equipment constants request
                SubScenarioName = Resource.DCS_Equipment_Constants_Request;
                handleS2F13();
                break;

            case "S2F15":    // X
                break;

            case "S2F37":    // host request enable or disable events
                SubScenarioName = Resource.DCS_Host_Requests_Enable_Disable_Event;
                handleS2F37();
                break;

            default:
                break;
            }
        }
예제 #3
0
 public void TraceDataInitializationRequestEvent(TraceDataInitializationRequest traceDataInitializationRequest, bool needReply = true)
 {
     throw new NotImplementedException();
 }
예제 #4
0
 /// <summary>
 /// 接口方法,触发事件,无需调用
 /// </summary>
 public void TraceDataInitializationRequestEvent(TraceDataInitializationRequest traceDataInitializationRequest, bool needReply = true)
 {
     OnTraceDataInitializationRequest?.Invoke(this, new CIMEventArgs <TraceDataInitializationRequest>(traceDataInitializationRequest, needReply));
 }