The various managers use special packets called Management Datagrams (MADs) to request that an operation (i.e., a method) be performed on a device attribute. A request MAD has the following basic characteristics:
The MAD message is wholly contained in a single packet's data payload field and the data payload field always contains exactly 256 bytes.
Some of the elements contained in the MAD are:
- If the Method is a Set operation, the data area contains the data to be written to the specified attribute.
- If the Method is a Get operation, the data area contents is undefined in the request MAD, but contains the requested attribute's contents in the corresponding response MAD returned by the device.
Upon receipt of a request MAD from its respective manager, the MA performs the operation on the indicated attribute and returns the results in a response MAD. The response MAD contains (among other things):
Status field: This 16-bit field indicates the operation's completion status. The Status field is only valid in a response MAD generated by the target in response to a request MAD. It is formatted as follows:
- Lower 8 bits = status common to all classes. These are:
- Busy, MAD discarded (not an error).
- Redirect required (not an error).
- Class not supported.
- Method not supported.
- Method/Attribute combination not supported.
- One or more Attribute fields contain bad values.
- Upper 8 bits = class-specific status.
Data field. The content of this field is defined by the type of request MAD this is a response to. Some examples would be:
- If the request was an attribute read (i.e., a Get), the data field contains the data read from the attribute indicated in the request MAD.
- If the request was an attribute write (i.e., a Set), the data field contains the data read from the attribute indicated in the request MAD after the Set operation (i.e., the attribute write) was performed.