APIC – Runtime reports guide

Runtime reports Architecture & Usage

CSimReports – Centralized Simulation Reporting

The CSimReports class provides a centralized system for collecting, storing, and reporting simulation messages, warnings, errors, and informational logs. It supports both persistent in-memory storage and dynamic reporting with optional formatting.

Key Features

Internal Structure

Member Description
simEngReports Unique pointer to shared memory for storing all report messages.
text Raw character buffer containing report text.
reportsSize Current size of the report buffer.
errorList Map of unique errors to CError structures that store position, length, and occurrence count.

CSimReports::CError

Represents an individual error or warning tracked in the report system:

Usage Examples


// Setup the reporting system
CSimReports::SetupReports();

// Simple informational message
CSimReports::ReportMsg(CSimReports::eInfo, "Simulation started");

// Message with additional details
CSimReports::ReportMsg(CSimReports::eWarning, "Potential issue detected", "Extra info", 5);

// Formatted report
CSimReports::Report(CSimReports::eError, "Error code %d at frame %d", errorCode, frameNum);

// Access raw report data
size_t size;
uint8_t* reportData = CSimReports::GetReportPtr(size);
if(reportData) {
    // process report buffer
}

Notes