Beispiel #1
0
        public void TestRockerSwitch_R2_TeachIn()
        {
            DispatcherMock.Instance.Clear();
            var driver = CreateDriverForF6("FEF7D96E",
                                           EnOceanRorgF6Data.DataFieldF6_02_01_1_R2_Guid);

            var telegram = CreatePacket("55000707017AF630FEF7D96E0001FFFFFFFF460039");

            driver.TelegramReceived(telegram);

            Assert.True(RadioErp1Packet.IsTechIn(telegram));
        }
Beispiel #2
0
        public void Test_PackageParseNoLearnMode()
        {
            var byteData = Automatica.Core.Driver.Utility.Utils.StringToByteArray("55000707017AD508019C20150001FFFFFFFF500088");

            var packet = EnOceanPacket.Parse(byteData);

            var radioErp1 = new RadioErp1Packet();

            radioErp1.FromPacket(packet);

            Assert.False(RadioErp1Packet.IsTechIn(radioErp1));
            Assert.Equal(EnOcean.PacketType.RadioErp1, packet.PacketType);
            Assert.False(packet.SecurityLevel);
        }
Beispiel #3
0
 private void TelegramReceivedEventHandler(object sender, PacketReceivedEventArgs packetReceivedEventArgs)
 {
     if (packetReceivedEventArgs.Telegram is RadioErp1Packet radio1 && _learnModeActive && RadioErp1Packet.IsTechIn(radio1))
     {
         TeachInReceived?.Invoke(sender, packetReceivedEventArgs);
     }
     TelegramReceived?.Invoke(sender, packetReceivedEventArgs);
 }
Beispiel #4
0
        public void TestA5_11_01_Data_TeachIn2()
        {
            var telegram = CreatePacket("55000707017AF6D000211D5A2001FFFFFFFF500002");

            Assert.True(RadioErp1Packet.IsTechIn(telegram));
        }
Beispiel #5
0
        public void TestA5_11_01_Data_TeachIn()
        {
            var telegram = CreatePacket("55000A0701EBA500008E48FFA8AB000001FFFFFFFF560073");

            Assert.False(RadioErp1Packet.IsTechIn(telegram));
        }