Inheritance: CommandPacket
示例#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());
        }
示例#2
0
 private void WriteRegisters()
 {
     WriteRegisters command = new WriteRegisters(this.registers);
     this.Client.SendCommandWithoutErrorReply<OkReply>(command);
 }