Sequences and Status Transitions
This chapter explains the processing sequences of this product and the transitions of the MicroPeckerX status.
Sequences and status transitions
The overall sequence is shown below. Solid-line boxes indicate required processing, while dashed-line boxes indicate optional processing. ☆ indicates APIs that you may need to call multiple times depending on the number of MicroPeckerX units in use, and ★ indicates APIs that may need to be called multiple times depending on the total number of channels in use.
Monitoring sequence
Sequence table
| # | API | Process | Description |
|---|---|---|---|
| 1 | MPXOpen | Detect MicroPeckerX units | After connecting every MicroPeckerX you want to use to the PC, call this API once. |
| 2 | MPXSetCANParam | Configure communication parameters | Call this API for each channel you will use. (Communication parameters are configured independently per channel.) |
| 3 | MPXSetGetLogMode | Configure log acquisition mode | Call this API for each channel you will use. (The log acquisition mode is configured independently per channel.) Channels for which you do not call this API operate in callback mode. |
| 4 | MPXSetLogCallBack | Register the log callback | For each channel set to callback mode in step #3, call this API to register the callback function. (You can register different callback functions per channel.) This API is not required for channels configured for API mode. |
| 5 | MPXMonitorStart | Start monitoring | Call this API for each MicroPeckerX unit in use. When operating multiple units in sync, start monitoring on all slave units first, then start the master unit. |
| 6 | MPXGetLog or MPXGetLogEx | Retrieve log information | When using API mode, call this API periodically for each channel to retrieve log information. (If log retrieval is delayed, a buffer overrun occurs.) This API is not required when using callback mode. |
| 7 | MPXMonitorStop | Stop monitoring | When it is time to stop monitoring, call this API for each MicroPeckerX unit in use. If multiple units are operating, stop the master unit first, then stop each slave unit in order. |
| 8 | MPXClose | Release MicroPeckerX detection | Call this API once when you no longer need to keep the units detected. To start monitoring again while keeping the units detected, repeat the process from step #2. |
Simulation sequence
Sequence table
| # | API | Process | Description |
|---|---|---|---|
| 1 | MPXOpen | Detect MicroPeckerX units | After connecting every MicroPeckerX you want to use to the PC, call this API. |
| 2 | MPXSetCANParam | Configure communication parameters | Call this API for each channel you will use. (Communication parameters are configured independently per channel.) |
| 3 | MPXSetGetLogMode | Configure log acquisition mode | Call this API for each channel you will use. (The log acquisition mode is configured independently per channel.) Channels for which you do not call this API operate in callback mode. |
| 4 | MPXSetLogCallBack | Register the log callback | For each channel set to callback mode in step #3, call this API to register the callback function. (You can register different callback functions per channel.) This API is not required for channels configured for API mode. |
| 5 | MPXSetSlot | Configure slot information before monitoring | Configure slot information as needed before monitoring. |
| 6 | MPXMonitorStart | Start monitoring | Call this API for each MicroPeckerX unit in use. When operating multiple units in sync, start monitoring on all slave units first, then start the master unit. |
| 7 | MPXGetLog or MPXGetLogEx | Retrieve log information | Callback mode does not require calls to MPXGetLog or MPXGetLogEx. When using API mode and log information is required, retrieve it periodically with MPXGetLog or MPXGetLogEx. A buffer overrun does not affect operation even if you skip retrieval. |
| 8 | MPXChangeSlot or MPXSendSlot or MPXDirectSend | Update slot information during monitoring / Request slot transmission / Transmit a frame | Change slot information or send data as needed while monitoring. |
| 9 | MPXMonitorStop | Stop monitoring | When it is time to stop monitoring, call this API for each MicroPeckerX unit in use. If multiple units are operating, stop the master unit first, then stop each slave unit in order. |
| 10 | MPXClose | Release MicroPeckerX detection | Call this API once when you no longer need to keep the units detected. To start monitoring again while keeping the units detected, repeat the process from step #2. |
Log replay sequence
Sequence table
| # | API | Process | Description |
|---|---|---|---|
| 1 | MPXOpen | Detect MicroPeckerX units | After connecting every MicroPeckerX you want to use to the PC, call this API. |
| 2 | MPXSetCANParam | Configure communication parameters | Call this API for each channel you will use. (Communication parameters are configured independently per channel.) |
| 3 | MPXSetGetLogMode | Configure log acquisition mode | Call this API for each channel you will use. (The log acquisition mode is configured independently per channel.) Channels for which you do not call this API operate in callback mode. |
| 4 | MPXSetLogCallBack | Register the log callback | For each channel set to callback mode in step #3, call this API to register the callback function. (You can register different callback functions per channel.) This API is not required for channels configured for API mode. |
| 5 | MPXSetLogRequestCallBack | Register the log replay data request callback | Registers the callback function that is invoked when the MicroPeckerX unit requests log replay data in log replay mode or burst transfer mode (log replay). |
| 6 | MPXSetLogReplayData | Send log replay data | MicroPeckerX provides two 16,384-byte buffers for log replay data. Call MPXSetLogReplayData twice in advance to transfer up to 32,768 bytes. If the data size is less than 16,384 bytes, a single call is sufficient. |
| 7 | MPXLogReplayStart | Start log replay mode or burst transfer mode | If you want log replay data transmission to begin immediately after monitoring starts, call MPXLogReplayStart before starting monitoring. |
| 8 | MPXMonitorStart | Start monitoring | Call this API for each MicroPeckerX unit in use. When operating multiple units in sync, start monitoring on all slave units first, then start the master unit. |
| 9 | MPXGetLog or MPXGetLogEx | Retrieve log information | Callback mode does not require calls to MPXGetLog or MPXGetLogEx. When using API mode and log information is required, retrieve it periodically with MPXGetLog or MPXGetLogEx. A buffer overrun does not affect operation even if you skip retrieval. |
| 10 | MPXLogReplayStart or MPXLogReplayStop | Start or stop log replay mode / burst transfer mode | Call MPXLogReplayStart when you want to start sending log replay data during monitoring, and call MPXLogReplayStop when you want to stop sending data. |
| 11 | MPXSetLogReplayData | Send log replay data | When the MicroPeckerX unit requests log replay data, transfer the data as soon as possible based on the information provided by the callback. If data transfer is delayed, subsequent communication results in a timeout error. |
| 12 | MPXMonitorStop | Stop monitoring | When it is time to stop monitoring, call this API for each MicroPeckerX unit in use. If multiple units are operating, stop the master unit first, then stop each slave unit in order. |
| 13 | MPXClose | Release MicroPeckerX detection | Call this API once when you no longer need to keep the units detected. To start monitoring again while keeping the units detected, repeat the process from step #2. |