neoVI API Docs
All DocsProductsLearning CenterSupport
  • The neoVI API - Create your own software applications
  • Basic Operation - neoVI API
    • Using the neoVI API in Visual Studio: 32 bit DLL and 64 bit OS - neoVI API
    • Using the intrepidcs API in Visual Basic - neoVI API
    • Using the neoVI API in Visual C++ - neoVI API
    • Using the neoVI API in C# - neoVI API
    • Using the neoVI API in Borland C++ Builder - neoVI API
    • Using the neoVI API in Delphi - neoVI API
    • Using the API in LabVIEW - neoVI API
    • Using the neoVI API in LabWindows CVI - neoVI API
    • Unity3D Graphic Display API
    • Using the neoVI API in Excel - neoVI API
  • WIN32 API Overview - neoVI API
    • Basic Functions Overview - neoVI API
      • FindDevices Method
      • OpenNeoDevice Method - neoVI API
      • ClosePort Method - neoVI API
      • FreeObject Method - neoVI API
    • Message Functions Overview - neoVI API
      • GetMessages Method - neoVI API
      • TxMessages Method - neoVI API
      • TxMessagesEx Method - neoVI API
      • WaitForRxMessagesWithTimeOut Method - neoVI API
      • GetTimeStampForMsg Method - neoVI API
      • ISO15765 Message Functions Overview - neoVI API
        • ISO15765_EnableNetworks Method - neoVI API
        • ISO15765_TransmitMessage Method - neoVI API
        • ISO15765_ReceiveMessage Method - neoVI API
      • Transmitting Long Messages - neoVI API
    • Device Settings Functions Overview - neoVI API
      • GetConfiguration Method - neoVI API
      • SendConfiguration Method - neoVI API
      • neoVI Fire - neoVI API
        • GetFireSettings Method - neoVI API
        • SetFireSettings Method - neoVI API
      • neoVI FIRE 2 - neoVI API
        • GetFIRE2Settings Method - neoVI API
        • SetFire2Settings Method - neoVI API
      • ValueCAN3 - neoVI API
        • GetVCAN3Settings Method - neoVI API
        • SetVCAN3Settings Method - neoVI API
      • ValueCAN 4-1 and 4-2 - neoVI API
        • GetVCAN412Settings Method - neoVI API
        • SetVCAN412Settings Method - neoVI API
      • ValueCAN 4-4 - neoVI API
        • GetVCAN4Settings Method - neoVI API
        • SetVCAN4Settings Method - neoVI API
      • ValueCAN RF - neoVI API
        • GetVCANRFSettings Method - neoVI API
        • SetVCANRFSettings Method - neoVI API
      • RAD Galaxy - neoVI API
        • GetRADGalaxySettings Method - neoVI API
        • SetRADGalaxySettings Method - neoVI API
      • General Device Settings - neoVI API
        • SetBitRate Method - neoVI API
        • SetFDBitRate Method - neoVI API
        • GetDeviceSettings Method - neoVI API
        • SetDeviceSettings Method - neoVI API
        • GetHWFirmwareInfo Method - neoVI API
        • GetDLLFirmwareInfo Method - neoVI API
        • ForceFirmwareUpdate Method - neoVI API
        • GetDeviceParameters Method - neoVI API
        • SetDeviceParameters Method - neoVI API
        • SetReflashDisplayCallbacks Method - neoVI API
        • ClearReflashDisplayCallbacks Method - neoVI API
        • GetRTC Method - neoVI API
        • SetRTC Method - neoVI API
    • Error Functions Overview - neoVI API
      • GetLastAPIError Method - neoVI API
      • GetErrorMessages Method - neoVI API
      • GetErrorInfo Method - neoVI API
      • Error Messages - neoVI API
    • General Utility Functions Overview - neoVI API
      • ValidateHObject Method - neoVI API
      • GetDLLVersion Method - neoVI API
      • StartSocketServer Method - neoVI API
      • StopSocketServer Method - neoVI API
      • GetPerformanceParameters Method - neoVI API
      • ReadWritePhySettings Method - neoVI API
      • EnableDOIPLine Method - neoVI API
      • GetGPTPStatus Method - neoVI API
    • Deprecated Functions Overview - neoVI API
      • OpenPortEx Method - neoVI API
        • OpenPortEx Hardware Type Information - neoVI API
      • FindAllCOMDevices Method - neoVI API
      • FindAllUSBDevices Method - neoVI API
      • FindNeoDevices Method - neoVI API
      • EnableNetworkCom Method - neoVI API
      • CoreMini Script interface Overview - neoVI API
        • ScriptStart Method - neoVI API
        • ScriptStop Method - neoVI API
        • ScriptLoad Method - neoVI API
        • ScriptClear Method - neoVI API
        • ScriptStartFBlock Method - neoVI API
        • ScriptGetFBlockStatus Method - neoVI API
        • ScriptStopFBlock Method - neoVI API
        • ScriptGetScriptStatus Method - neoVI API
        • ScriptReadAppSignal Method - neoVI API
        • ScriptWriteAppSignal Method - neoVI API
    • Structures, Types, and Defines Overview - neoVI API
      • Setting Structures Overview - neoVI API
        • SFireSettings Structure
        • SFire2Settings Structure
        • SVCAN3Settings Structure
        • SVCANRFSettings Structure
        • SVCAN412Settings Structure
        • SVCAN4Settings Structure
        • SVCAN4IndSettings Structure
        • SRADGalaxySettings Structure
        • SRADStar2Settings Structure
        • SRADPlutoSettings Structure
        • SRADSuperMoonSettings Structure
        • SRADMoon2Settings Structure
        • SDeviceSettings Structure
        • Sub Setting Structures Overview - neoVI API
          • CAN_SETTINGS Structure
          • SWCAN_SETTINGS Structure
          • CANFD_SETTINGS Structure
          • LIN_SETTINGS Structure
          • ISO9141_KEYWORD2000_SETTINGS Structure
          • ISO9141_KEYWORD2000__INIT_STEP Structure
          • ETHERNET_SETTINGS Structure
          • ETHERNET_SETTINGS2 Structure
          • OP_ETH_GENERAL_SETTINGS Structure
          • OP_ETH_SETTINGS Structure
          • SPluto_CustomParams Structure
          • UART_SETTINGS Structure
          • RAD_GPTP_SETTINGS Structure
          • LOGGER_SETTINGS Structure
          • DISK_SETTINGS Structure
          • TIMESYNC_ICSHARDWARE_SETTINGS Structure
          • RAD_REPORTING_SETTINGS Structure
          • STextAPISettings Structure
          • gPTP Structures
            • GPTPStatus Structure
            • timestamp Structure
            • priority_vector Structure
            • port_identity Structure
            • clock_quality Structure
            • system_identity Structure
        • NeoDevice Structure
        • NeoDeviceEx Structure
        • stAPIFirmwareInfo Structure
        • Message Structures - neoVI API
        • Status Bitfields - neoVI API
        • Using an array instead of a message structure - intrepidcs API
        • icsSpyTime Structure
        • stCM_ISO157652_TxMessage Structure
        • stCM_ISO157652_RxMessage Structure
        • Valid parameter names for the SetDeviceParameter and GetDeviceParameter methods
        • neoVI API Data Types
        • PhyRegPktClauseMess_t Structure
        • neoVI Network ID List
  • Development FAQ's
    • How do I detect and handle disconnects?
    • How do I set parameters on a neoVI device?
    • How do I open more than one channel on a single piece of hardware? - neoVI API
    • How do I communicate on LIN - neoVI API
    • How do I send a Extended Frame or a High Voltage Wakeup or ISO9141/KW2K Init? - neoVI API
  • Unix-like Operating Systems - Support
  • J2534 Support - neoVI API
  • Vehicle Spy Text API
    • ECU Object - Vehicle Spy Text API
    • Labview Text API Interface to Vehicle Spy 3
  • Vehicle Spy VSB file Spec
  • Contact Us
    • Contact Information - Intrepid Control Systems, Inc
