コード例 #1
0
ファイル: RdmRouteBinding.cs プロジェクト: AvolitesLtd/ACN
        public RdmRouteBinding(RdmRouter parent, IRdmTransport transport, string name, string description, int priority)
        {
            this.parent = parent;

            Transport   = transport;
            Name        = name;
            Description = description;
            Priority    = priority;
        }
コード例 #2
0
        /// <summary>
        /// Gets the universe index for a specific endpoint address.
        /// </summary>
        /// <param name="address">The device address.</param>
        /// <returns>
        /// The DMX universe that this address resolves to.
        /// </returns>
        /// <exception cref="System.InvalidOperationException">No transport exists for this device address.</exception>
        /// <remarks>
        /// The transport may wish to resolve this to an internal addressing scheme.
        /// </remarks>
        public int ResolveEndpointToUniverse(RdmEndPoint address)
        {
            IRdmTransport transport = GetTransportForDevice(address.Id);

            if (transport == null)
            {
                throw new InvalidOperationException("No transport exists for this device address.");
            }
            return(transport.ResolveEndpointToUniverse(address));
        }
コード例 #3
0
ファイル: SnoopMain.cs プロジェクト: ming-hai/ACN
        private void artNetSelect_Click(object sender, EventArgs e)
        {
            if (!(Transport is ArtNet))
            {
                StopTransport();
                Transport = new ArtNet();
                StartTransport();
            }

            rdmNetSelect.Checked = false;
            artNetSelect.Checked = true;
            routerSelect.Checked = false;
        }
コード例 #4
0
ファイル: SnoopMain.cs プロジェクト: ming-hai/ACN
        private void routerSelect_Click(object sender, EventArgs e)
        {
            RdmRouter newRouter = CreateRouter();

            //Change Transpaort
            if (!(Transport is RdmRouter))
            {
                StopTransport();
                Transport = newRouter;
                StartTransport();
            }

            rdmNetSelect.Checked = false;
            artNetSelect.Checked = false;
            routerSelect.Checked = true;
        }
コード例 #5
0
ファイル: SnoopMain.cs プロジェクト: ming-hai/ACN
        private void SnoopMain_Load(object sender, EventArgs e)
        {
            autoInterogateSelect.Checked = AutoInterogate;

            if (Properties.Settings.Default.Transport == typeof(ArtNet).Name)
            {
                Transport = new ArtNet();

                rdmNetSelect.Checked = false;
                artNetSelect.Checked = true;
            }
            else if (Properties.Settings.Default.Transport == typeof(RdmRouter).Name)
            {
                Transport = CreateRouter();
            }
            else
            {
                Transport = new RdmNet();
            }

            StartTransport();
        }
コード例 #6
0
 public void RegisterTransport(IRdmTransport transport, string name, string description, int priority)
 {
     RegisterTransport(new RdmRouteBinding(this, transport, name, description, priority));
 }