Bachelor Thesis: Event Linking Language
Topic: Conception and implementation of an event linking language for video security technology.
Project Context & Challenge
In modern security technology (CCTV), cameras and recorders generate a multitude of events (motion detection, contact inputs, video analysis, system messages). The challenge was to create a flexible system that allows these atomic events to be logically linked (e.g., “IF Camera 1 reports motion AND Contact 3 is open THEN trigger alarm”), without having to adapt the firmware source code for every new requirement.
Approach: Domain Specific Language (DSL)
Instead of hardcoded logic, a custom scripting language was developed, tailored specifically to the requirements of “Event Processing”. This enabled dynamic configuration at runtime.
- Language Definition: Design of the syntax using EBNF (Extended Backus-Naur Form) and Metasyntax for the formal description of the grammar.
- Compiler Technology: Implementation of a parser (based on PEG - Parsing Expression Grammars) that validates the script code, tokenizes it, and transforms it into an Abstract Syntax Tree (AST).
Technical Implementation (Event Engine)
The core of the work was the runtime environment (“Event Engine”), which functioned as a high-performance backend:
- Multithreading Architecture: Use of worker threads for efficient, parallel processing of incoming event streams to minimize latencies (real-time requirement).
- Network Communication: Socket-based interfaces (TCP/IP) for connecting to Dallmeier recorders and peripheral devices.
- Logic Processor: Evaluation of dependencies in the AST, including Boolean operators (
AND,OR,NOT), counters (Event Counts), and timeouts. - System Integration: The engine controlled physical I/O outputs and interacted bidirectionally with the management system SeMSy (Security Management System) to visualize alarms on site plans (Maps).
Result
The developed system abstracted the complexity of the underlying hardware. It allowed commissioning engineers to map complex alarm scenarios via simple configuration files. The clear separation of logic definition (DSL) and processing engine significantly increased the flexibility, maintainability, and scalability of the security solutions.