ark::catalog::TelemetryQueue

Defined in header “ark/catalog/telemetry/telemetry_queue.hh”.


This queue is used to store telemetry events, and then handles packaging them up for pushing up to a remote server. Can also handle storage on local disk in the event that comms is not available or the system is down.

Methods

  • TelemetryQueue(const core::Guid & organization_id, std::string name, std::chrono::steady_clock::time_point session_start_time)
    Constructs the queue with the given timestamp as its official start time. The telemetry queue will populate messages with the given organization ID and human-readable name.

  • void set_robot_information(SetTelemetryRobot robot)
    Sets the last received robot information. This is the robot that all telemetry is tagged with.

  • void set_debuglog_line_limit(size_t limit_count)
    Set the debuglog line limit.

  • void insert_telemetry_values(const TelemetryValueGroup & message)
    Inserts a batch of telemetry values into the queue.

  • void insert_event(TelemetryEvent event)
    Inserts a discrete outgoing event into the queue.

  • void insert_bag(TelemetryBag bag)
    Inserts an bag to be written to the remote system.

  • void insert_bag_object(TelemetryBagObject object)
    Inserts an object (related to an bag) to be written to the remote system.

  • void insert_debuglog_group(debuglog::DebugLogOutputGroup group)
    Insert debuglog messages to be written to the remote and transferred to CloudWatchLogs.

  • std::optional< UpdateRobotTelemetryRequest > pop_all(std::chrono::steady_clock::time_point now, const time::TimeModel< std::chrono::steady_clock, std::chrono::system_clock > & global_time_model)
    Dequeues all of the queued events, and returns a structure suitable for transmission over the wire to the catalog.

  • void requeue(const UpdateRobotTelemetryRequest & request)
    Requeues a previously dequeued telemetry request update. Invoke this if the catalog fails to accept the request.

  • std::string robot_serial()
    Returns the current robot serial number.

  • const std::string & session_name()
    Returns the name of this session.