mqtt/pdu.py
def encode16Int(value):
    '''
    Encodes a 16 bit unsigned integer into MQTT format.
    Returns a bytearray
    '''
    value      = int(value)
    encoded    = bytearray(2)
    encoded[0] = value >> 8
    encoded[1] = value & 0xFF
    return encoded
def encode16Int(value):
    '''
    Encodes a 16 bit unsigned integer into MQTT format.
    Returns a bytearray
    '''
    value      = int(value)
    encoded    = bytearray(2)
    encoded[0] = value >> 8
    encoded[1] = value & 0xFF
    return encoded
Encodes a 16 bit unsigned integer into MQTT format.
    Returns a bytearray