CAmvAlarm::amrp_sync

This field contains the time the AMRP sent the alarm to the viewer.

Syntax

CAmvAlarm* alarm_ptr;

alarm_ptr->amrp_sync;

Data Type

COR_I4

Example

This example calculates the number of hours and minutes an alarm was or has been in alarm state.

COR_I4 duration;

COR_I4 minutes;

COR_I4 seconds;

long ourtime;

cor_time_get_current_local(&ourtime);

if (alarm_ptr->cleared_time == 0)

   duration = ourtime +

      alarm_ptr->amrp_sync_offset -

         alarm_ptr->generated_time;

else

   duration = alarm_ptr->cleared_time -

      alarm_ptr->generated_time;

minutes = duration / 60;

seconds = duration - ( minutes * 60 );

See Also

CAmvAlarm::amrp_sync_offset

More information

CAmvAlarm Class member overview.