Proxy for an INCA experiment device COM object. More...
#include <ExperimentDeviceProxy.hpp>


Public Member Functions | |
| ExperimentDeviceProxy (pacemaker::inca::detail::unique_com_ptr<::IDispatch > idispatch) | |
Constrcuts the proxy by narrowing a generic IDispatch to ExperimentDevice_Dispatch | |
| ExperimentDeviceProxy (ExperimentDeviceProxy &&)=default | |
| Move contructor transfers ownership of the COM object. | |
| ExperimentDeviceProxy & | operator= (ExperimentDeviceProxy &&)=default |
| Move assignment transfers ownership of the COM object. | |
| ~ExperimentDeviceProxy () | |
| Destructor; releases the underlying COM object. | |
| auto | get () const noexcept -> ::ExperimentDevice_Dispatch * |
| Returns a non-owning raw pointer to the underlying COM device object. | |
| auto | GetName () -> std::wstring |
| Returns the name of the device as configured in INCA. | |
Proxy for an INCA experiment device COM object.
ExperimentDeviceProxy wraps the ExperimentDevice_Dispatch COM interface, which represents a single ECU device configured in the open INCA experiment. It allows the caller to identify the device by name and to obtain a non-owning raw pointer that other INCA COM methods accept as a device argument.
Instances are normally obtained by iterating the vector returned by IncaOnlineExperimentProxy::GetAllDevices() and constructing a proxy from each element.
The class is move-only.
Definition at line 33 of file ExperimentDeviceProxy.hpp.
|
explicit |
Constrcuts the proxy by narrowing a generic IDispatch to ExperimentDevice_Dispatch
| idispatch | Owning pointer to a generic IDispatch representing the device object. Ownership is transferred to the proxy. |
| std::invalid_argument | if idispatch is null |
| std::runtime_error | if QueryInterface fails to obtain ExperimentDevice_Dispatch. |
|
default |
Move contructor transfers ownership of the COM object.
Destructor; releases the underlying COM object.
|
default |
Move assignment transfers ownership of the COM object.
|
inlinenoexcept |
Returns a non-owning raw pointer to the underlying COM device object.
The returned pointer is valid for as long as the proxy is alive. It is intended to be passed directly to COM methods that accept an ExperimentDevice_Dispatch* argument, such as IncaOnlineExperimentProxy::GetCalibrationValueInDevice().
ExperimentDevice_Dispatch object. Never null after successful construction. Definition at line 64 of file ExperimentDeviceProxy.hpp.
References COMProxy<::ExperimentDevice_Dispatch >::p_subject.
|
nodiscard |
Returns the name of the device as configured in INCA.
Retrieves the device name via ExperimentDevice_Dispatch::GetName(), which returns a BSTR. The result is converted to a std::wstring before being returned to the caller.
L"XCP:1")