private bool WriteBytes(byte addr, byte[] value)
 {
     byte[] command = Sptpp.WriteCommand(value, addr);
     serialPort.Write(command, 0, command.Length);
     return(Sptpp.GetWriteResponse(serialPort) == value.Length);
 }
 private bool WriteInt32(byte addr, Int32 value)
 {
     byte[] command = Sptpp.WriteCommand(BitConverter.GetBytes(value), addr);
     serialPort.Write(command, 0, command.Length);
     return(Sptpp.GetWriteResponse(serialPort) == 4);
 }
 private bool WriteByte(byte addr, byte value)
 {
     byte[] command = Sptpp.WriteCommand(new byte[] { value }, addr);
     serialPort.Write(command, 0, command.Length);
     return(Sptpp.GetWriteResponse(serialPort) == 1);
 }