Skip to main content

Constant Definitions (define)

This section describes the constant definitions used by this product.

Definition List

DefinitionConstant Name
API Return CodesE_*
LED SettingsMPX_LED_*
MicroPeckerX StatusMPX_STATUS_*
Sync ModeMPX_SYNC_*
Log Acquisition ModeMPX_GETLOGMODE_*
Log TypeMPX_LOG_TYPE_*
Log DirectionMPX_LOG_DIR_*
Error FlagCAN_ERRFLG_*
Error InformationCAN_ERR_*
Buffer Overrun FlagMPX_LOG_BUFOVER_*
Termination ResistorMPX_CAN_TERMINATE_*
Operation ModeMPX_MODE_*
Arbitration Baud RateMPX_CAN_PARAM_ABR_*
Data Baud RateMPX_CAN_PARAM_DBR_*
Sample PointMPX_CAN_PARAM_SP_*
ProtocolMPX_CAN_PROTOCOL_*
Bit Rate SwitchMPX_CAN_BRS_*
Error BehaviorMPX_CAN_ERR_BEHAVIOR_*
One-shot Transmission Enable/DisableMPX_CAN_ONESHOT_*
Frame TypeMPX_CAN_FRAME_TYPE_*
Slot Enable/DisableMPX_CAN_SLOT_*
Final Frame FlagMPX_CAN_LOG_*
ID FormatMPX_CAN_IDE_*
Remote Transmission RequestMPX_CAN_RTR_*
Trigger TypeMPX_CAN_SIM_TRIGGER_*
Increment SettingMPX_CAN_SIM_INC_*
Slot Update RequestMPX_CAN_SLOT_REQ_*
FD FormatMPX_CAN_FDF_*
Log Size for Callback ModeMPX_GETLOG_CALLBACK_*
Log Size for GetLog API ModeMPX_GETLOG_*
Log Size for Log ReplayMPX_CAN_SIM_REPLAY_*

Definition Details

API Return Codes

Constant NameMeaning
E_OKNormal completion
E_PARAMParameter error
E_DEVICEDevice not detected
E_COMMUSB communication error
E_TGTTarget error
E_TRG_BUSYTrigger setting failed
E_DCT_FULLDirect transmission FIFO full
E_LOG_OVERLog replay data count overflow
E_STATUSStatus error
E_TIMEOUTUSB communication timeout
E_OTHERUnknown error

LED Settings

Constant NameMeaning
MPX_LED_OFFLED off
MPX_LED_ONLED on or blinking

MicroPeckerX Status

Constant NameMeaning
MPX_STATUS_RUNAPP running state
MPX_STATUS_PARAMWaiting for parameter settings
MPX_STATUS_SYNCWaiting for synchronization
MPX_STATUS_NONEInvalid state
MPX_STATUS_MONMonitor state
MPX_STATUS_SIMSimulation mode state
MPX_STATUS_LOGLog replay mode state
MPX_STATUS_BURBurst mode (single frame) state
MPX_STATUS_BUR_LOGBurst mode (log replay) state
MPX_STATUS_E_CANCAN transition error state
MPX_STATUS_UNKNOWNUnknown state

For the MicroPeckerX status transition diagram, see ***.

Sync Mode

Constant NameMeaning
MPX_SYNC_MASTERMaster mode
MPX_SYNC_SLAVESlave mode

Log Acquisition Mode

Constant NameMeaning
MPX_GETLOGMODE_CALLBACKCallback function mode
MPX_GETLOGMODE_GETLOGAPILog acquisition API mode

Log Type

Constant NameMeaningNotes
MPX_LOG_TYPE_CANCAN
MPX_LOG_TYPE_CANFDCAN-FD (bit rate switch enabled)
MPX_LOG_TYPE_CANFD_NOBRSCAN-FD (bit rate switch disabled)
MPX_LOG_TYPE_EMPTYTimestamp onlyOccurs only when log acquisition mode is MPX_GETLOG_CALLBACK (callback function mode).

Log Direction

Constant NameMeaning
MPX_LOG_DIR_RXReceive log
MPX_LOG_DIR_TXTransmit log

Error Flag

Constant NameMeaning
CAN_ERRFLG_FALSENo error
CAN_ERRFLG_TRUEError present

Error Information

Constant NameMeaning
CAN_ERR_NONENo error
CAN_ERR_BUSBus error
CAN_ERR_WARNError warning
CAN_ERR_PASVError passive
CAN_ERR_BUSOFFBus-off start
CAN_ERR_BUSWAKEBus-off recovery
CAN_ERR_OVERLOADOverload
CAN_ERR_BUSLOCKChannel bus lock
CAN_ERR_ARBLOSTArbitration lost
CAN_ERR_STAFFStuff error
CAN_ERR_FORMForm error
CAN_ERR_ACKACK error
CAN_ERR_CRCCRC error
CAN_ERR_RECESSIVERecessive bit error
CAN_ERR_DOMINANTDominant bit error
CAN_ERR_DELIMITERACK delimiter error

Buffer Overrun Flag

Constant NameMeaning
MPX_LOG_BUFOVER_FALSEBuffer overrun not occurred
MPX_LOG_BUFOVER_TRUEBuffer overrun occurred

Termination Resistor

Constant NameMeaning
MPX_CAN_TERMINATE_DISABLENo termination resistor
MPX_CAN_TERMINATE_ENABLETermination resistor enabled

Operation Mode

