Introduce a method update the noteSetMap after event creation (addNote).

This commit is contained in:
Isaac Connor 2022-01-03 19:03:04 -05:00
parent 205ff6c033
commit 7215756fed
2 changed files with 17 additions and 12 deletions

View File

@ -291,6 +291,10 @@ void Event::createNotes(std::string &notes) {
}
} // void Event::createNotes(std::string &notes)
void Event::addNote(const char *cause, const std::string &note) {
noteSetMap[cause].insert(note);
}
bool Event::WriteFrameImage(Image *image, SystemTimePoint timestamp, const char *event_file, bool alarm_frame) const {
int thisquality =
(alarm_frame && (config.jpeg_alarm_file_quality > config.jpeg_file_quality)) ?

View File

@ -110,6 +110,7 @@ class Event {
uint64_t Id() const { return id; }
const std::string &Cause() const { return cause; }
void addNote(const char *cause, const std::string &note);
int Frames() const { return frames; }
int AlarmFrames() const { return alarm_frames; }