Transmitting Long Messages - Intrepidcs API
Main

Overview

For ISO and *J1708 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 

'// Declared at form level
Private m_hObject As Long '// Holds the object for the state of the application

Dim stMsg(0 to 3) As icsSpyMessageJ1850
Dim stMsgJ1850  As icsSpyMessageJ1850
Dim
lResult As Long

' Fill in first header
stMsgJ1850.Header(1) = bByte1
stMsgJ1850.Header(2) = bByte2
stMsgJ1850.Header(3) = bByte3
stMsgJ1850.NumberBytesHeader = 3
' Fill in data
stMsgJ1850 .Data(1) = bByte4
stMsgJ1850Data(2) = bByte5
stMsgJ1850.Data(3) = bByte6
stMsgJ1850.Data(4) = bByte7
stMsgJ1850.Data(5) = bByte8
stMsgJ1850.Data(6) = bByte9
stMsgJ1850.Data(7) = bByte10
stMsgJ1850.Data(8) = bByte11
stMsgJ1850.NumberBytesData = 8

LSet stMsg(0) =  stMsgJ1850

' Fill in data
stMsgJ1850.NumberBytesHeader = 0
stMsgJ1850.Data(1) = bByte12
stMsgJ1850.Data(2) = bByte13
stMsgJ1850.Data(3) = bByte14
stMsgJ1850.Data(4) = bByte15
stMsgJ1850.Data(5) = bByte16
stMsgJ1850.NumberBytesData = 5

LSet stMsg(1) =  stMsgJ1850

'// Transmit the assembled message
lResult = icsneoTxMessages(m_hObject, stMsg(0), NETID_ISO, 2)
'// Test the returned result
If Not CBool(lResult) Then
    MsgBox "Problem Transmitting Message"
End If


* J1708 Networks on neoVI does not support transmit. Transmit support for neoVI PRO is planned please contact Intrepid Control Systems for availability.

 

intrepidcs API   Documentation - (C) Copyright 2000-2012 Intrepid Control Systems, Inc.

Last Update: Wednesday, May 28, 2003