ngcp-project / progress-board-tracker

Empty repository only meant for tracking cards inside project boards in NGCP
0 stars 0 forks source link

feat(rabbitmq): Telemetry publisher for vehicle-side library #34

Open marked01one opened 8 months ago

marked01one commented 8 months ago

Issue Goal

The main goal is to create a class within the vehicle-side library that can be used to publish RabbitMQ messages to a subscriber running on GCS.

How It Should Work

On vehicle-side, the code for sending telemetry would probably look something like this:

# `integration` is the supposed name of the library
from integration.Telemetry import TelemetryRabbitMQ
from integration.Types import Telemetry

# Initializing a telemetry object should initiate a connection towards the RabbitMQ broker server
# We use ERU as an example here, but this should work with any vehicle.
telemetry = TelemetryRabbitMQ(vehicleName="ERU")

while True:
    data = Telemetry(
        # Parameters for Telemetry type goes here
    )
    telemetry.publish(vehicleData=data)

Your class implementation should abstract the process of connecting and publishing messages to RabbitMQ to 2-3 operations max.

Also a quick reminder of how the Vehicle-to-GCS integration model looks like. Image

marked01one commented 8 months ago

Please lemme know if any of this is confusing. We can set up some sort of coding session to answer any blockers or questions!