Proxy for the INCA online experiment COM object. More...
#include <IncaOnlineExperimentProxy.hpp>


Public Member Functions | |
| IncaOnlineExperimentProxy (pacemaker::inca::detail::unique_com_ptr<::IDispatch > idispatch) | |
Constructs the proxy by narrowing a generic IDispatch to IncaOnlineExperiment_Dispatch. | |
| IncaOnlineExperimentProxy (IncaOnlineExperimentProxy &&)=default | |
| Move constructor transfers ownership of the COM object. | |
| IncaOnlineExperimentProxy & | operator= (IncaOnlineExperimentProxy &&)=default |
| Move assignment transfers ownership of the COM object. | |
| ~IncaOnlineExperimentProxy () | |
| Destructor; releases the underlying COM object. | |
| auto | GetAllDevices () -> std::vector< pacemaker::inca::detail::unique_com_ptr<::IDispatch > > |
| Returns all ECU devices associated with the open experiment. | |
| auto | StopMeasurement () -> void |
| Stops the active measurement session. | |
| auto | StartRecording () -> void |
| Starts a new measurement recording. | |
| auto | StopRecordingAndSave () -> void |
| Stops the current recording and saves the collected data. | |
| auto | GetCalibrationValueInDevice (const std::string &name, ::ExperimentDevice_Dispatch *const device) -> pacemaker::inca::detail::unique_com_ptr<::IDispatch > |
| Retrieves a calibration scalar data item by name from a specific device. | |
Proxy for the INCA online experiment COM object.
IncaOnlineExperimentProxy wraps the IncaOnlineExperiment_Dispatch COM interface, which controls the active measurement session in INCA. It provides the following capabilities:
The class is move-only. All SAFEARRAY and BSTR marshalling is handled internally so that callers work exclusively with standard C++ types.
Definition at line 34 of file IncaOnlineExperimentProxy.hpp.
|
explicit |
Constructs the proxy by narrowing a generic IDispatch to IncaOnlineExperiment_Dispatch.
| idispatch | Owning pointer to a generic IDispatch representing the online experiment object. Ownership is transferred to the proxy. |
| std::invalid_argument | if idispatch is null. |
| std::runtime_error | if QueryInterface fails to obtain IncaOnlineExperiment_Dispatch. |
|
default |
Move constructor transfers ownership of the COM object.
Destructor; releases the underlying COM object.
|
default |
Move assignment transfers ownership of the COM object.
|
nodiscard |
Returns all ECU devices associated with the open experiment.
Calls GetAllDevices() on the underlying COM object, unpacks the returned SAFEARRAY of VT_DISPATCH elements, and returns each element as an owning IDispatch pointer. Each pointer can subsequently be used to construct an ExperimentDeviceProxy.
IDispatch pointers, one per device. The vector si empty if no devices are configured.| std::runtime_error | if the returned SAFEARRAY is not of type VT_ARRAY | VT_VARIANT, if SafeArrayGetElement fails, or if any element is not of type VT_DISPATCH. |
| auto StopMeasurement | ( | ) | -> void |
Stops the active measurement session.
Delegates directly to IncaOnlineExperiment_Dispatch::StopMeasurement(). Call this after StopRecordingAndSave() to fully stop the measurement.
| auto StartRecording | ( | ) | -> void |
Starts a new measurement recording.
Delegates directly to IncaOnlineExperiment_Dispatch::StartRecording(). The recording captures all online measurement signals configured in the open INCA experiment.
| auto StopRecordingAndSave | ( | ) | -> void |
Stops the current recording and saves the collected data.
Delegates directly to IncaOnlineExperiment_Dispatch::StopRecordingAndSave(). The data is persisted by INCA to the location configured in the experiment. Call StopMeasurement() afterwards to fully stop the session.
pacemaker::inca::Experiment::stop_recording() handles this automatically. | auto GetCalibrationValueInDevice | ( | const std::string & | name, |
| ::ExperimentDevice_Dispatch *const | device ) -> pacemaker::inca::detail::unique_com_ptr<::IDispatch > |
Retrieves a calibration scalar data item by name from a specific device.
Looks up the named calibration parameter on the given device and returns an owning IDispatch pointer that can be used to construct a CalibrationScalarDataProxy.
| name | Name of the calibration parameter as configured in INCA. |
| device | Non-owning raw pointer to the device from which the parameter is retrieved. Obtain this via ExperimentDeviceProxy::get(). |
IDispatch pointer to the calibration scalar data object.| std::runtime_error | if the parameter is not found on the device (the underlying COM call returns a nullptr). |