Woman, Life, Freedom


OBD-II Emulator
Linux ODB-II Emulator public and protected interfaces documentation
ObdEmulator::ObdEmulator Class Reference

A class that routes OBD queries to their corresponding services. More...

#include <obd_emulator.h>

Public Member Functions

 ObdEmulator (CommunicationLayer *communicationLayer, const CanDriver *canDriver, std::initializer_list< ObdService * > obdServices)
 Constructor. More...
 
bool TryStart ()
 Try to start the emulation. More...
 
bool TryStartAsync ()
 Try to start the emulation for asynchrous data handling. More...
 
bool TryStop ()
 Try to stop the emulation. More...
 

Detailed Description

A class that routes OBD queries to their corresponding services.

Constructor & Destructor Documentation

◆ ObdEmulator()

ObdEmulator::ObdEmulator::ObdEmulator ( CommunicationLayer communicationLayer,
const CanDriver canDriver,
std::initializer_list< ObdService * >  obdServices 
)

Constructor.

Parameters
communicationLayerCAN communication medium abstraction layer
canDriverCAN USB to serial communication driver
obdServicesSupported OBD-II services during the emulation

Member Function Documentation

◆ TryStart()

bool ObdEmulator::ObdEmulator::TryStart ( )

Try to start the emulation.

Returns
True if the emulation start was successful, otherwise false

◆ TryStartAsync()

bool ObdEmulator::ObdEmulator::TryStartAsync ( )

Try to start the emulation for asynchrous data handling.

Returns
True if the emulation start was successful, otherwise false

◆ TryStop()

bool ObdEmulator::ObdEmulator::TryStop ( )

Try to stop the emulation.

Returns
True if the emulation stop was successful, otherwise false