TxMessages Method - neoVI API
Last updated
Last updated
This method transmits messages asynchronously to vehicle networks using the neoVI hardware.
Parameters
hObject
[in] Handle which specifies the driver object created by .
pMsg
[in] This is the address of the first element of an array of structures. This array will be loaded by the application software with messages that are to be transmitted by the hardware.
lNetworkID
[in] Specifies the network to transmit the message on. See List for a list of valid Network ID values. Network support varies by neoVI device. NETID_DEVICE transmits on to the neoVI Device Virtual Network (see users manual).
lNumMessages
[in] Specifies the number of messages to be transmitted. This parameter should always be set to one unless you are transmitting a long Message. Transmitting long messages on ISO or J1708 is described in a .
Return Values
Returns 1 if successful, 0 if an error occurred. must be called to obtain the specific error. The errors that can be generated by this function are:
NEOVI_ERROR_DLL_ISOTX_DATA_BUFFER_ALLOC = 13
NEOVI_ERROR_DLL_NEOVI_NO_RESPONSE = 75
NEOVI_ERROR_DLL_ILLEGAL_TX_NETWORK= 90
NEOVI_ERROR_DLL_3G_DEVICE_LICENSE_NEEDS_TO_BE_UPGRADED = 190
Remarks
Transmit Report
You can also identify a particular transmitted message with DescriptionID field. This two byte field (only 14 bits are used) allows the programmer to assign an arbitrary number to a message. This number is then returned in the transmit report.
This function call adds a transmit message to the transmit queue. The message will be transmitted when the network is free and all previously transmitted messages have been transmitted. Transmitting long messages which are greater than 12 bytes on ISO or J1708 is described in a .
After the messages has been transmitted there will be a transmit report message returned from the device. The transmit report will be read out with . Any message read which has the SPY_STATUS_TX_MSG (icsSpyStatusTx) bit set in the is a transmit report.
The transmit report does not necessarily mean the message was transmitted successfully. For example, the Ford SCP network will return a Transmit Report if it had tried to send a message. Therefore, the programmer should always check the GlobalError Flag in the .
To transmit different messages, set the appropriate bits in the . For example, there are bits for init waveforms, extended identifiers and remote frames.