Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
This method transmits messages asynchronously to vehicle networks using the neoVI hardware.
Parameters
hObject
[in] Handle which specifies the driver object created by OpenNeoDevice.
pMsg
[in] This is the address of the first element of an array of icsSpyMessage 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 NetworkIDList 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 different topic.
Return Values
Returns 1 if successful, 0 if an error occurred. GetLastAPIError 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
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 different topic.
Transmit Report
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 GetMessages. Any message read which has the SPY_STATUS_TX_MSG (icsSpyStatusTx) bit set in the status bitfield is a 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.
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 status bitfield.
To transmit different messages, set the appropriate bits in the status bitfields. For example, there are bits for init waveforms, extended identifiers and remote frames.
This method transmits longer messages asynchronously to vehicle networks using the neoVI hardware. Method supports CAN FD and Ethernet networks.
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 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 .
NumTxed
[out] Specifies the number of messages that have been transmitted.
reserved
[in] Reserved parameter for future use. Set to 0.
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
This function call adds a transmit message to the transmit queue for CAN FD (more than 8 bytes) and Ethernet. The message will be transmitted when the network is free and all previously transmitted messages have been transmitted.
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.
Parameters
hObject
[in] Specifies the driver object created by .
pMsg
[out] This is the address of the first element of an array of structures. This array will be loaded with messages received by the hardware. This array must be sized to fit 20,000 structures.
pNumberOfMessages
[out] Specifies the number of messages the driver has loaded in the pMsg array. This number can be up to 20,000 messages.
pNumberOfErrors
[out] Specifies the number of errors in the neoVI DLL error queue. Errors are obtained using .
Return Values
Returns 1 if successful, 0 if an error occurred. must be called to obtain the specific error. This function will return 1 even if no messages were received, provided there are no errors. The errors that can be generated by this function are:
NEOVI_ERROR_DLL_NEOVI_NO_RESPONSE = 75
Remarks
The driver object will hold 20,000 received messages before it will generate an rx buffer overflow error (indicated by a error message in the error queue). It is the job of the application software to read this buffer at regular intervals. The rate that the application needs to read these messages is dependant on the rate messages are received on the bus. For example, a high bandwidth CAN bus can generate 5000 messages per second. In this case you must read out the messages at least every four seconds or overflow errors will result.
This method enables the use of ISO15765-2 on a CAN network. icsneoISO15765_EnableNetwroks must be called before using icsneoISO15765_TransmitMessage or icsneoISO15765_ReceiveMessage.
Parameters
hObject
[in] Handle which specifies the driver object created with the OpenPort method.
lNetwork
[in] Specifies which CAN network the status is requested for. Can be one of the following values:
Return Values
None.
Remarks
None.
This method calculates the timestamp for a message, based on the connected hardware type, and converts it to a usable variable.
Parameters
hObject
[in] Specifies the driver object created by .
pMsg
[in] The message to be used for calculating timestamp.
pTimeStamp
[out] The calculated timestamp.
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_NEOVI_NO_RESPONSE = 75
Remarks
Different models of neoVI devices have different time resolutions. This function uses the proper formula to calculate a timestamp based on the connected device type.
This method transmits a message using ISO15765-2 on a CAN network. icsneoISO15765_EnableNetwroks must be called before using icsneoISO15765_TransmitMessage. PCI bytes and Flow control decoding is taken care of by the dll for the transaction.
Parameters
hObject
[in] Handle which specifies the driver object created with the OpenPort method.
ulNetwork
[in] Specifies the network to transmit the message on. See 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).
stCM_ISO157652_TxMessage
[in] This is the address of the structure. The structure contains the properties for the multi frame message transaction.
ulBlockingTimeout
[in] Amount of time in ms to wait for flow controls before timing out.
Return Values
None.
Remarks
None.
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.
Enables ISO15765 functions. Must be called before Tx and RX functions.
Sends a ISO15765 message on CAN.
Looks for specified frames and responds with specified flow control on CAN.
Reads messages from the neoVI device.
Transmits messages to vehicle networks using a neoVI device.
Transmits messages to vehicle networks using a neoVI device. Used with CAN FD and Ethernet
Waits a specified amount of time in milliseconds for a received message
Calculates and returns the timestamp for a message
Functions for ISO15765 transactions.
Example for sending longer (<12 bytes) ISO9141/KW2K Messages
HS CAN
1
MS CAN
2
HS CAN 2
4
HS CAN 3
8
SW CAN
16
HS CAN 4
20
HS CAN 5
24
HS CAN 6
28
HS CAN 7
32
SW CAN 2
36
This method configures a receive message using ISO15765-2 on a CAN network. icsneoISO15765_EnableNetwroks must be called before using icsneoISO15765_ReceiveMessage. PCI bytes and Flow control decoding is taken care of by the dll for the transaction.
Parameters
hObject
[in] Handle which specifies the driver object created with the OpenPort method.
ulIndex [in] Specifies the Index to configure, 10 elements 0-9.
stCM_ISO157652_RxMessage
[in] This is the address of the stCM_ISO15765_RxMessage structure. The structure contains the properties for the multi frame message transaction.
Return Values
None.
Remarks
None.
Overview
For ISO9141 and Keyword 2000 Networks, a long message transmission option is allowed. Long message transmission is necessary when the message length exceeds twelve bytes (including checksum if used).
You can transmit a long message by calling the TxMessages method with modified arguments. First, you will pass an array of icsSpyMessage structures which contain the long message data. This data in the array must be set properly. Finally, you must set the lNumMessages argument to the number of structures.
You must setup the long message data properly. For the first message, both the 3 byte Header and the 8 byte data section are filled in. For consecutive messages only the 8 byte data section is filled in.
VB Example to Send a 16 byte message
This method is used to wait a specified amount of time for received messages from the neoVI hardware.
Parameters
hObject
[in] Specifies the driver object created by .
iTimeOut
[in] Specifies the amount of time in milliseconds that the function will wait for a received message before returning.
Return Values
0 if no message was received during the wait period. 1 if a message was received. -1 will be returned if there is an error condition. must be called to obtain the specific error. The errors that can be generated by this function are:
NEOVI_ERROR_DLL_NEOVI_NO_RESPONSE = 75
Remarks
This function allows an application to avoid ‘polling’ for received messages. It will return as soon as a message is received or when the timeout specified has been reached.