Esempio n. 1
0
 public CStationFrames02_SF(CStationData_SF _StationData, CPortData_SF[] _PortData, CCommunicationChannel _ComChannel, byte _StationNumDevice)
 {
     m_StationData = _StationData;
     m_PortData    = _PortData;
     m_ComChannel  = _ComChannel;
     m_ComChannel.MessageResponse += ProcessMessageResponse;
     m_ComChannel.ConnectionError += ComChannelConnectionError;
     m_ComChannel.ResetSended     += ComChannelResetSended;
     m_StationNumDevice            = _StationNumDevice;
 }
Esempio n. 2
0
        public Remote_StackSF(ref JBCStationControllerServiceClient hostService, string hostStnUUID)
        {
            connectErrorStatus = EnumConnectError.NO_ERROR;

            ServiceProtocol          = CStation.EnumProtocol.Protocol_01;
            TimerManagement          = new System.Timers.Timer();
            TimerManagement.Elapsed += TimerStatus_Tick;
            TimerManagement.Elapsed += TimerStatus_Tick;
            TimerManagement.Elapsed += TimerStatus_Tick;

            // Se paran los timer por si acaso hasta que se optenga la conexión correcta
            TimerManagement.Interval  = TIMER_STATUS_TIME;
            TimerManagement.AutoReset = false;             // se debe activar de nuevo al salir del evento Elapsed
            TimerManagement.Stop();
            // Se crea la instancia de la clase Station
            Info_Station = new CStationData_SF();

            // Se guarda el servicio y el ID de estación del host
            SaveHostService(hostService, hostStnUUID);

            //Await LoadInitStationInfoAsync()
            //Ejecutar sin Async porque no puedo especificar Await
            LoadInitStationInfo();
        }