ISO15765_TransmitMessage Method - neoVI API

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.

void _stdcall icsneoISO15765_TransmitMessage(void * hObject, unsigned long ulNetworkID,stCM_ISO157652_TxMessage *pMsg,unsigned long ulBlockingTimeout);

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 NetworkID 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).

stCM_ISO157652_TxMessage

[in] This is the address of the stCM_ISO15765_TxMessage 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.

Examples

long lResult;
int iNetwork = 1;
int iCounter = 0;

//Create Message and adjust array to proper size
stCM_ISO157652_TxMessage tx_msg;
::ZeroMemory(&tx_msg,sizeof(stCM_ISO157652_TxMessage));
//enable ISO15765 on HS CAN
lResult = icsneoISO15765_EnableNetworks(m_hObject,NETID_HSCAN);
tx_msg.id = 0x7E0; //ArbID of the message
tx_msg.vs_netid = NETID_HSCAN; //Network to use
tx_msg.num_bytes = 64; //The number of data bytes to use
tx_msg.padding = 0xAA;//Set Padding Byte

//Set the Flags
tx_msg.flags = 0;
tx_msg.paddingEnable = true;

//Set Flow control message
tx_msg.fc_id = 0x7E8; //ArbID for the flow control Frame
tx_msg.fc_id_mask = 0xFFF; //The flow control arb filter mask (response id from receiver)
tx_msg.flowControlExtendedAddress = 0xFE; //Extended ID
tx_msg.fs_timeout = 0x100; //Flow Control Time out in ms
tx_msg.fs_wait = 0x3000; //Flow Control FS=Wait Timeout ms
tx_msg.blockSize = 0; //Block size (for sending flow Control)
tx_msg.stMin = 0;
//Fill data
for(iCounter = 0;iCounter<64;iCounter++)
{
    tx_msg.data[iCounter] = iCounter;
}

lResult = icsneoISO15765_TransmitMessage(m_hObject, NETID_HSCAN, &tx_msg, 3000);

Last updated