Skip to main content
Version: 4.00

Structure Definitions (Common)

This section describes common structure definitions of this product.

Main APIs​

Definition List​

Type NameDescription
StMPXAPIVersionAPI version information
StMPXDeviceInfoDevice information of MicroPeckerX
StMPXLogLog information for log acquisition API mode

Definition Details​

StMPXAPIVersion​

Members of StMPXAPIVersion (API version information) are as follows.

VariableTypeDescription
APIVersionint8_t [32]API version number

StMPXDeviceInfo​

Members of StMPXDeviceInfo (MicroPeckerX device information) are as follows.

VariableTypeDescriptionNotes
Serialuint32_tSerial numberSame as the serial number printed on the serial label attached to MicroPeckerX.
Modelint8_t [64]Product model name (for example, S810-MX-FD2) 

StMPXLog​

Members of StMPXLog (log information for log acquisition API mode) are as follows.

VariableTypeDescriptionNotes
mSecuint32_tTimestamp (milliseconds)Timestamp is represented by combining mSec and uSec.
For example, for 12.345ms (12ms + 345us), mSec=12 and uSec=345.
uSecuint16_tTimestamp (microseconds)
Protocoluint8_tProtocolSee Log Type for value meanings.
Diruint8_tDirectionSee Log Direction for value meanings.
MiscunionMiscellaneous informationUnion containing different fields for CAN and LIN (see Misc in StMPXLog).
Datauint8_t [64]DataElement indices 0 to 63 correspond to D1 to D64.
In LIN, the same index as DL is checksum.

Supplementary Information​

Misc in StMPXLog​

Misc in StMPXLog is a union whose active branch changes by protocol (CAN/LIN).
Determine protocol from Protocol and read only the active branch below.

Condition (Protocol)Active Member
Any of: MPX_LOG_TYPE_CAN, MPX_LOG_TYPE_CANFD, MPX_LOG_TYPE_CANFD_NOBRSMisc.CAN
MPX_LOG_TYPE_LINMisc.LIN

Misc.CAN in StMPXLog​

Misc.CAN in StMPXLog has the following members.

VariableTypeDescriptionNotes
IDuint32_tCAN ID (standard or extended)For standard ID, value is set in lower 11 bits (bit10 to bit0).
RTRuint8_tRemote Transmission Request (RTR)See CAN RTR.
IDEuint8_tID format (IDE)See CAN ID Format.
DLuint8_tData length (DL) 
Erroruint8_tError flagSee CAN Error Flag.
ErrorInfouint32_tError informationSee CAN Error Information.

Misc.LIN in StMPXLog​

Misc.LIN in StMPXLog has the following members.

VariableTypeDescriptionNotes
IDuint8_tLIN ID 
SBLenuint8_tSyncBreak width 
WakeupWidthuint16_tWakeup pulse width 
Typeuint8_tLIN log typeSee LIN Log Type.
DLuint8_tData length (DL) 
Reserved1uint8_t [2]Reserved 1 
ErrorCodeuint8_tError codeSee LIN Error Code.
Reserved2uint8_t [3]Reserved 2