Inheritance: CommandPacket
Esempio n. 1
0
        public void CreateWriteRegistersCommand()
        {
            Register[] registers = CreateRegisters();
            string networkRegisters = BitConverter.ToString(CreateNetworkRegisters());
            networkRegisters = networkRegisters.Replace("-", "");

            WriteRegisters cmd = null;
            Assert.DoesNotThrow(() => cmd = new WriteRegisters(registers));
            Assert.AreEqual("G", cmd.Command);
            Assert.AreEqual("G" + networkRegisters, cmd.Pack());
        }
Esempio n. 2
0
 private void WriteRegisters()
 {
     WriteRegisters command = new WriteRegisters(this.registers);
     this.Client.SendCommandWithoutErrorReply<OkReply>(command);
 }