protected override void WriteData(RdmBinaryWriter data)
 {
     data.Write(Id);
     data.Write(EndpointID);
     data.Write(ControlFields);
     data.Write(BindingId);
 }
Beispiel #2
0
 protected override void WriteData(RdmBinaryWriter data)
 {
     data.Write(SensorNumber);
     data.Write(PresentValue);
     data.Write(MinValue);
     data.Write(MaxValue);
     data.Write(RecordedValue);
 }
Beispiel #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);
 }
Beispiel #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));
        }
Beispiel #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);
                }
            }
Beispiel #8
0
 protected override void WriteData(RdmBinaryWriter data)
 {
     if (Mode == PlayMode.Scene)
     {
         data.WriteNetwork(SceneNumber);
     }
     else
     {
         data.WriteNetwork((short)Mode);
     }
     data.Write(Level);
 }
Beispiel #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);
 }
Beispiel #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);
                }
            }
Beispiel #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));
     ;
 }
Beispiel #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);
        }
Beispiel #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));
        }
Beispiel #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);
            }
        }
Beispiel #16
0
 protected override void WriteData(RdmBinaryWriter data)
 {
     data.Write(TestNumber);
     data.WriteNetwork(Description);
 }
Beispiel #17
0
 protected override void WriteData(RdmBinaryWriter data)
 {
     data.Write(TestNumber);
 }
Beispiel #18
0
 protected override void WriteData(RdmBinaryWriter data)
 {
     data.WriteNetwork(EndpointID);
     data.Write(Encoding.ASCII.GetBytes(Label));
 }
Beispiel #19
0
 protected override void WriteData(RdmBinaryWriter data)
 {
     data.Write(PersonalityIndex);
 }
Beispiel #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);
 }
Beispiel #22
0
 protected override void WriteData(RdmBinaryWriter data)
 {
     data.Write(PolicyID);
 }
 protected override void WriteData(RdmBinaryWriter data)
 {
     data.WriteNetwork(ControlField);
     data.Write(BindingId);
 }
Beispiel #24
0
 protected override void WriteData(RdmBinaryWriter data)
 {
     data.Write(Encoding.ASCII.GetBytes(Description));
 }
Beispiel #25
0
 protected override void WriteData(RdmBinaryWriter data)
 {
     data.Write(CurrentConnectionIP.GetAddressBytes());
     data.Write(UnhealthyTCPEvents);
     data.Write(TCPConnectEvents);
 }
Beispiel #26
0
 protected override void WriteData(RdmBinaryWriter data)
 {
     data.Write(Id);
 }
Beispiel #27
0
 protected override void WriteData(RdmBinaryWriter data)
 {
     data.Write(PolicyID);
     data.WriteNetwork(Description);
 }
Beispiel #28
0
 protected override void WriteData(RdmBinaryWriter data)
 {
     data.Write((byte)StatusType);
 }
Beispiel #29
0
 protected override void WriteData(RdmBinaryWriter data)
 {
     data.Write(IsFactoryDefaults);
 }
Beispiel #30
0
 protected override void WriteData(RdmBinaryWriter data)
 {
     data.Write((byte)LampState);
 }