ORE Studio 0.0.4
Loading...
Searching...
No Matches
Classes | Enumerations | Functions | Variables
ores::comms::recording Namespace Reference

Session recording infrastructure for debugging and analysis. More...

Classes

struct  frame_record_header
 Header for each recorded frame in the session file. More...
 
struct  session_file_header
 File header for session recording files. More...
 
class  session_recorder
 Records communication frames to a session file. More...
 

Enumerations

enum class  frame_direction : std::uint8_t { sent = 0x00 , received = 0x01 }
 Direction of a recorded frame. More...
 
enum class  session_file_error {
  none = 0 , file_open_failed , file_write_failed , file_read_failed ,
  invalid_magic , unsupported_version , corrupt_file , end_of_file ,
  unexpected_eof
}
 Error codes for session file operations. More...
 

Functions

std::string generate_session_filename (const boost::uuids::uuid &session_id, std::chrono::system_clock::time_point start_time)
 Generate a session filename with timestamp and UUID.
 

Variables

constexpr std::array< std::uint8_t, 8 > SESSION_FILE_MAGIC
 Magic bytes identifying an ORES session recording file.
 
constexpr std::uint16_t SESSION_FILE_VERSION = 1
 Current version of the session file format.
 

Detailed Description

Session recording infrastructure for debugging and analysis.

Provides functionality to record communication sessions for later analysis using the ores.comms.analyser tool.

Enumeration Type Documentation

◆ frame_direction

enum class frame_direction : std::uint8_t
strong

Direction of a recorded frame.

Enumerator
sent 

Frame was sent by the client.

received 

Frame was received by the client.

◆ session_file_error

enum class session_file_error
strong

Error codes for session file operations.

Enumerator
end_of_file 

Clean end of file at frame boundary.

unexpected_eof 

Truncated file in middle of read.

Function Documentation

◆ generate_session_filename()

std::string generate_session_filename ( const boost::uuids::uuid &  session_id,
std::chrono::system_clock::time_point  start_time 
)

Generate a session filename with timestamp and UUID.

Format: session-YYYYMMDD-HHMMSS-{short-uuid}.ores

Parameters
session_idThe session UUID
start_timeThe session start time
Returns
The generated filename
Here is the caller graph for this function:

Variable Documentation

◆ SESSION_FILE_MAGIC

constexpr std::array<std::uint8_t, 8> SESSION_FILE_MAGIC
constexpr
Initial value:
= {
0x4F, 0x52, 0x45, 0x53, 0x2D, 0x52, 0x45, 0x43
}

Magic bytes identifying an ORES session recording file.

"ORES-REC" in ASCII = 0x4F5245532D524543