Communications software and architecture


  • Message is series of bits logically divided into various fields
    • At minimum there is a field describing the message type
  • In order for receiver to understand the message, there has to be set rules to define the message structure
  • Message consists of header, payload (body) and sometimes trailer
    • header gives information about the packet and its handling
      • header is parsed
    • payload is the data that is carried by the protocol
    • trailer contains information dependent on the content of the message e.g. checksum

Message Format

  • Describes
    • The structure of message e.g. how different fields are separated from each other
    • the datatype of each field (binary, integer, character…)
  • fields can be separated by
  1. Predetermined set structure
    • Bit/Byte count
  2. Notation that states the beginning and end of different fields
    • Bit oriented
    • Character oriented

Bit/Byte count

  • The message size and structure is set
    • Each field has a set location in the message
    • In principle the size of each field is predetermined
    • For fields that can have variable size (e.g. payload), a separate field is required where the current size is stated.
  • Messages are hard to interpret by human
  • No overhead
    • except the possible size fields
  • used in e.g. TCP/IP

Bit oriented


  • Fields are separated with a small set of unique bit patterns i.e. flags
    • At minimum the start and end message flags
  • Fields are usually on predetermined order
    • only field separation flag is required along with start and end message flags.
  • Bit stuffing required if data in fields can consist of bit patterns used as identifiers
  • Used in lower communication layers e.g. HDLC

Character oriented

  • Message size is multiplier of character size (usually n* 8 bits)
    • Depends on the used character type (ASCII, UTF …)
    • Character type has to be defined in specification or in message
  • Character stuffing may be required.
    • Binary data can contain any set of characters
  • Is easier to understand for human than bit oriented
  • More overhead than in bit oriented formats
  • On higher layers the notation expresses the meaning of the field
  • high level notations e.g. XML

Message envelopes

  • Communication in layered architecture
    • PDU for horizontal communication
    • Primitive for vertical communication
  • The upper layer data is enveloped by the lower layer
  • Layer n-PDU is encoded in n-1-primitive and transmitted to lower layer
    • layer n-1 uses primitive headers as help to generate layer n-1 PDU
  • layer n-1 PDU may contain whole layer n PDU or just part of it
    • n-1 layer may divide the layer n data to smaller packets
    • At the receiving side the data is reassembled by layer n-1 before given to layer n inside primitive.

Message size

  • The more data there is the better is header/data ratio.
  • The longer the message the more likely it is that there will be error during it's transmission
    • lot of retransmissions in
    • Issue in transport layer and below
  • Message have to arrive completely before it can be handled.
    • Big messages can fill buffers
Last modified: 2013/07/01 14:42