SE-Projekt-LED-Detection / LED-Detection

LED-Detection is a tool for observing state leds on PCBs using a document camera.
MIT License
2 stars 2 forks source link

Publisher for state and annotated frames #84

Closed morgenmuesli closed 2 years ago

morgenmuesli commented 2 years ago

To have a more modular project, we have to split our routine into detector and publisher, which are similar to a producer (the detector) consumer (the publisher) pattern.

The publisher itself consist different kinds of publisher such as video stream, mqtt publisher and SystemIO Publisher. For the communication between those two Threads a blocking queue is needed.

sequenceDiagram
    participant detector
    participant blocking_queue
    participant publisher

    publisher->>blocking_queue: get_state()
    detector->>blocking_queue: put_current_state()
    blocking_queue-->>publisher: current_state_object
    publisher->>video_publisher: write(current_state_object.frame)
    publisher->>mqtt_publisher: publish(current_state.changes)