Skip to main content

Constant Definitions (define)

This chapter explains the constant definitions provided by this product.

List of Definitions

DefinitionConstant name
API Return CodesE_*
LED SettingsMPX_LED_*
MicroPeckerX StatusMPX_STATUS_*
Sync ModesMPX_SYNC_*
Log Acquisition ModesMPX_GETLOGMODE_*
Log TypesMPX_LOG_TYPE_*
Log DirectionMPX_LOG_DIR_*
Error FlagCAN_ERRFLG_*
Error InformationCAN_ERR_*
Buffer Overrun FlagMPX_LOG_BUFOVER_*
Termination ResistorMPX_CAN_TERMINATE_*
Operation ModesMPX_MODE_*
Arbitration Baud RatesMPX_CAN_PARAM_ABR_*
Data Baud RatesMPX_CAN_PARAM_DBR_*
Sample PointsMPX_CAN_PARAM_SP_*
ProtocolsMPX_CAN_PROTOCOL_*
Bit Rate SwitchMPX_CAN_BRS_*
Error BehaviorMPX_CAN_ERR_BEHAVIOR_*
One-Shot TransmissionMPX_CAN_ONESHOT_*
Frame TypesMPX_CAN_FRAME_TYPE_*
Slot EnablementMPX_CAN_SLOT_*
Final Frame FlagMPX_CAN_LOG_*
ID FormatMPX_CAN_IDE_*
Remote Transmission RequestMPX_CAN_RTR_*
Trigger TypesMPX_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 API ModeMPX_GETLOG_*
Log Size for Log ReplayMPX_CAN_SIM_REPLAY_*

Definition Details

API Return Codes

Constant nameDescription
E_OKCompleted successfully
E_PARAMInvalid parameter
E_DEVICEDevice not detected
E_COMMUSB communication error
E_TGTTarget error
E_TRG_BUSYTrigger configuration failed
E_DCT_FULLDirect transmission FIFO full
E_LOG_OVERLog replay data size exceeded
E_STATUSStatus error
E_TIMEOUTUSB communication timeout
E_OTHERUnknown error

LED Settings

Constant nameDescription
MPX_LED_OFFLED off
MPX_LED_ONLED on or blinking

MicroPeckerX Status

Constant nameDescription
MPX_STATUS_RUNAPP started
MPX_STATUS_PARAMWaiting for parameter configuration
MPX_STATUS_SYNCWaiting for synchronization
MPX_STATUS_NONEInactive
MPX_STATUS_MONMonitoring
MPX_STATUS_SIMSimulation mode
MPX_STATUS_LOGLog replay mode
MPX_STATUS_BURBurst mode (single frame)
MPX_STATUS_BUR_LOGBurst mode (log replay)
MPX_STATUS_E_CANCAN transition error
MPX_STATUS_UNKNOWNUnknown status

For the MicroPeckerX status transition diagram, refer to MicroPeckerX Status Transition Diagram.

Sync Modes

Constant nameDescription
MPX_SYNC_MASTERMaster mode
MPX_SYNC_SLAVESlave mode

Log Acquisition Modes

Constant nameDescription
MPX_GETLOGMODE_CALLBACKCallback mode
MPX_GETLOGMODE_GETLOGAPIAPI mode

Log Types

Constant nameDescriptionNotes
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 the log acquisition mode is MPX_GETLOGMODE_CALLBACK (callback mode).

Log Direction

Constant nameDescription
MPX_LOG_DIR_RXReceived log
MPX_LOG_DIR_TXTransmitted log

Error Flag

Constant nameDescription
CAN_ERRFLG_FALSENo error
CAN_ERRFLG_TRUEError occurred

Error Information

Constant nameDescription
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 nameDescription
MPX_LOG_BUFOVER_FALSEBuffer overrun has not occurred
MPX_LOG_BUFOVER_TRUEBuffer overrun occurred

Termination Resistor

