Reading a Skipped Alarm Property
The Publish and Subscribe framework enables a client to receive notification from the Alarm Server about the skipped alarm.
The value associated with the KMissingAlarmPubSubKey property is a TMissedAlarmPubSubData structure.
KMissingAlarmPubSubKey contains data about environmental changes and whether or not they have resulted in a skipped alarm.
The KMissingAlarmPubSubKey property value indicates if there are skipped alarms.
The subscriber reads the current value of the property to determine if there are skipped alarms. A client more usually subscribes to the property and responds to any changes by calling the ReadSkippedAlarmPropertyL() function.
iValue stores an integer that indicates if there are skipped alarms. #include <ASShdAlarm.h> // For TMissedAlarmPubSubData etc.
#include <…>
…
void CSkippedAlarmsObserver::ReadSkippedAlarmPropertyL()
{
TPckgBuf<TMissedAlarmPubSubData> skippedAlarmBuf;
User::LeaveIfError(RProperty::Get(KAlarmServerPubSubCategory, KMissingAlarmPubSubKey, skippedAlarmBuf));
if (skippedAlarmBuf().iValue == 2)
{
HandleSkippedAlarmsL();
}
}
This example illustrates the steps required to use the property value to establish if there are skipped alarms. Note: The example does not describe the procedure required to subscribe to the property.
Copyright ©2010 Nokia Corporation and/or its subsidiary(-ies).
All rights
reserved. Unless otherwise stated, these materials are provided under the terms of the Eclipse Public License
v1.0.