code: def request_pdu(self):
          
          if None in [self.starting_address, self.quantity]:
              # TODO Raise proper exception.
              raise Exception
  
          return struct.pack('>BHH', self.function_code, self.starting_address,
                             self.quantity)
docs: Build request PDU to read coils.
  
          :return: Byte array of 5 bytes with PDU.