parent
6923382485
commit
eb76cd87bb
|
@ -1550,19 +1550,6 @@ bool Monitor::Analyse() {
|
|||
Info("%s: %03d - Gone into alarm state PreAlarmCount: %u > AlarmFrameCount:%u",
|
||||
name, image_count, Event::PreAlarmCount(), alarm_frame_count);
|
||||
shared_data->state = state = ALARM;
|
||||
// lets construct alarm cause. It will contain cause + names of zones alarmed
|
||||
std::string alarm_cause="";
|
||||
for ( int i=0; i < n_zones; i++) {
|
||||
if (zones[i]->Alarmed()) {
|
||||
alarm_cause += std::string(zones[i]->Label());
|
||||
if (i < n_zones-1) {
|
||||
alarm_cause +=",";
|
||||
}
|
||||
}
|
||||
}
|
||||
alarm_cause = cause+" "+alarm_cause;
|
||||
strncpy(shared_data->alarm_cause,alarm_cause.c_str(), sizeof(shared_data->alarm_cause)-1);
|
||||
Info ("Recorded alarm cause as: %s", alarm_cause.c_str());
|
||||
if ( signal_change || (function != MOCORD && state != ALERT) ) {
|
||||
int pre_index;
|
||||
int pre_event_images = pre_event_count;
|
||||
|
@ -1607,7 +1594,18 @@ bool Monitor::Analyse() {
|
|||
event = new Event(this, *(image_buffer[pre_index].timestamp), cause, noteSetMap);
|
||||
}
|
||||
shared_data->last_event = event->Id();
|
||||
|
||||
// lets construct alarm cause. It will contain cause + names of zones alarmed
|
||||
std::string alarm_cause="";
|
||||
for ( int i=0; i < n_zones; i++) {
|
||||
if (zones[i]->Alarmed()) {
|
||||
alarm_cause += std::string(zones[i]->Label());
|
||||
if (i < n_zones-1) {
|
||||
alarm_cause +=",";
|
||||
}
|
||||
}
|
||||
}
|
||||
alarm_cause = cause+" "+alarm_cause;
|
||||
strncpy(shared_data->alarm_cause,alarm_cause.c_str(), sizeof(shared_data->alarm_cause)-1);
|
||||
//set up video store data
|
||||
snprintf(video_store_data->event_file, sizeof(video_store_data->event_file), "%s", event->getEventFile());
|
||||
video_store_data->recording = event->StartTime();
|
||||
|
|
Loading…
Reference in New Issue