Constant NameMeaning
MPX_MODE_LISTENMonitor mode (no ACK)
MPX_MODE_MONITORMonitor mode (with ACK)
MPX_MODE_CAN_SIMSimulation mode
MPX_MODE_CAN_LOGREPLAYLog replay mode
MPX_MODE_CAN_BURST_FRMBurst transfer mode (single frame)
MPX_MODE_CAN_BURST_LOGBurst transfer mode (log replay)
MPX_MODE_NONENo operation

Arbitration Baud Rate

Constant NameMeaning
MPX_CAN_PARAM_ABR_1M1 Mbps
MPX_CAN_PARAM_ABR_500K500 kbps
MPX_CAN_PARAM_ABR_250K250 kbps
MPX_CAN_PARAM_ABR_125K125 kbps

Data Baud Rate

Constant NameMeaning
MPX_CAN_PARAM_DBR_5M5 Mbps
MPX_CAN_PARAM_DBR_4M4 Mbps
MPX_CAN_PARAM_DBR_2M2 Mbps
MPX_CAN_PARAM_DBR_1M1 Mbps
MPX_CAN_PARAM_DBR_500K500 kbps

Sample Point

Constant NameMeaning
MPX_CAN_PARAM_SP_60P60%
MPX_CAN_PARAM_SP_65P65%
MPX_CAN_PARAM_SP_70P70%
MPX_CAN_PARAM_SP_75P75%
MPX_CAN_PARAM_SP_80P80%
MPX_CAN_PARAM_SP_85P85%

Available sample points vary depending on the combination of arbitration baud rate and data baud rate (see Baud Rate and Sample Point).

Protocol

Constant NameMeaning
MPX_CAN_PROTOCOL_CANCAN
MPX_CAN_PROTOCOL_CANFDCAN FD

Bit Rate Switch

Constant NameMeaning
MPX_CAN_BRS_DISABLEBit rate switch disabled
MPX_CAN_BRS_ENABLEBit rate switch enabled

Error Behavior

Constant NameMeaning
MPX_CAN_ERR_BEHAVIOR_ACTIVEError active
MPX_CAN_ERR_BEHAVIOR_PASSIVEError passive

One-shot Transmission Enable/Disable

Constant NameMeaning
MPX_CAN_ONESHOT_DISABLEOne-shot transmission disabled
MPX_CAN_ONESHOT_ENABLEOne-shot transmission enabled

Frame Type

Constant NameMeaning
MPX_CAN_FRAME_TYPE_PERIODICPeriodic transmission
MPX_CAN_FRAME_TYPE_PERIODIC_TRIGGERStart periodic transmission by event
MPX_CAN_FRAME_TYPE_EVENTEvent transmission
MPX_CAN_FRAME_TYPE_EVENTPERIODICEvent periodic transmission

Slot Enable/Disable

Constant NameMeaning
MPX_CAN_SLOT_DISABLESlot disabled
MPX_CAN_SLOT_ENABLESlot enabled

Final Frame Flag

Constant NameMeaning
MPX_CAN_LOG_NOTLASTNot the final frame of log replay
MPX_CAN_LOG_LASTFinal frame of log replay

ID Format

Constant NameMeaning
MPX_CAN_IDE_STDStandard ID
MPX_CAN_IDE_EXTExtended ID

Remote Transmission Request

Constant NameMeaning
MPX_CAN_RTR_DATAData frame
MPX_CAN_RTR_REMOTERemote frame

Trigger Type

Constant NameMeaning
MPX_CAN_SIM_TRIGGER_USERUser-specified
MPX_CAN_SIM_TRIGGER_CANReceive specified CAN ID
MPX_CAN_SIM_TRIGGER_CANFDReceive specified CAN FD ID

Increment Setting

Constant NameMeaning
MPX_CAN_SIM_INC_FALSENo increment
MPX_CAN_SIM_INC_TRUEIncrement enabled

Slot Update Request

Constant NameMeaning
MPX_CAN_SLOT_REQ_NONENo transmit trigger, no data rewrite
MPX_CAN_SLOT_REQ_DATANo transmit trigger, with data rewrite
MPX_CAN_SLOT_REQ_TRGWith transmit trigger, no data rewrite
MPX_CAN_SLOT_REQ_DATA_TRGWith transmit trigger, with data rewrite

FD Format

Constant NameMeaning
MPX_CAN_FDF_OFFCAN format
MPX_CAN_FDF_ONCAN FD format

Log Size for Callback Mode

Constant NameMeaning
MPX_GETLOG_CALLBACK_HEADERSIZEHeader size (excluding data field)

Log Size for GetLog API Mode

Constant NameMeaning
MPX_GETLOG_SIZELog size

Log Size for Log Replay

Constant NameMeaning
MPX_CAN_SIM_REPLAY_HEADERSIZEHeader size (excluding data field)

Supplemental Information

Baud Rate and Sample Point

Available sample points vary depending on the combination of arbitration baud rate and data baud rate.

Baud RateArbitration Sample PointData Sample Point
ArbitrationData60%65%70%75%80%85%60%65%70%75%80%85%
125kbps500kbps
1Mbps----
2Mbps-------
250kbps500kbps
1Mbps
2Mbps---
4Mbps-------
5Mbps---------
500kbps500kbps
1Mbps
2Mbps---
4Mbps---
5Mbps-----
1Mbps500kbps---
1Mbps
2Mbps---
4Mbps---
5Mbps-----

A combination of arbitration baud rate 125kbps and data baud rate 4Mbps or 5Mbps cannot be configured.