public void Initialize(IPAddress ipAddress, int port)
        {
            var tcpTransport = new TcpTransport
            {
                EnableAutoReconnect = EnableAutoReconnect,
                EnableLogging       = InternalEnableLogging,
                CustomLogger        = InternalCustomLogger,
                EnableRxDebug       = InternalEnableRxDebug,
                EnableTxDebug       = InternalEnableTxDebug,
            };

            tcpTransport.Initialize(ipAddress, port);
            ConnectionTransport = tcpTransport;

            DisplayProtocol = new ChristieProjectorProtocol(ConnectionTransport, Id)
            {
                EnableLogging    = InternalEnableLogging,
                EnableStackTrace = InternalEnableStackTrace,
                CustomLogger     = InternalCustomLogger,
            };

            DisplayProtocol.StateChange += StateChange;
            DisplayProtocol.RxOut       += SendRxOut;
            DisplayProtocol.Initialize(DisplayData);
        }
Esempio n. 2
0
        public void Initialize(IPAddress ipAddress, int port)
        {
            TcpTransport tcpTransport = new TcpTransport()
            {
                EnableAutoReconnect = base.EnableAutoReconnect,
                EnableLogging       = this.InternalEnableLogging,
                CustomLogger        = this.InternalCustomLogger,
                EnableRxDebug       = this.InternalEnableRxDebug,
                EnableTxDebug       = this.InternalEnableTxDebug
            };

            TcpTransport tcpTransport1 = tcpTransport;

            tcpTransport1.Initialize(ipAddress, port);
            this.ConnectionTransport = tcpTransport1;

            BlustreamHDBTMatrixProtocol blustreamHDBTMatrixProtocol = new BlustreamHDBTMatrixProtocol(this.ConnectionTransport, base.Id)
            {
                EnableLogging = this.InternalEnableLogging,
                CustomLogger  = this.InternalCustomLogger
            };


            base.AudioVideoSwitcherProtocol = blustreamHDBTMatrixProtocol;
            BlustreamHDBTMatrixIP blustreamHDBTMatrix = this;

            base.AudioVideoSwitcherProtocol.RxOut += new RxOut(blustreamHDBTMatrix.SendRxOut);
            base.AudioVideoSwitcherProtocol.Initialize(base.AudioVideoSwitcherData);
        }
Esempio n. 3
0
        public Task <ITransport> CreateAsync(MobOperations mobOperations, Identity identity, RoutingTable routingTable, PeerTable peerTable, InboundMessageDispatcher inboundMessageDispatcher, AuditService auditService)
        {
            var inboundBytesAggregator  = auditService.GetAggregator <double>(DataSetNames.kInboundBytes);
            var outboundBytesAggregator = auditService.GetAggregator <double>(DataSetNames.kOutboundBytes);

            var tcpRoutingContextContainer = new TcpRoutingContextContainer();
            var payloadUtils = new PayloadUtils(inboundBytesAggregator, outboundBytesAggregator);
            var transport    = new TcpTransport(configuration, identity, routingTable, peerTable, inboundMessageDispatcher, tcpRoutingContextContainer, payloadUtils);

            transport.Initialize();
            mobOperations.RegisterMob(new TcpDebugMob(tcpRoutingContextContainer));
            return(Task.FromResult <ITransport>(transport));
        }
Esempio n. 4
0
        public void Initialize(IPAddress ipAddress, int port)
        {
            try
            {
                _tcpTransport = new TcpTransport
                {
                    EnableAutoReconnect = this.EnableAutoReconnect,
                    EnableLogging       = this.InternalEnableLogging,
                    CustomLogger        = this.InternalCustomLogger,
                    EnableRxDebug       = this.InternalEnableRxDebug,
                    EnableTxDebug       = this.InternalEnableTxDebug
                };

                TcpTransport tcpTransport = _tcpTransport;
                tcpTransport.Initialize(ipAddress, port);
                this.ConnectionTransport    = tcpTransport;
                tcpTransport.DriverID       = DriverID;
                base.UserAttributesChanged += RelayDriverIpUserAttributesChanged;

                _relayProtocol = new RelayProtocol(this.ConnectionTransport, base.Id, PollingInterval, _consoleDebuggingEnabled)
                {
                    EnableLogging = this.InternalEnableLogging,
                    CustomLogger  = this.InternalCustomLogger
                };

                base.DeviceProtocol = _relayProtocol;
                base.DeviceProtocol.Initialize(DriverData);
                _relayProtocol.RxOut                += SendRxOut;
                _relayProtocol.ConnectedChanged     += ProtocolConnectedChanged;
                _relayProtocol.UserAttributeChanged += ProtocolAttributeChanged;
                _relayProtocol.FeedbackChanged      += ProtocolFeedbackChanged;


                _relayEmulator = new RelayEmulator();
                _relayEmulator.StateChangedEvent += RelayEmulatorRelayStateChangedEvent;
            }
            catch (Exception ex)
            {
                CrestronConsole.PrintLine("RelayProtocol Error: {0}", ex.Message);

                if (EnableLogging)
                {
                    Log(string.Format("RelayProtocol Error: {0}", ex.Message));
                }
            }
        }
Esempio n. 5
0
        public void Initialize(IPAddress ipAddress, int port)
        {
            InternalSupportsDisconnect = false;
            InternalSupportsReconnect  = false;

            TcpTransport tcpTransport = new TcpTransport
            {
                EnableAutoReconnect = EnableAutoReconnect,
                EnableLogging       = InternalEnableLogging,
                CustomLogger        = InternalCustomLogger,
                EnableRxDebug       = InternalEnableRxDebug,
                EnableTxDebug       = InternalEnableTxDebug
            };

            tcpTransport.Initialize(ipAddress, port);
            ConnectionTransport = tcpTransport;

            DisplayProtocol = new SspCompanyVideoDisplayProtocol(ConnectionTransport, Id);
            DisplayProtocol.EnableLogging = InternalEnableLogging;
            DisplayProtocol.CustomLogger  = InternalCustomLogger;
            DisplayProtocol.StateChange  += StateChange;
            DisplayProtocol.RxOut        += SendRxOut;
            DisplayProtocol.LoadDriver(DataFile);
        }