OTX-Runtime for DotNet
|
|
Except the logging the DiagManager itself must not be configured. Each "configuration", like set the ODX project and vehicle, is part of the normal OTX based communication via commands, see DiagConfiguration extension. The main job is to start the DiagManager.
There are different ways to start the DiagManager. The recommended way to start the DiagManager is via the DiagManager Sample Program. But in certain circumstances, it may also be useful to start the DiagManager inside own code. This is especially the case if the DiagManager should be part of the application process via the RAW transport layer.
Note: Starting DiagManager inside own code only makes sense in unmanaged C++ applications, see OpenTestSystem.Otx.DiagManager.Server inside C++ OTX-Runtime API documentation.
To start the DiagManager the inside own code the following steps must be done:
Example Code:
After the DiagManager was started, the application can change the diagnostic configuration. The DiagManager supports the whole configuration possibilities of OTX, e.g. see DiagConfiguration extension. The main job to configure the diagnostic communication is to set the right ODX project and vehicle, see example below.
Example Code:
Note: Please note, that the change of the configuration may have influences to other applications (clients) which are connected to the same DiagManager.
A diagnostic runtime system according to ISO 22900 (MVCI) supports two communication modes, the Simple Mode (via PrepareInterface) and the Extended Mode (via PrepareVciAccessLayer). The two communication modes are mutually exclusive. So it can only be communicated in one. In order to communicate in another, the existing one must first be terminated, see UnprepareInterface and UnprepareVciAccessLayer.
Note: The Simple Mode is significantly faster when establishing and closing a connection than the Extended Mode.
Except the ComInterface extension all actions and terms of the OTX extensions supported in DiagManager can be executed in both simple and extended modes. The ComInterface extension contains actions and terms which needs the extended mode, see table below.
ComInterface Actions and Terms | Simple | Extended |
---|---|---|
ActivateEthernet | x | |
IsEthernetActivated | x | |
DeactivateEthernet | x | |
ConnectComInterface | x | x |
IsInterfaceConnected | x | x |
CloseComInterface | x | x |
GetComInterfaceNameList | x | |
GetComInterfaceNameListFromEthernet | x | |
GetComInterfaceResourceNameList | x | x |
GetDefaultComInterfaceName | x | |
GetComInterface | x | |
GetComInterfaceProperties | x | |
GetComChannelFromComInterface | x | |
CreateComChannelFromComInterface | x | |
GetBatteryVoltageFromComInterface | x | x |
GetIgnitionStateFromComInterface | x | x |
Note: Extended mode is required for communication via the ComInterface extension or via DoIP.
Note: The DiagManager (inside CommandProcessor) will switch implicit between the different modes.
Via the following commands the communication mode can be set explicit: