D.2 Message Format

All data travel over the net in form of messages. Messages are sent by the same mechanism and have always a standard format. Every message has two parts :

D.2.1 Message Head

The message head is implemented as a struct :


typedef struct MSG_COMMONtag
{
  int msgTag;
  int priority;
  int senderType;
  int specMsgTag;
  int msgLen;
  int senderPid;
  int contentType;
  int amount;
} MSG_COMMON;
typedef MSG_COMMON * LPMSG_COMMON;

where :

D.2.2 Message Data

The message data can be either a sequence of values of one simple type (like integers, doubles - see above) or it can be a type map. Type map format :

[: <type><amount><(amount) of scalar values of (type)> :]

where type (BYTE) specifies the type of data transferred (type specification see above - entry contentType in message head), amount (BYTE) specifies the amount of values of the specified type in the sequence.

Type maps are widely used in serialization (for specification see Overview). Serialization is in fact a creation of type map representing a certain object. There are useful methods in TObj for serialization of all simple data types so the programmer does not need to create type maps manually.

Programmer's Guide Project Antares