Exemplo n.º 1
0
        private void InitializeClientRdet()
        {
            _ClientSocket = new ClientSocket(Program.Log);

            ClientRdetParams csp = RdetOutboundAdapterConfigMgt.RdetOutAdapterConfig.ClientRdetParams;

            _ClientSocket.ServerIP       = csp.ServerIP;
            _ClientSocket.ServerPort     = csp.ServerPort;
            _ClientSocket.SendTimeout    = csp.SendTimeout;
            _ClientSocket.ReceiveTimeout = csp.RecTimeout;
        }
Exemplo n.º 2
0
        private void Initialization()
        {
            clientRdetParams = RdetOutboundAdapterConfigMgt.RdetOutAdapterConfig.ClientRdetParams;
            channelSet       = RdetOutboundAdapterConfigMgt.RdetOutAdapterConfig.OutboundChanels;
            LUTableSet       = RdetOutboundAdapterConfigMgt.RdetOutAdapterConfig.LookupTables;

            #region ClientRdetParameters
            this.txtLocalIP.Text        = clientRdetParams.LocalIP.ToString();
            this.txtLocalPort.Text      = clientRdetParams.LocalPort.ToString();
            this.txtServerIP.Text       = clientRdetParams.ServerIP.ToString();
            this.txtServerPort.Text     = clientRdetParams.ServerPort.ToString();
            this.txtInterval.Text       = RdetOutboundAdapterConfigMgt.RdetOutAdapterConfig.OutGeneralParams.TimerInterval.ToString();
            this.txtConnectTimeout.Text = clientRdetParams.ConnectTimeout.ToString();
            this.txtTryCount.Text       = clientRdetParams.ConnectTryCount.ToString();
            this.txtReceiveTimeout.Text = clientRdetParams.RecTimeout.ToString();
            this.txtSendTimeout.Text    = clientRdetParams.SendTimeout.ToString();
            #endregion
            #region Channel
            if (channelSet != null)
            {
                if (channelSet.Count != 0)
                {
                    ShowChannelSetInformation();
                }
                channelIndex = -1;     //It sign that there is no channel in the channelset
            }
            else
            {
                //Never occur as RdetOutAdapterConfigMgt.RdetOutAdapterConfig was be constuctured
                channelSet = new XCollection <RdetOutChannel>();
            }
            #endregion
            #region Look up tables
            if (LUTableSet != null)
            {
                if (LUTableSet.Count != 0)
                {
                    ShowLUTableSetInformation();
                }
                tableIndex = -1;     //It sign that there is no channel in the channelset
            }
            else
            {
                //Never occur as RdetOutAdapterConfigMgt.RdetOutAdapterConfig was be constuctured
                LUTableSet = new XCollection <LookupTable>();
            }
            #endregion
        }