Documentation Index
Fetch the complete documentation index at: https://notevil.mintlify.app/llms.txt
Use this file to discover all available pages before exploring further.
J1939EnableNameManagement
Valid for: CANoe DE • CANoe4SW DE
Function Syntax
dword J1939EnableNameManagement( dword ecuHandle, dword enable )
dword J1939EnableNameManagement( dword ecuHandle, dword enable, dword bitMask )
Description
This function activates the name management of a node. Not until the name management is activated another node can change the device name of this node by sending a name management message.
Parameters
- ecuHandle: ECU handle
- enable:
- 1: activate the name management
- 0: deactivates the name management
- bitMask: parts of the device name that are allowed to be changed
- bit 0 (LSB): Arbitrary Address Capable
- bit 1: Industry Group
- bit 2: System Instance
- bit 3: System
- bit 4: Function
- bit 5: Function Instance
- bit 6: ECU Instance
- bit 7 (MSB): Manufacturer Code
Return Values
0 or error code
Example
LONG busHandle;
LONG ecuAddress;
LONG ecuHandle;
char deviceName[8]; // device name of the node
busHandle = J1939GetBus( "J1939" );
ecuAddress = dbNode.NmStationAddress; // dbNode must be configured in database
J1939MakeName(
deviceName, dbNode.NmJ1939AAC,
dbNode.NmJ1939IndustryGroup,
dbNode.NmJ1939SystemInstance,
dbNode.NmJ1939System,
dbNode.NmJ1939Function,
dbNode.NmJ1939FunctionInstance,
dbNode.NmJ1939ECUInstance,
dbNode.NmJ1939ManufacturerCode,
dbNode.NmJ1939IdentityNumber
);
ecuHandle = J1939CreateECU( busHandle, deviceName );
if (ecuHandle != 0)
{
/* allow every component to be changed except arbitrary address capable flag */
J1939EnableNameManagement(ecuHandle, 1, 0xFE);
J1939ECUGoOnline( ecuHandle, ecuAddress );
}