Documentation
UnregisterMessage
Require: IP-Symcon >= 4.1
void UnregisterMessage (int $SenderID, int $MessageID)
Parameters
SenderID | ID of the sender |
MessageID | ID of the message |
Returns
No Return
Description
This function removes a registration of the module for receiving the message MessageID and the ID SenderID.
A list of the MessageIDs can be found here: Messages
Example
// The module no longer "listens" for messages from instance 12345 with MessageID 10505
$this->UnregisterMessage(12345 /* InstanceID */, 10505 /* IM_CHANGESTATUS */);
//All messages from the module should be deleted
//Delete all registrations in order to read them
foreach ($this->GetMessageList() as $senderID => $messages) {
foreach ($messages as $message) {
$this->UnregisterMessage($senderID, $message);
}
}