Powered by GitBook
LogoLogo

Applications

  • Cybersecurity
  • Data Logging
  • Simulate ECU Functions
  • Diagnostics, Testing and Validation

Products

  • Vehicle Network Adapters
  • Data Loggers
  • Software
  • Automotive Ethernet Tools

Support

  • Support Resources
  • Contact Support
  • Class Schedule & Registration
  • Training Video Library

Company

  • About
  • News
  • Events
  • Contact Us

Copyright © 2025 | All Rights Reserved

On this page
Edit on GitHub
Export as PDF
  1. WIN32 API Overview - neoVI API
  2. Structures, Types, and Defines Overview - neoVI API
  3. Setting Structures Overview - neoVI API

Message Structures - neoVI API

PreviousstAPIFirmwareInfo StructureNextStatus Bitfields - neoVI API

Last updated 2 years ago

These structures are used to represent messages both received and transmitted by the neoVI device. These structures can also be represented as an .

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;
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;
    unsigned char Header[4];
    unsigned char Data[8];
    unsigned long StatusBitField3;
    unsigned long StatusBitField4;
    void * ExtraDataPtr;
    unsigned char MiscData;
    char Reserved[3];
} icsSpyMessageJ1850;
Public Structure icsSpyMessage
    Dim StatusBitField As Int32
    Dim StatusBitField2 As Int32
    Dim TimeHardware As UInt32
    Dim TimeHardware2 As UInt32
    Dim TimeSystem As UInt32
    Dim TimeSystem2 As UInt32
    Dim TimeStampHardwareID As Byte
    Dim TimeStampSystemID As Byte
    Dim NetworkID As Byte
    Dim NodeID As Byte
    Dim Protocol As Byte
    Dim MessagePieceID As Byte
    Dim ExtraDataPtrEnabled As Byte
    Dim NumberBytesHeader As Byte
    Dim NumberBytesData As Byte
    Dim NetworkID2 As Byte
    Dim DescriptionID As Int16
    Dim ArbIDOrHeader As Int32
    Dim Data1 As Byte
    Dim Data2 As Byte
    Dim Data3 As Byte
    Dim Data4 As Byte
    Dim Data5 As Byte
    Dim Data6 As Byte
    Dim Data7 As Byte
    Dim Data8 As Byte
    Dim StatusBitField3 As Int32
    Dim StatusBitField4 As Int32
    Dim iExtraDataPtr As IntPtr
    Dim MiscData As Byte
    Dim Reserved0 as Byte
    Dim Reserved1 as Byte
    Dim Reserved2 as Byte
