3. Event Logging

2N Helios IP implements an internal event log, which records events arising in the device – such as KeyPressed, CodeEntered, CardEntered, CallStateChanged and so on.

The log capacity is 500 events. When the log fills up, any new event deletes the oldest record. Events are arranged according to date and time (TimeStamp) in the log. The maximum time resolution is 1s. Also, each event is assigned a unique 16-bit RecordId, which is automatically incremented by 1s with every new event. The RecordId code helps distinguish between records of the same date and time.

The 2N Helios IP event logs can be arranged in a table:

 

TimeStamp

RecordID

Event Type

Event Data

1

13/06/01 12:05:01

65533

CardEntered

Card=…

2

13/06/01 17:30:23

65534

CardEntered

Card=…

3

14/06/01 08:10:23

65535

KeyPressed

Key=…

4

14/06/01 08:10:23

0

KeyPressed

Key=..

500

27/06/01 17:05:01

496

CardEntered

Card=…

The first table row represents the oldest record (log beginning). The last row represents the most recent record (log end). Being a 16-bit number, the RecordID automatically overflows from 65535 to 0.

2N Helios IP defines several types of events to be logged.

EventPopis
KeyPressed Keystroke
CallStateChangedCall state change
CodeEnteredNumerical code entering
CardEnteredRFID card detection
DeviceStateDevice state change

The 2N Helios IP event log readout is based on the WS-BaseNotification standard. There are two 2N Helios IP log event retrieval modes – Subscription and PullPoint.

In the Subscription mode, 2N Helios IP sends events to the subscriber in the form of Notify messages.

In the PullPoint mode, the client sends the GetMessages request to retrieve the log data.

Data Retrieval in Subscription Mode

To retrieve events from 2N Helios IP in the Subscription mode, subscribe via the Subscribe command, specifying the type of events to be retrieved, the HTTP sending address and the subscription time.

If the subscription is successful, 2N Helios IP sends the SubscribeResponse including the Subscription Id for subsequent communication with 2N Helios IP.

Now 2N Helios IP starts sending Notify messages to the specified HTTP address. Events are sent at the moment of rise without delay. In your Subscribe request, you can specify the maximum count of events to be sent within one Notify message.

The subscription time is limited (as specified in the Subscribe request). When the subscription time expires, you will be unsubscribed automatically. To extend the subscription time, send the Renew request before expiry. 2N Helios IP will reply with the RenewResponse message.

Send the Unsubscribe request to unsubscribe explicitly. 2N Helios IP will reply with the UnsubscribeResponse message.

If there is a firewall or NAT between you and 2N Helios IP, the Subscription mode may not be convenient. The Notify messages are delivered only if the network elements are properly configured.

The figure below shows the status diagram and typical client – 2N Helios IP message sequence.


Data Retrieval in PullPoint Mode

To retrieve events from 2N Helios IP in the PullPoint mode, create the PullPoint via the CreatePullPoint request, specifying the type of events to be retrieved and the subscription time.

If the subscription is successful, 2N Helios IP sends the CreatePullPointResponse including the Subscription Id for subsequent communication with 2N Helios IP.

Now you can read out events from 2N Helios IP periodically using the GetMessages request. 2N Helios IP sends the GetMessagesResponse including the list of events. In case there is no event in the queue, the event list is empty in the response.

The subscription time is limited (as specified in the CreatePullPoint request). When the subscription time expires, you will be unsubscribed automatically. To extend the subscription time, send the Renew request before expiry. 2N Helios IP will reply with the RenewResponse message.

Send the Unsubscribe request to unsubscribe explicitly. 2N Helios IP will reply with the UnsubscribeResponse message.