Command: CMD_EMULATE_NODES
Destination: SD_LIN
Destination Channel: Channel ID
Description
Clients use this command to specify which nodes defined in the LDF (LIN Description File) that has been parsed should be emulated.
Command Data Format
Number Channel Node Name . . . padding 1 byte 1 byte variable . . . 0-3 bytes one emulated node
Number
The number of nodes to be emulated.
Channel
The channel number (1 through n) to be used for emulating this node.
Node Name
A null terminated string that is the name of the node to emulate. This may be either a slave or a master node.
notes:
If no nodes are to be emulated (The command data consists of a single byte with a value of zero.), the channel number present in the destination channel is used for monitoring.
If one or more nodes are to be emulated, the channel number present in the destination channel is ignored. Each emulated node requires a channel number and a node name. The last CMD_EMULATE_NODES command sent to SD_LIN for a given client is used. That is, any previous CMD_EMULATE_NODES command sent by a given client program is discarded.
This command causes the bit rate for the channel(s) to be set to the speed specified in the LDF. The type of checksum (classic or extened) is also found and stored for each frame ID so that the checksum can be computed correctly for the emulated and monitored messages.
If the master node is included in the nodes to emulate, all of the schedules defined in the LDF are sent to the driver, but no schedule is started and no frame IDs are transmitted. If a schedule is to be started, it must be started explicitly. The emulated slave nodes are able to respond to IDs with their default values when this command completes.
The node name is variable length. The name is terminated with a null character, making it a standard C string. This enables the use of strcpy() and length() when working with the name.
Response Data Format
none
Response Return Codes
RESP_OK Execution of the command was successful. RESP_INVAL_PARAM No LDF (LIN Description File) has been parsed, the requested channel is not a LIN channel or the node name does not exist in the LDF. RESP_UNSUPPORTED This command is not supported on the specified channel. RESP_UNREG The specified source channel is not registered with the server. RESP_UNKNOWN_ERR An unknown error occurred.