Message Structures - neoVI API

These structures are used to represent messages both received and transmitted by the neoVI device. These structures can also be represented as an array of bytes described in a separate topic.

typedef struct // matching C structure
    unsigned long StatusBitField;
    unsigned long StatusBitField2;
    unsigned long TimeHardware;
    unsigned long TimeHardware2;
    unsigned long TimeSystem;
    unsigned long TimeSystem2;
    unsigned char TimeStampHardwareID;
    unsigned char TimeStampSystemID;
    unsigned char NetworkID;
    unsigned char NodeID;
    unsigned char Protocol;
    unsigned char MessagePieceID;
    unsigned char ExtraDataPtrEnabled;
    unsigned char NumberBytesHeader;
    unsigned char NumberBytesData;
    unsigned char NetworkID2;
    short DescriptionID;
    long ArbIDOrHeader;
    unsigned char Data[8];
    unsigned long StatusBitField3;
    unsigned long StatusBitField4;
    void * ExtraDataPtr;
    unsigned char MiscData;
    char Reserved[3];
} icsSpyMessage;


There are two structures here. Both are equivalent. The only difference is how they represent message bytes. The icsspyMessageJ1850 provides a more convenient representation for J1850 or ISO messages with a header array holding the first three bytes of the message.

These structures can be use interchangeably in C by casting one type to the other. In Visual Basic, you can copy one structure to the other using the LSet method.

Table 1 below lists the members of the structure and specific remarks about there use.

Table 1 - Message Structure Elements


StatusBitField StatusBitField2 StatusBitField3 StatusBitField4

Bitfields which describe the message. These are described in a separate topic.

TimeHardware TimeHardware2

This is the hardware time stamp. The function GetTimeStampForMsg will convert these to seconds. If the hardware has an RTC (Real Time Clock), T-0 is Jan 1, 2007. Other devices start when the unit is powered or connected to by open function.

TimeSystem TimeSystem2

This is the system time stamp. TimeSystem is loaded with the value received from the timeGetTime call in the WIN32 multimedia API. The timeGetTime accuracy is up to 1 millisecond. See the WIN32 API documentation for more information. This timestamp is useful for time comparing with other system events or data which is not synced with the neoVI timestamp. Currently, TimeSystem2 is not used.


This is an identifier of what type of hardware timestamp is used. Since neoVI’s timestamp is always the same, this doesn’t change.


This is an identifier of what type of system timestamp is used. Since WIN32 neoVI’s timestamp is always the same, from the timeGetTime API, this doesn’t change.

NetworkID NetworkID2

This is the NetworkID as assigned in the OpenPort method. This value is used to identify which network this message was received on. The topic here NetworkIDList contains the ID mapping NetworkID2 is a continuation. NetworkID + (NetworkID2 * 100) can be used to join this into one value.


Not Used in the neoVI API.


This is the type of protocol which the message belongs to. Valid values are SPY_PROTOCOL_CAN, SPY_PROTOCOL_CANFD, and SPY_PROTOCOL_ISO9141.


Not Used in the neoVI API.


Flag indicating if the data section (when set to 0) is used or the data at the pointer location of iExtraDataPtr (when set to 1).


Used for J1850/ISO messages. It indicates how many bytes are stored in the Header(1 to 4) array.


Holds the number of bytes in the Data(1 to 8) array or the number of bytes in a CAN remote frame (The DLC).


Not Used in the neoVI API.

Header(1 To 4) or ArbIDOrHeader

Holds up to 3 byte 1850 header (bytes 1 through 3) or a 29 bit CAN header.

Data(1 To 8)

Holds the 8 data bytes in CAN messages or bytes 4 through 11 in J1850/ISO messages.


Pointer to data bytes for CAN FD and Ethernet messages containing over 8 bytes. ExtraDataPtrEnabled must be 1 to use this.


Not Used in the neoVI API.


Interchangeably using the structures : Casting a icsSpyMessage to an icsSpyMessageJ1850

((icsSpyMessageJ1850 *) stMessages)[lCount].Header[0]

Timestamps : Calculating a TimeStamp

// Calculate the time for this message
dTime = ((double) stMessages[lCount].TimeHardware2) * NEOVI_TIMESTAMP_2 + 
                ((double) stMessages[lCount].TimeHardware) * NEOVI_TIMESTAMP_1;

Last updated