[ RCOS.java Home | RCOS Home | David's Home ]

Mail CRC

Name:

MailHeader

Comment:

The following class defines the format of an incoming/outgoing "Mail" message. The message format is layered:
  • network header (PacketHeader)
  • post office header (MailHeader)
  • data

Collaborators:

Responsibilities:

class Mail {
  public:
     Mail(PacketHeader pktH, MailHeader mailH, char *msgData);
                                // Initialize a mail message by
                                // concatenating the headers to the data

     PacketHeader pktHdr;       // Header appended by Network
     MailHeader mailHdr;        // Header appended by PostOffice
     char data[MaxMailSize];    // Payload -- message data
};