End Structure
Public Structure icsSpyMessageJ1850
    Dim StatusBitField As Int32
    Dim StatusBitField2 As Int32
    Dim TimeHardware As UInt32
    Dim TimeHardware2 As UInt32
    Dim TimeSystem As UInt32
    Dim TimeSystem2 As UInt32
    Dim TimeStampHardwareID As Byte
    Dim TimeStampSystemID As Byte
    Dim NetworkID As Byte
    Dim NodeID As Byte
    Dim Protocol As Byte
    Dim MessagePieceID As Byte
    Dim ExtraDataPtrEnabled As Byte
    Dim NumberBytesHeader As Byte
    Dim NumberBytesData As Byte
    Dim NetworkID2 as Byte
    Dim DescriptionID As Int16
    Dim Header1 As Byte
    Dim Header2 As Byte
    Dim Header3 As Byte
    Dim Header4 As Byte
    Dim Data1 As Byte
    Dim Data2 As Byte
    Dim Data3 As Byte
    Dim Data4 As Byte
    Dim Data5 As Byte
    Dim Data6 As Byte
    Dim Data7 As Byte
    Dim Data8 As Byte
    Dim StatusBitField3 As Int32
    Dim StatusBitField4 As Int32
    Dim iExtraDataPtr As IntPtr
    Dim MiscData As Byte
    Dim Reserved0 as Byte
    Dim Reserved1 as Byte
    Dim Reserved2 as Byte
