Exemplo n.º 1
0
 def test_C_AC_NA_2_from_hex(self):
     c = app_asdu.C_AC_NA_2()
     c.from_hex(bytearray.fromhex("07 00 00 00"), None)
     self.assertEqual(c.clave, 7)
Exemplo n.º 2
0
 def test_C_AC_NA_2(self):
     c = app_asdu.C_AC_NA_2(7)
     self.assertEqual(c.to_bytes(), bytearray.fromhex("07 00 00 00"))
     self.assertEqual(c.length, 13)