RuntimeSystemService class final
#include <system/runtime_system_service.hpp>
Runtime-oriented provider for /system/* telemetry and /system/reboot.
This class centralizes system telemetry collection (heap, task state/stack) and deferred reboot scheduling policy. Runtime wiring only supplies task handles, config backend, and reboot state atomics.
Base classes
- class prf::control::ISystemStatusSource
- Abstract source for
/system/*payload fields. - class prf::control::ISystemRebootController
- Abstract reboot controller used by
/system/reboot.
Constructors, destructors, conversion operators
- RuntimeSystemService(std::span<const RuntimeTaskBinding> tasks, uint32_t reboot_delay_ms)
Public functions
-
auto append_system_view(prf::
control:: SystemView view, prf:: control:: ResponseWriter* out) const -> bool override - Appends one system telemetry view into caller-owned response writer.
- auto reboot_due(const uint64_t now_ms) const -> bool
- Returns true when reboot was requested and deadline is reached.
- auto request_reboot() -> bool override
- Schedules reboot request; returns false when reboot cannot be scheduled.
-
void set_config_backend(std::shared_ptr<prf::
config:: PicoLittleFsConfigBackend> config_backend) - void set_crypto_state(bool device_keys_ready, bool key_service_enabled)
- void set_reboot_state(std::atomic_bool* pending, std::atomic<uint64_t>* due_ms)
- void set_schema_identity(uint64_t schema_id, uint64_t schema_profile)
- void set_task_health_monitor(const TaskHealthMonitor* task_health_monitor)
-
auto system_view_field_count(prf::
control:: SystemView view) const -> size_t override - Returns number of key/value pairs emitted by
append_system_view.
Function documentation
bool prf:: system:: RuntimeSystemService:: append_system_view(prf:: control:: SystemView view,
prf:: control:: ResponseWriter* out) const override
Appends one system telemetry view into caller-owned response writer.
Implementations should fail fast when out reports overflow/error.