Ejemplo n.º 1
0
        /// <inheritdoc />
        public override ControllerNetworkConfiguration GetNetworkConfiguration()
        {
            ControllerNetworkConfiguration config = new ControllerNetworkConfiguration();

            config.SupportsUniverses = true;
            if (_data.Multicast == null)
            {
                config.TransmissionMethod = TransmissionMethods.Unicast;
                config.IpAddress          = DetermineIp().Address;
            }
            else
            {
                config.TransmissionMethod = TransmissionMethods.Multicast;
            }

            List <UniverseConfiguration> universes = new List <UniverseConfiguration>(_data.Universes.Count);

            foreach (var universeEntry in _data.Universes)
            {
                var uc = new UniverseConfiguration();
                uc.UniverseNumber = universeEntry.Universe;
                uc.Start          = universeEntry.Start + 1;
                uc.Size           = universeEntry.Size;
                uc.Active         = universeEntry.Active;
                universes.Add(uc);
            }

            config.Universes = universes;
            return(config);
        }
Ejemplo n.º 2
0
        /// <inheritdoc />
        public override ControllerNetworkConfiguration GetNetworkConfiguration()
        {
            ControllerNetworkConfiguration config = new ControllerNetworkConfiguration();

            config.SupportsUniverses = true;
            List <UniverseConfiguration> universes = new List <UniverseConfiguration>(_data.Universes.Count);

            foreach (var universeEntry in _data.Universes)
            {
                var uc = new UniverseConfiguration();
                uc.Universe    = universeEntry.Universe;
                uc.Start       = universeEntry.Start + 1;
                uc.Size        = universeEntry.Size;
                uc.Active      = universeEntry.Active;
                uc.IsMultiCast = _data.Multicast != null;
                if (!uc.IsMultiCast)
                {
                    uc.IpAddress = DetermineIp();
                }
                universes.Add(uc);
            }

            config.Universes = universes;
            return(config);
        }
Ejemplo n.º 3
0
        /*****************************************
        *    Support for FPP Universe Export
        *****************************************/
        public override ControllerNetworkConfiguration GetNetworkConfiguration()
        {
            var config = new ControllerNetworkConfiguration();

            config.SupportsUniverses  = true;
            config.IpAddress          = _data.Address;
            config.ProtocolType       = ProtocolTypes.DDP;
            config.TransmissionMethod = TransmissionMethods.Unicast;
            var universes = new List <UniverseConfiguration>(1);

            var uc = new UniverseConfiguration();

            uc.UniverseNumber = 1;    //not needed for DDP
            uc.Start          = 1;    //not needed for DDP
            uc.Size           = _outputCount;
            uc.Active         = true;
            universes.Add(uc);

            config.Universes = universes;
            return(config);
        }