Sierra Toolkit Version of the Day
|MessageCode (size_t throttle_cutoff=5, int throttle_group=MSG_APPLICATION)|
|MessageCode (MessageId message_id, size_t throttle_cutoff, int throttle_group)|
|Message identifier. |
|Throttle characteristics. |
|Default message code. |
Class MessageCode declares a message identifier and throttle characteristics for a message. THESE MUST BE DECLARED STATIC.
All messages have an associated message code. This message code is used to identify a message for throttling and aggregation.
Message identifiers must be consist from reference to reference, unique for each instance, and yet consist within each instance across multiple processors. To meet these criteria, the message identifier is implemented as a static memory location. It must be declared by the application developer as static. This results in the linker selecting an address for each instance, which never changes from reference to reference, is unique for each instance and the same regardless of executable (assuming the executable is mapped into the same memory location for each process). In order to remove the pointer-ness of the static memory location, the address is cast to a pointer difference type which is an integral type by subtracting the zero pointer from it.
Creates a new MessageCode instance. Be particularly careful when usnig this constructor. The message_id value must be the same on all processors for deferred message reporting to work properly.
|message_id||a MessageId value of the message id. This value must be the same for each message across all processors.|
|throttle_cutoff||a size_t value to display before the message is no longer displayed.|
|throttle_group||an int value to identify the throttle group that this message belongs to.|