Chapter 6 Automotive Diagnostic Command Set API for C
© National Instruments Corporation 6-79 Automotive Diagnostic Command Set User Manual
ndUDSCommunicationControl
Purpose
Executes the UDS CommunicationControl service. Switches transmission and/or reception of
the normal communication messages (usually CAN messages) on or off.
Format
long ndUDSCommunicationControl(
TD1 *diagRef,
unsigned char type,
unsigned char communicationType,
LVBoolean *success);
Input
diagRef
Specifies the diagnostic session handle, obtained from ndOpenDiagnostic and passed
to subsequent diagnostic functions. Normally, it is not necessary to manually manipulate
the elements of this struct.
type
Indicates whether transmission/reception is to be switched on/off. The usual values are:
00: enableRxAndTx
01: enableRxAndDisableTx
02: disableRxAndEnableTx
03: disableRxAndTx
communicationType
A bitfield indicating which application level is to be changed. The usual values are:
01: application
02: networkManagement
You can change more than one level at a time.
Output
success
Indicates successful receipt of a positive response message for this diagnostic service.
Return Value
The return value indicates the function call status as a signed 32-bit integer. Zero means the
function executed successfully. A negative value specifies an error, which means the function