ORE Studio 0.0.4
Loading...
Searching...
No Matches
Public Member Functions | List of all members
telemetry_streaming_service Class Referencefinal

Service for streaming telemetry logs to the server. More...

#include <telemetry_streaming_service.hpp>

Collaboration diagram for telemetry_streaming_service:
Collaboration graph

Public Member Functions

 telemetry_streaming_service (std::shared_ptr< net::client > client, telemetry_streaming_options options)
 Constructs the telemetry streaming service.
 
 ~telemetry_streaming_service ()
 Destructor. Stops the service if running.
 
 telemetry_streaming_service (const telemetry_streaming_service &)=delete
 
telemetry_streaming_serviceoperator= (const telemetry_streaming_service &)=delete
 
 telemetry_streaming_service (telemetry_streaming_service &&)=delete
 
telemetry_streaming_serviceoperator= (telemetry_streaming_service &&)=delete
 
void start ()
 Starts the streaming service.
 
void stop ()
 Stops the streaming service.
 
bool is_running () const noexcept
 Checks if the service is currently running.
 
void flush ()
 Forces an immediate flush of pending logs.
 
std::size_t pending_count () const
 Returns the number of log records pending transmission.
 
std::uint64_t total_sent () const noexcept
 Returns the total number of records sent successfully.
 
std::uint64_t total_dropped () const noexcept
 Returns the total number of records dropped due to overflow.
 

Detailed Description

Service for streaming telemetry logs to the server.

This service provides seamless integration between Boost.Log and the ORE Studio telemetry persistence infrastructure. It:

Usage:

auto client = std::make_shared<comms::net::client>(options);
client->connect_sync();
opts.source_name = "ores.qt";
opts.source_version = "0.0.8";
telemetry_streaming_service service(client, opts);
service.start();
// ... application runs, logs are streamed ...
service.stop(); // Flushes remaining logs
Configuration options for telemetry streaming.
Definition telemetry_streaming_service.hpp:49
std::string source_version
Version of the source application.
Definition telemetry_streaming_service.hpp:60
std::string source_name
Name of the source application.
Definition telemetry_streaming_service.hpp:55
Service for streaming telemetry logs to the server.
Definition telemetry_streaming_service.hpp:123

Constructor & Destructor Documentation

◆ telemetry_streaming_service()

telemetry_streaming_service ( std::shared_ptr< net::client client,
telemetry_streaming_options  options 
)
explicit

Constructs the telemetry streaming service.

Parameters
clientShared pointer to the connected client
optionsConfiguration options for streaming

Member Function Documentation

◆ start()

void start ( )

Starts the streaming service.

Registers the Boost.Log sink and starts the background flush thread. Safe to call multiple times; subsequent calls are no-ops.

◆ stop()

void stop ( )

Stops the streaming service.

Flushes any pending logs, unregisters the sink, and stops the background thread. Safe to call multiple times; subsequent calls are no-ops.

Here is the caller graph for this function:

◆ flush()

void flush ( )

Forces an immediate flush of pending logs.

Sends any buffered log records to the server immediately, regardless of batch size or flush interval.

Here is the caller graph for this function: