[][src]Module huawei_modem::gsm_encoding

Utilities for dealing with the (annoying) GSM 7-bit encoding (GSM 03.38), and decoding/encoding message data.

"The annoying GSM 7-bit encoding" is otherwise known as GSM 03.38, and that Wikipedia article is pretty informative.

NB: SMS messages that are longer than the per-message character limit are sent & received as concatenated SMS messages. The various functions in this module will attempt to warn you about this.

Modules

udh

Utilities for dealing with User Data Headers (used for concatenated SMS, among other things) inside messages.

Structs

DecodedMessage

A decoded text mesasge, with optional user data header.

GsmMessageData

The 'data' portion of an SMS message - i.e. the text, for a simple message.

Functions

gsm_decode_string

Decode a GSM 7-bit-encoded buffer into a string.

try_gsm_encode_char

Tries to encode a character into the given destination buffer, returning true if the character was successfully encoded, and false if the character cannot be represented in the GSM 7-bit encoding.

try_gsm_encode_string

Tries to encode a string as GSM 7-bit, returning a buffer of unpacked septets iff all of the data in input was representable in the 7-bit encoding.