End Structure
[StructLayout(LayoutKind.Sequential)]
public struct icsSpyMessage
{
    public int StatusBitField;
    public int StatusBitField2;
    public int TimeHardware;
    public int TimeHardware2;
    public int TimeSystem;
    public int TimeSystem2;
    public byte TimeStampHardwareID;
    public byte TimeStampSystemID;
    public byte NetworkID;
    public byte NodeID;
    public byte Protocol;
    public byte MessagePieceID;
    public byte ExtraDataPtrEnabled;
    public byte NumberBytesHeader;
    public byte NumberBytesData;
    public byte NetworkID2;
    public short DescriptionID;
    public int ArbIDOrHeader;
    public byte Data1;
    public byte Data2;
    public byte Data3;
    public byte Data4;
    public byte Data5;
    public byte Data6;
    public byte Data7;
    public byte Data8;
    public int StatusBitField3;
    public int StatusBitField4;
    public IntPtr iExtraDataPtr;
    public byte MiscData;
    public byte Reserved0;
    public byte Reserved1;
    public byte Reserved2;
}
[StructLayout(LayoutKind.Sequential)]
public struct icsSpyMessageJ1850
{
    public int StatusBitField;
    public int StatusBitField2;
    public int TimeHardware;
    public int TimeHardware2;
    public int TimeSystem;
    public int TimeSystem2;
    public byte TimeStampHardwareID;
    public byte TimeStampSystemID;
    public byte NetworkID;
    public byte NodeID;
    public byte Protocol;
    public byte MessagePieceID;
    public byte ExtraDataPtrEnabled;
    public byte NumberBytesHeader;
    public byte NumberBytesData;
    public byte NetworkID2;
    public short DescriptionID;
    public byte Header1;
    public byte Header2;
    public byte Header3;
    public byte Header4;
    public byte Data1;
    public byte Data2;
    public byte Data3;
    public byte Data4;
    public byte Data5;
    public byte Data6;
    public byte Data7;
    public byte Data8;
    public int StatusBitField3;
    public int StatusBitField4;
    public IntPtr iExtraDataPtr;
    public byte MiscData;
    public byte Reserved0;
    public byte Reserved1;
    public byte Reserved2;
}

Remarks

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

Item
Description

StatusBitField StatusBitField2 StatusBitField3 StatusBitField4

TimeHardware TimeHardware2

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.

TimeStampHardwareID

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

TimeStampSystemID

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

NodeID

Not Used in the neoVI API.

Protocol

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

MessagePieceID

Not Used in the neoVI API.

ExtraDataPtrEnabled

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

NumberBytesHeader

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

NumberBytesData

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

DescriptionID

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.

iExtraDataPtr

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

MiscData

Not Used in the neoVI API.

Examples

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;
Timestamps : Calculating a TimeStamp

double dTime; //Storage for message time

dTime = icsNeoDll.icsneoGetTimeStamp(stMessages[lCount-1].TimeHardware, stMessages[lCount-1].TimeHardware2);
Timestamps : Calculating a TimeStamp

Dim dTime As Double

dTime = icsneoGetTimeStamp(stMessages(lCount - 1).TimeHardware, stMessages(lCount - 1).TimeHardware2)

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

This is the hardware time stamp. The function 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.

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 contains the ID mapping NetworkID2 is a continuation. NetworkID + (NetworkID2 * 100) can be used to join this into one value.

array of bytes described in a separate topic
separate topic
GetTimeStampForMsg
NetworkIDList