Options
All
  • Public
  • Public/Protected
  • All
Menu

Class MessageEncoding

The message type flags allow a subset of MessageEncodings to be encoded in the upper two bits of the message type byte. Only NO_ENCODING and ZLIB are supported.

Hierarchy

  • MessageEncoding

Index

Constructors

constructor

  • new MessageEncoding(encodingByte: number, messageTypeFlags: number): MessageEncoding
  • Create a new message encoding object

    Parameters

    • encodingByte: number

      the encoding byte

    • messageTypeFlags: number

      bit flags

    Returns MessageEncoding

Properties

encodingByte

encodingByte: number

The encoding byte

messageTypeFlags

messageTypeFlags: number

flags indicating the message type

Methods

Static extractMessageEncoding

  • Decode the message encoding from a byte combining the message type and flags.

    Parameters

    • typeAndEncoding: number

      the encoding byte and message type flags

    Returns MessageEncoding

    the message encoding

Static extractMessageType

  • extractMessageType(typeAndEncoding: number): number
  • Decode the message type from a byte combining the message type and flags.

    Parameters

    • typeAndEncoding: number

      the encoding byte and message type flags

    Returns number

    the message type flags