Esempio n. 1
0
 protected override void WriteData(RdmBinaryWriter data)
 {
     data.Write(Id);
     data.Write(EndpointID);
     data.Write(ControlFields);
     data.Write(BindingId);
 }
Esempio n. 2
0
 protected override void WriteData(RdmBinaryWriter data)
 {
     data.Write(SensorNumber);
     data.Write(PresentValue);
     data.Write(MinValue);
     data.Write(MaxValue);
     data.Write(RecordedValue);
 }
Esempio n. 3
0
 protected override void WriteData(RdmBinaryWriter data)
 {
     data.WriteNetwork(RdmProtocolVersion);
     data.WriteNetwork(DeviceModelId);
     data.WriteNetwork((short)ProductCategory);
     data.WriteNetwork(SoftwareVersionId);
     data.WriteNetwork(DmxFootprint);
     data.Write(DmxPersonality);
     data.Write(DmxPersonalityCount);
     data.WriteNetwork(DmxStartAddress);
     data.WriteNetwork(SubDeviceCount);
     data.Write(SensorCount);
 }
 protected override void WriteData(RdmBinaryWriter data)
 {
     data.Write(SensorNumber);
     data.Write((byte)Type);
     data.Write((byte)Unit);
     data.Write((byte)Prefix);
     data.Write(RangeMinValue);
     data.Write(RangeMaxValue);
     data.Write(NormalMinValue);
     data.Write(NormalMaxValue);
     data.Write(RecordValueSupport);
     data.Write(Description);
 }
Esempio n. 5
0
        public void SendBackgroundRdm(RdmPacket packet)
        {
            if (!IsTcpConnectionAlive())
            {
                throw new InvalidOperationException("No healthy TCP connection exists for RDMNet broadcast.");
            }

            //Fill in addition details
            packet.Header.SourceId      = RdmSourceId;
            packet.Header.DestinationId = UId.Broadcast;

            //Create Rdm Packet
            MemoryStream    rdmData   = new MemoryStream();
            RdmBinaryWriter rdmWriter = new RdmBinaryWriter(rdmData);

            //Write the RDM sub-start code.
            rdmWriter.Write((byte)RdmVersions.SubMessage);

            //Write the RDM packet
            RdmPacket.WritePacket(packet, rdmWriter);

            //Write the checksum
            rdmWriter.WriteNetwork((short)RdmPacket.CalculateChecksum(rdmData.GetBuffer()));

            //Create sACN Packet
            RdmNetPacket dmxPacket = new RdmNetPacket();

            dmxPacket.Framing.SourceName = SourceName;
            dmxPacket.Framing.EndpointID = (short)0;
            dmxPacket.RdmNet.RdmData     = rdmData.GetBuffer();

            AliveTcpSocket.SendPacket(dmxPacket);

            RaiseRdmPacketSent(new NewPacketEventArgs <RdmPacket>(null, packet));
        }
Esempio n. 6
0
 protected override void WriteData(RdmBinaryWriter data)
 {
     foreach (UId id in DeviceIds)
     {
         data.Write(id);
     }
 }
            protected override void WriteData(RdmBinaryWriter data)
            {
                data.WriteNetwork(EndpointID);
                data.WriteNetwork(ListChangeNumber);

                foreach (UId id in DeviceIds)
                {
                    data.Write(id);
                }
            }
Esempio n. 8
0
 protected override void WriteData(RdmBinaryWriter data)
 {
     if (Mode == PlayMode.Scene)
     {
         data.WriteNetwork(SceneNumber);
     }
     else
     {
         data.WriteNetwork((short)Mode);
     }
     data.Write(Level);
 }
Esempio n. 9
0
 protected override void WriteData(RdmBinaryWriter data)
 {
     data.Write(ClockTime.Year);
     data.Write(ClockTime.Month);
     data.Write(ClockTime.Day);
     data.Write(ClockTime.Hour);
     data.Write(ClockTime.Minute);
     data.Write(ClockTime.Second);
 }
Esempio n. 10
0
            protected override void WriteData(RdmBinaryWriter data)
            {
                if (StatusMessages.Count > 25)
                {
                    throw new InvalidPacketException("A maximum of 25 status messages is allowed.");
                }

                foreach (Status item in StatusMessages)
                {
                    data.WriteNetwork(item.SubDeviceId);
                    data.Write((byte)item.StatusType);
                    data.WriteNetwork(item.StatusMessageId);
                    data.WriteNetwork(item.DataValue1);
                    data.WriteNetwork(item.DataValue2);
                }
            }
Esempio n. 11
0
 protected override void WriteData(RdmBinaryWriter data)
 {
     data.WriteNetwork((ushort)ParameterId);
     data.Write(PDLSize);
     data.Write(DataType);
     data.Write(CommandClass);
     data.Write(Type);
     data.Write(Unit);
     data.Write(Prefix);
     data.WriteNetwork(MinValidValue);
     data.WriteNetwork(MaxValidValue);
     data.WriteNetwork(DefaultValue);
     data.Write(Encoding.ASCII.GetBytes(Description));
     ;
 }
