Class FaultProvider

Class Documentation

class FaultProvider

Provider interface for entity fault/DTC resources.

Typed provider interface for plugins that serve SOVD faults (GET /{entity_type}/{id}/faults, GET /{entity_type}/{id}/faults/{code}). Per-entity routing like DataProvider.

Plugins implementing this interface query their backend (e.g., UDS ReadDTCInformation 0x19) on demand and return faults in SOVD format.

See also

GatewayPlugin for the base class all plugins must also implement

See also

DataProvider for the data counterpart

Thread safety

All methods may be called concurrently. Implementations must synchronize.

Public Functions

virtual ~FaultProvider() = default
virtual tl::expected<nlohmann::json, FaultProviderErrorInfo> list_faults(const std::string &entity_id) = 0

List faults for an entity

Parameters:

entity_id – SOVD entity ID

Returns:

JSON with {“items”: […]} array of fault descriptors

virtual tl::expected<nlohmann::json, FaultProviderErrorInfo> get_fault(const std::string &entity_id, const std::string &fault_code) = 0

Get a specific fault with environment data

Parameters:
  • entity_id – SOVD entity ID

  • fault_code – Fault code (e.g., DTC identifier)

Returns:

JSON response with fault detail + environment data

virtual tl::expected<nlohmann::json, FaultProviderErrorInfo> clear_fault(const std::string &entity_id, const std::string &fault_code) = 0

Clear a fault

Parameters:
  • entity_id – SOVD entity ID

  • fault_code – Fault code to clear

Returns:

JSON response confirming the clear