Page 1 of 1
the state after alarm state
Posted: Sun Dec 18, 2005 1:01 am
by bhomass
I am looking for information like the frame with the highest score in an alarm. I believe this is available after an monitor leaves the alarm state. could some one tell me what state that would be? where would I look in zm_monitor.cpp?
in addition, is there a way to find the event image with the max score?
Posted: Sun Dec 18, 2005 8:06 am
by cordel
I sorry but I thing your going to have to better clarify your question.
Why are you looking in a source code file, and for what purpose?
You can search past events using the filter and specify the alarm scores you are looking for, is this what you are after?
Regards,
Corey
Posted: Mon Dec 19, 2005 10:43 pm
by bhomass
sorry for the abreviation. this is a follow up of the "long email delay" thread.
http://www.zoneminder.com/forums/viewtopic.php?t=5060
I want to cut into the source code to get the creation of a new event without waiting for zmfilter to poll it. I am able to get the event creation by tapping into the code at "Gone into alarm state" line in zm_monitor.cpp. however, at that point, the max_score of the event is still 0, because the event has not yet gathered all its images.
I like to know where should I tap in after all the event images have been sampled, so that I can get the image number which has the highest score. The question is which .cpp file and where in the file?
Posted: Tue Dec 20, 2005 10:42 pm
by zoneminder
The state you are talking about is the ALERT state, however this can be reactivated into the ALARM state to continue the alarm. You probably want the transition from ALERT to IDLE. Look zm_monitor.cpp for where events get destroyed ('delete event') or in the Event class destructor.
There are plenty of examples of sampling only the highest scoring event in the php files if you want to crib the SQL syntax.
Phil
Posted: Mon Dec 26, 2005 6:03 am
by bhomass
correct me if I am wrong, but I think there is a substantial delay before events are deleted. since I am looking for immediate notification after an event is generated, I should prob use the goto ALERT state trigger.
on the other hand, does "delete event" happen as soon as ALARM go into IDLE?