Esempio n. 12
0
        public override void WriteData(ArtNetBinaryWriter data)
        {
            RdmBinaryWriter writer = new RdmBinaryWriter(data.BaseStream);

            base.WriteData(data);

            writer.Write(RdmVersion);
            writer.Write(new byte[1]);
            writer.Write(DeviceId);
            writer.Write(new byte[1]);
            writer.Write((byte)Command);
            writer.WriteNetwork((short)ParameterId);
            writer.WriteNetwork(SubDevice);
            writer.WriteNetwork(SubCount);
            writer.Write(new byte[4]);
            writer.Write(RdmData);
        }
Esempio n. 13
0
        public void SendRdm(RdmPacket packet, RdmEndPoint targetAddress, UId targetId, UId sourceId)
        {
            if (BlockRDM)
            {
                return;
            }

            //Fill in addition details
            packet.Header.SourceId      = sourceId;
            packet.Header.DestinationId = targetId;

            SubDeviceUId id = targetId as SubDeviceUId;

            if (id != null)
            {
                packet.Header.SubDevice = id.SubDeviceId;
            }

            //Create Rdm Packet
            MemoryStream    rdmData   = new MemoryStream();
            RdmBinaryWriter rdmWriter = new RdmBinaryWriter(rdmData);

            //Write the RDM sub-start code.
            rdmWriter.Write((byte)RdmVersions.SubMessage);

            //Write the RDM packet
            RdmPacket.WritePacket(packet, rdmWriter);

            //Write the checksum
            rdmWriter.WriteNetwork((short)RdmPacket.CalculateChecksum(rdmData.GetBuffer()) + (byte)DmxStartCodes.RDM);

            //Create sACN Packet
            RdmNetPacket dmxPacket = new RdmNetPacket();

            dmxPacket.Framing.SourceName = SourceName;
            dmxPacket.Framing.EndpointID = (short)targetAddress.Universe;
            dmxPacket.RdmNet.RdmData     = rdmData.GetBuffer();

            SendPacket(dmxPacket, targetAddress);

            RaiseRdmPacketSent(new NewPacketEventArgs <RdmPacket>(targetAddress, packet));
        }
Esempio n. 14
0
            protected override void WriteData(RdmBinaryWriter data)
            {
                data.WriteNetwork(EndpointID);

                switch (EndpointMode)
                {
                case UniverseMode.Disabled:
                    data.WriteNetwork((short)0);
                    break;

                case UniverseMode.Composite:
                    data.WriteNetwork((ushort)65535);
                    break;

                default:
                    data.WriteNetwork(UniverseNumber);
                    break;
                }

                data.Write((byte)EndpointType);
            }
        public override void WriteData(ArtNetBinaryWriter data)
        {
            base.WriteData(data);

            var rdmWriter = new RdmBinaryWriter(data.BaseStream);

            data.Write(RdmVersion);
            data.Write(Port);
            data.Write(new byte[7]);
            data.Write(Net);
            data.Write(Command);
            data.Write(Universe);
            rdmWriter.WriteNetwork(UIdTotal);
            data.Write(BlockCount);
            data.Write((byte)Devices.Count);

            foreach (UId id in Devices)
            {
                rdmWriter.Write(id);
            }
        }
Esempio n. 16
0
 protected override void WriteData(RdmBinaryWriter data)
 {
     data.Write(TestNumber);
     data.WriteNetwork(Description);
 }
Esempio n. 17
0
 protected override void WriteData(RdmBinaryWriter data)
 {
     data.Write(TestNumber);
 }
Esempio n. 18
0
 protected override void WriteData(RdmBinaryWriter data)
 {
     data.WriteNetwork(EndpointID);
     data.Write(Encoding.ASCII.GetBytes(Label));
 }
Esempio n. 19
0
 protected override void WriteData(RdmBinaryWriter data)
 {
     data.Write(PersonalityIndex);
 }
Esempio n. 20
0
 protected override void WriteData(RdmBinaryWriter data)
 {
     data.Write(CurrentPersonalityIndex);
     data.Write(PersonalityCount);
 }
 protected override void WriteData(RdmBinaryWriter data)
 {
     data.WriteNetwork(EndpointID);
     data.Write(IdentifyOn);
 }
Esempio n. 22
0
 protected override void WriteData(RdmBinaryWriter data)
 {
     data.Write(PolicyID);
 }
Esempio n. 23
0
 protected override void WriteData(RdmBinaryWriter data)
 {
     data.WriteNetwork(ControlField);
     data.Write(BindingId);
 }
Esempio n. 24
0
 protected override void WriteData(RdmBinaryWriter data)
 {
     data.Write(Encoding.ASCII.GetBytes(Description));
 }
Esempio n. 25
0
 protected override void WriteData(RdmBinaryWriter data)
 {
     data.Write(CurrentConnectionIP.GetAddressBytes());
     data.Write(UnhealthyTCPEvents);
     data.Write(TCPConnectEvents);
 }
Esempio n. 26
0
 protected override void WriteData(RdmBinaryWriter data)
 {
     data.Write(Id);
 }
Esempio n. 27
0
 protected override void WriteData(RdmBinaryWriter data)
 {
     data.Write(PolicyID);
     data.WriteNetwork(Description);
 }
Esempio n. 28
0
 protected override void WriteData(RdmBinaryWriter data)
 {
     data.Write((byte)StatusType);
 }
Esempio n. 29
0
 protected override void WriteData(RdmBinaryWriter data)
 {
     data.Write(IsFactoryDefaults);
 }
Esempio n. 30
0
 protected override void WriteData(RdmBinaryWriter data)
 {
     data.Write((byte)LampState);
 }