#include <Message.h>
Public Member Functions | |
Message (RefCountBuffer buf) | |
Message (HEADER_CODE header, const AGENT &agent) | |
RefCountBuffer | serialize () |
RefCountBuffer | unpackMsg () |
bool | unpackCenterMsg (AGENT_VECTOR *agents, CENTER_PARAMS *params) |
Private Attributes | |
HEADER_CODE | _header |
RefCountBuffer | _buffer |
|
Constructs Message from message's code and the message to send. Used when we forward the message. |
|
Constructs Message for sending "Get agents" request and for unregister. Puts the fields of the agent structure in the message using the format. |
|
Packs all the message's data into the RefCountBuffer for future sending in the net. Adds the magic number and the header. |
|
Removes header from the message that is stored in class' buffer and reads the list of the agents and parameters recieved from the Center. |
|
Removes the magic number from the message that is stored in class' buffer. |
|
Buffer for storing the message itself |
|
Header for recognizing the type of the message. |