Constant nameDescription
MPX_CAN_TERMINATE_DISABLETermination resistor disabled
MPX_CAN_TERMINATE_ENABLETermination resistor enabled

Operation Modes

Constant nameDescription
MPX_MODE_LISTENMonitor mode (without 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 Rates

Constant nameDescription
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 Rates

Constant nameDescription
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 Points

Constant nameDescription
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%

The available sample points depend on the combination of arbitration and data baud rates. See Baud Rate and Sample Points.

Protocols

Constant nameDescription
MPX_CAN_PROTOCOL_CANCAN
MPX_CAN_PROTOCOL_CANFDCAN FD

Bit Rate Switch

Constant nameDescription
MPX_CAN_BRS_DISABLEBit rate switch disabled
MPX_CAN_BRS_ENABLEBit rate switch enabled

Error Behavior

Constant nameDescription
MPX_CAN_ERR_BEHAVIOR_ACTIVEError active
MPX_CAN_ERR_BEHAVIOR_PASSIVEError passive

One-Shot Transmission

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

Frame Types

Constant nameDescription
MPX_CAN_FRAME_TYPE_PERIODICPeriodic transmission
MPX_CAN_FRAME_TYPE_PERIODIC_TRIGGERStart periodic transmission when an event occurs
MPX_CAN_FRAME_TYPE_EVENTEvent transmission
MPX_CAN_FRAME_TYPE_EVENTPERIODICEvent-based periodic transmission

Slot Enablement

Constant nameDescription
MPX_CAN_SLOT_DISABLESlot disabled
MPX_CAN_SLOT_ENABLESlot enabled

Final Frame Flag

Constant nameDescription
MPX_CAN_LOG_NOTLASTNot the final frame in log replay
MPX_CAN_LOG_LASTFinal frame in log replay

ID Format

Constant nameDescription
MPX_CAN_IDE_STDStandard ID
MPX_CAN_IDE_EXTExtended ID

Remote Transmission Request

Constant nameDescription
MPX_CAN_RTR_DATAData frame
MPX_CAN_RTR_REMOTERemote frame

Trigger Types

Constant nameDescription
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 nameDescription
MPX_CAN_SIM_INC_FALSENo increment
MPX_CAN_SIM_INC_TRUEIncrement enabled

Slot Update Request

Constant nameDescription
MPX_CAN_SLOT_REQ_NONENo transmission trigger, no data overwrite
MPX_CAN_SLOT_REQ_DATANo transmission trigger, overwrite data
MPX_CAN_SLOT_REQ_TRGTransmission trigger, no data overwrite
MPX_CAN_SLOT_REQ_DATA_TRGTransmission trigger and data overwrite

FD Format

Constant nameDescription
MPX_CAN_FDF_OFFCAN format
MPX_CAN_FDF_ONCAN FD format

Log Size for Callback Mode

Constant nameDescription
MPX_GETLOG_CALLBACK_HEADERSIZEHeader size (excluding data field)

Log Size for API Mode

Constant nameDescription
MPX_GETLOG_SIZELog size

Log Size for Log Replay

Constant nameDescription
MPX_CAN_SIM_REPLAY_HEADERSIZEHeader size (excluding data field)

Additional Information

Baud Rate and Sample Points

The available sample points depend on the combination of arbitration and data baud rates.

Baud rateArbitration sample pointsData sample points
ArbitrationData60%65%70%75%80%85%60%65%70%75%80%85%
125 kbps500 kbps
1 Mbps----
2 Mbps-------
250 kbps500 kbps
1 Mbps
2 Mbps---
4 Mbps-------
5 Mbps---------
500 kbps500 kbps
1 Mbps
2 Mbps---
4 Mbps---
5 Mbps------
1 Mbps500 kbps---
1 Mbps
2 Mbps---
4 Mbps---
5 Mbps-----

The combination of an arbitration baud rate of 125 kbps with a data baud rate of 4 Mbps or 5 Mbps cannot be configured.