code: def request_pdu(self):
          
          if None in [self.address, self.value]:
              # TODO Raise proper exception.
              raise Exception
  
          return struct.pack('>BH' + conf.TYPE_CHAR, self.function_code,
                             self.address, self.value)
docs: Build request PDU to write single register.
  
          :return: Byte array of 5 bytes with PDU.