Implementation Specifics

Each event description from the response of GetEventProperties is matched against the currently implemented events and if there is a match with existing scheme the event is discarded. All other events have their topic generated form the event description XML tree and are then added to the corresponding device type based on the following rule: if the topic value has “Audio” it is moved to the “Audio In” events, if it has “Device” and any one of the following: “Output”, “Relay” or “Input” it is moved to the “Input” events, anything else is added to the "Video” events. Based on the event properties types the dynamic event could have different behaviour. If there is a property with type Boolean, the event will be with Rising/Falling after its name. If there is a property with type Integer, the event will have Event Index property (Window option) in MA. All event properties with type Token will be checked against the assigned device (Video, Audio, Input) Token, i.e., for video device the tokens used for matching will be VideoSoureTokens.

When an event is received from the device PullMessagesResponse it is first matched against the already defined in the previous section events, if there is no match a search based on the event topic is performed in the dynamic event list. If this search is successful, based on the provide event info for the event Sources the driver determines the device channel, event window and current state. The channel is determined as described in the previous paragraph: first the driver checks the token in the corresponding token list (Video, Audio, I/O), if there is no such token the driver checks in the device configuration tokens and if there is no match again the channel is defaulted to 0.

Windowed events have an extra check to determine which window has triggered the event. If the event description has an Integer type this is considered as window number and in the event check it is converted to correspond to the event window with zero base indexing, i.e., an event has a Source with name Index and type Integer, when matching – this field will be used as zero-based event/window index.

The event state is checked only if the event has a property with type Boolean. If the event reports active/triggered state the “rising” event will be triggered, if the event reports inactive state the “falling” event will be triggered.