Skip to main content

Constant Definitions (Common)

This section describes common constant definitions used by this product.

Main APIs

Definition List

ItemConstant Name
API Return ValuesE_*
LED SettingsMPX_LED_*
MicroPeckerX StatusMPX_STATUS_*
Sync ModeMPX_SYNC_*
Log Acquisition ModeMPX_GETLOGMODE_*
Log Size for Callback ModeMPX_GETLOG_CALLBACK_*
Log Size for GetLog API ModeMPX_GETLOG_*
Log TypeMPX_LOG_TYPE_*
Log DirectionMPX_LOG_DIR_*
Buffer Overrun PresenceMPX_LOG_BUFOVER_*
Internal ChMPX_INNERCH_*

Definition Details (Common)

API Return Values

Constant NameValueDescription
E_OK0 (0x0)Success
E_PARAM1 (0x1)Parameter error
E_DEVICE2 (0x2)Device not detected
E_COMM3 (0x3)USB communication error
E_TGT4 (0x4)Target error
E_TRG_BUSY11 (0xB)Trigger configuration failed
E_DCT_FULL12 (0xC)Direct transmit FIFO full
E_STATUS105 (0x69)Status error
E_TIMEOUT202 (0xCA)USB communication timeout
E_OTHER255 (0xFF)Other

LED Settings

Constant NameValueDescription
MPX_LED_OFF0 (0x0)LED off
MPX_LED_ON1 (0x1)LED on or blinking

MicroPeckerX Status

Constant NameValueDescription
MPX_STATUS_RUN17 (0x11)APP running state
MPX_STATUS_PARAM18 (0x12)Waiting for parameter setup
MPX_STATUS_SYNC19 (0x13)Waiting for synchronization
MPX_STATUS_NONE32 (0x20)Invalid state
MPX_STATUS_MON33 (0x21)Monitor state
MPX_STATUS_SIM34 (0x22)Simulation mode state
MPX_STATUS_E_CAN241 (0xF1)CAN transition error state
MPX_STATUS_UNKNOWN255 (0xFF)Unknown state

Sync Mode

Constant NameValueDescription
MPX_SYNC_MASTER0 (0x0)Sync master mode
MPX_SYNC_SLAVE1 (0x1)Sync slave mode

Log Acquisition Mode

Constant NameValueDescription
MPX_GETLOGMODE_CALLBACK0 (0x0)Callback function mode
MPX_GETLOGMODE_GETLOGAPI1 (0x1)Log acquisition API mode

Log Size for Callback Mode

Constant NameValueDescription
MPX_GETLOG_CALLBACK_HEADERSIZE12 (0xC)Callback log header size (excluding data section)
MPX_GETLOG_CALLBACK_HEADERSIZE_ERROR10 (0xA)Callback log header size (error log)

Log Size for GetLog API Mode

Constant NameValueDescription
MPX_GETLOG_SIZE84 (0x54)Log size for log acquisition API

Log Type

Constant NameValueDescriptionNotes
MPX_LOG_TYPE_CAN1 (0x1)CAN 
MPX_LOG_TYPE_CANFD2 (0x2)CAN FD (bit rate switch enabled) 
MPX_LOG_TYPE_CANFD_NOBRS3 (0x3)CAN FD (bit rate switch disabled) 
MPX_LOG_TYPE_LIN4 (0x4)LIN 
MPX_LOG_TYPE_EMPTY63 (0x3F)Timestamp onlyOccurs only when log acquisition mode is MPX_GETLOG_CALLBACK (callback function mode).

Log Direction

Constant NameValueDescription
MPX_LOG_DIR_RX0 (0x0)Receive log
MPX_LOG_DIR_TX1 (0x1)Transmit log

Buffer Overrun Presence

Constant NameValueDescription
MPX_LOG_BUFOVER_FALSE0 (0x0)Buffer overrun did not occur
MPX_LOG_BUFOVER_TRUE1 (0x1)Buffer overrun occurred

Internal Ch

Constant NameValueDescription
MPX_INNERCH_LIN1 (0x1)Internal Ch for LIN