Message Content
A message consists of the following parts.
- Source – a process or process_ref
- Destination – one or more processes
- Tag – an integer ID for the message
- Content – the data in the message, the reason the message is being sent
The data sent by a message is held in an array of objects of a specific datatype. The message content could be wrapped up into a single object that looks like this.
- A datatype
- An array of objects that match the datatype
- A count of the number of objects in the array
It may be useful to define a message_content, but it seems less likely that a message object will be useful. The sender of the message is probably not interested in the source since it is itself, and the receiver will probably not be interested in the destination.
For the receiver, the message content also includes a status object which tells the receiver how many objects were actually delivered and whether an error occurred.