Example #1
0
        private void SetEndpointLabel(RdmNetEndPoint endpoint)
        {
            EndpointLabel.Set setLabel = new EndpointLabel.Set();
            setLabel.EndpointID = (short)endpoint.Port;
            setLabel.Label      = endpoint.PortLabel;

            acnSocket.SendRdm(setLabel, new RdmEndPoint(endpoint, 0), endpoint.Id);
        }
Example #2
0
        private void SetEndpointUniverse(RdmNetEndPoint endpoint)
        {
            EndpointToUniverse.Set setUniverse = new EndpointToUniverse.Set();
            setUniverse.EndpointID     = (short)endpoint.Universe;
            setUniverse.UniverseNumber = (short)endpoint.AcnUniverse;

            acnSocket.SendRdm(setUniverse, new RdmEndPoint(endpoint, 0), endpoint.Id);
        }
Example #3
0
        private void SetEndpointMode(RdmNetEndPoint endpoint)
        {
            EndpointMode.Set setMode = new EndpointMode.Set();
            setMode.EndpointID   = (short)endpoint.Port;
            setMode.EndpointMode = endpoint.Direction;

            acnSocket.SendRdm(setMode, new RdmEndPoint(endpoint, 0), endpoint.Id);
        }
Example #4
0
 protected void RegisterEndpoint(RdmNetEndPoint endpoint)
 {
     if (!DiscoveredEndpoints.Contains(endpoint))
     {
         endpoint.PropertyChanged += endpoint_PropertyChanged;
         DiscoveredEndpoints.Add(endpoint);
     }
 }
Example #5
0
        private void ProcessEndpointList(IPEndPoint endpoint, RdmPacket packet)
        {
            EndpointList.Reply reply = packet as EndpointList.Reply;
            if (reply != null)
            {
                foreach (int endpointId in reply.EndpointIDs)
                {
                    RdmNetEndPoint target = new RdmNetEndPoint(endpoint, endpointId)
                    {
                        Id = packet.Header.SourceId
                    };
                    RegisterEndpoint(target);

                    NewEndpointFound(this, EventArgs.Empty);

                    InterogateEndpoint(packet.Header.SourceId, target);
                }
            }
        }
Example #6
0
        private void InterogateEndpoint(UId targetId, RdmNetEndPoint endpoint)
        {
            ManufacturerLabel.Get getManufacturerLabel = new ManufacturerLabel.Get();
            acnSocket.SendRdm(getManufacturerLabel, new RdmEndPoint(endpoint, 0), targetId);

            DeviceLabel.Get getDeviceLabel = new DeviceLabel.Get();
            acnSocket.SendRdm(getDeviceLabel, new RdmEndPoint(endpoint, 0), targetId);

            EndpointLabel.Get getLabel = new EndpointLabel.Get();
            getLabel.EndpointID = (short)endpoint.Universe;
            acnSocket.SendRdm(getLabel, new RdmEndPoint(endpoint, 0), targetId);

            EndpointMode.Get getMode = new EndpointMode.Get();
            getMode.EndpointID = (short)endpoint.Universe;
            acnSocket.SendRdm(getMode, new RdmEndPoint(endpoint, 0), targetId);

            EndpointToUniverse.Get getUniverse = new EndpointToUniverse.Get();
            getUniverse.EndpointID = (short)endpoint.Universe;
            acnSocket.SendRdm(getUniverse, new RdmEndPoint(endpoint, 0), targetId);
        }
Example #7
0
        void endpoint_PropertyChanged(object sender, System.ComponentModel.PropertyChangedEventArgs e)
        {
            RdmNetEndPoint endpoint = sender as RdmNetEndPoint;

            if (endpoint != null)
            {
                if (e.PropertyName == "AcnUniverse")
                {
                    SetEndpointUniverse(endpoint);
                }
                if (e.PropertyName == "Direction")
                {
                    SetEndpointMode(endpoint);
                }
                if (e.PropertyName == "PortLabel")
                {
                    SetEndpointLabel(endpoint);
                }
            }
        }