Net::MQTT::Constants - Module to export constants for MQTT protocol
version 1.163170
use Net::MQTT::Constants;
Module to export constants for MQTT protocol.
FUNCTIONS
decode_remaining_length( $data, \$offset )
Calculates the remaining length from the bytes in $data starting at the offset read from the scalar reference. The offset reference is subsequently incremented by the number of bytes processed.
remaining length
$data
encode_remaining_length( $length )
Calculates the remaining length bytes from the length, $length, and returns the packed bytes as a string.
$length
decode_byte( $data, \$offset )
Returns a byte by unpacking it from $data starting at the offset read from the scalar reference. The offset reference is subsequently incremented by the number of bytes processed.
encode_byte( $byte )
Returns a packed byte.
decode_short( $data, \$offset )
Returns a short (two bytes) by unpacking it from $data starting at the offset read from the scalar reference. The offset reference is subsequently incremented by the number of bytes processed.
encode_short( $short )
Returns a packed short (two bytes).
decode_string( $data, \$offset )
Returns a string (short length followed by length bytes) by unpacking it from $data starting at the offset read from the scalar reference. The offset reference is subsequently incremented by the number of bytes processed.
encode_string( $string )
Returns a packed string (length as a short and then the bytes of the string).
qos_string( $qos_value )
Returns a string describing the given QoS value.
message_type_string( $message_type_value )
Returns a string describing the given message_type value.
message_type
dump_string( $data )
Returns a string representation of arbitrary data - as a string if it contains only printable characters or as a hex dump otherwise.
connect_return_code_string( $return_code_value )
Returns a string describing the given connect_return_code value.
connect_return_code
Mark Hindess <soft-cpan@temporalanomaly.com>
This software is copyright (c) 2014 by Mark Hindess.
This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.
To install Net::MQTT::Message, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Net::MQTT::Message
CPAN shell
perl -MCPAN -e shell install Net::MQTT::Message
For more information on module installation, please visit the detailed CPAN module installation guide.