Sequence and Status Transitions
This chapter describes the product sequence and MicroPecker status transitions.
Sequence and Status Transitions
The sequence of this product is as follows.
Items in solid-line boxes are required processes, and items in dashed-line boxes are optional processes.
Also, ☆ indicates that the API should be called multiple times according to the number of MicroPeckerX units used, and ★ indicates that the API should be called multiple times according to the total number of channels used.
Monitoring Sequence
Sequence Table
| # | API | Process | Description |
|---|---|---|---|
| 1 | MPXOpen | Recognize MicroPeckerX unit(s) | Connect all MicroPeckerX units you want to recognize to the PC, then call this API once. |
| 2 | MPXSetCANParam | Set communication parameters | Call this API for each channel in use (communication parameters can be configured independently per channel). |
| 3 | MPXSetGetLogMode | Set log acquisition mode | Call this API for each channel in use (log acquisition mode can be configured independently per channel). Channels for which this API is not called operate in callback function mode. |
| 4 | MPXSetLogCallBack | Set callback function for log acquisition | Call this API for each channel set to callback function mode in step #3 (different callback functions can be set per channel). This API is unnecessary for channels set to log acquisition API mode. |
| 5 | MPXMonitorStart | Start monitoring | Call this API for each MicroPeckerX unit in use. If multiple MicroPeckerX units operate synchronously, first start monitoring on all slave-mode units, then start monitoring on the master-mode unit. |
| 6 | MPXGetLog or MPXGetLogEx | Acquire log information | If log acquisition mode is set to log acquisition API mode, this API must be called periodically per channel to acquire logs (buffer overrun occurs if logs are not acquired). If callback function mode is set, this API is unnecessary. |
| 7 | MPXMonitorStop | Stop monitoring | At the timing to stop monitoring, call this API for each MicroPeckerX unit in use. If multiple MicroPeckerX units are operating, first stop monitoring on the master-mode unit, then sequentially stop monitoring on slave-mode units. |
| 8 | MPXClose | Release MicroPeckerX recognition | Call this API once to release recognized MicroPeckerX units. If you want to restart monitoring while keeping units recognized, restart the procedure from step #2. |
Simulation Sequence
Sequence Table
| # | API | Process | Description |
|---|---|---|---|
| 1 | MPXOpen | Recognize MicroPeckerX unit(s) | Connect all MicroPeckerX units you want to recognize to the PC, then call this API. |
| 2 | MPXSetCANParam | Set communication parameters | Call this API for each channel in use (communication parameters can be configured independently per channel). |
| 3 | MPXSetGetLogMode | Set log acquisition mode | Call this API for each channel in use (log acquisition mode can be configured independently per channel). Channels for which this API is not called operate in callback function mode. |
| 4 | MPXSetLogCallBack | Set callback function for log acquisition | Call this API for each channel set to callback function mode in step #3 (different callback functions can be set per channel). This API is unnecessary for channels set to log acquisition API mode. |
| 5 | MPXSetSlot | Configure slot information before monitoring | Configure slot information as needed. |
| 6 | MPXMonitorStart | Start monitoring | Call this API for each MicroPeckerX unit in use. If multiple MicroPeckerX units operate synchronously, first start monitoring on all slave-mode units, then start monitoring on the master-mode unit. |
| 7 | MPXGetLog or MPXGetLogEx | Acquire log information | In callback function mode, calling MPXGetLog or MPXGetLogEx is unnecessary.In log acquisition API mode, acquire log information periodically if needed by calling MPXGetLog or MPXGetLogEx.Even if buffer overrun occurs due to not acquiring log information, operation is not affected. |
| 8 | MPXChangeSlot or MPXSendSlot or MPXDirectSend | Configure slot information during monitoring Request slot transmission Transmit frame | Change slot information and/or transmit data as needed. |
| 9 | MPXMonitorStop | Stop monitoring | At the timing to stop monitoring, call this API for each MicroPeckerX unit in use. If multiple MicroPeckerX units are operating, first stop monitoring on the master-mode unit, then sequentially stop monitoring on slave-mode units. |
| 10 | MPXClose | Release MicroPeckerX recognition | Call this API once to release recognized MicroPeckerX units. If you want to restart monitoring while keeping units recognized, restart the procedure from step #2. |
Log Replay Sequence
Sequence Table
| # | API | Process | Description |
|---|---|---|---|
| 1 | MPXOpen | Recognize MicroPeckerX unit(s) | Connect all MicroPeckerX units you want to recognize to the PC, then call this API. |
| 2 | MPXSetCANParam | Set communication parameters | Call this API for each channel in use (communication parameters can be configured independently per channel). |
| 3 | MPXSetGetLogMode | Set log acquisition mode | Call this API for each channel in use (log acquisition mode can be configured independently per channel). Channels for which this API is not called operate in callback function mode. |
| 4 | MPXSetLogCallBack | Set callback function for log acquisition | Call this API for each channel set to callback function mode in step #3 (different callback functions can be set per channel). This API is unnecessary for channels set to log acquisition API mode. |
| 5 | MPXSetLogRequestCallBack | Set callback function for log replay data requests | Sets the callback function used when MicroPeckerX requests log replay data during operation in log replay mode or burst transfer mode (log replay). |
| 6 | MPXSetLogReplayData | Send log replay data | MicroPeckerX has two 16,384-byte buffers for holding log replay data. Call MPXSetLogReplayData twice in advance and transfer up to 32,768 bytes.If the data size is less than 16,384 bytes, one call is sufficient. |
| 7 | MPXLogReplayStart | Start transmission in log replay mode or burst transfer mode | If you want transmission of log replay data to start immediately after monitoring begins, call MPXLogReplayStart before starting monitoring. |
| 8 | MPXMonitorStart | Start monitoring | Call this API for each MicroPeckerX unit in use. If multiple MicroPeckerX units operate synchronously, first start monitoring on all slave-mode units, then start monitoring on the master-mode unit. |
| 9 | MPXGetLog or MPXGetLogEx | Acquire log information | In callback function mode, calling MPXGetLog or MPXGetLogEx is unnecessary.In log acquisition API mode, acquire log information periodically if needed by calling MPXGetLog or MPXGetLogEx.Even if buffer overrun occurs due to not acquiring log information, operation is not affected. |
| 10 | MPXLogReplayStart or MPXLogReplayStop | Start transmission in log replay mode or burst transfer mode Stop transmission in log replay mode or burst transfer mode | During monitoring, call MPXLogReplayStart to start log replay data transmission, or call MPXLogReplayStop to stop it. |
| 11 | MPXSetLogReplayData | Send log replay data | If MicroPeckerX requests log replay data, transfer it as quickly as possible based on information from the callback function. If transfer is delayed, timeout errors occur in subsequent communication. |
| 12 | MPXMonitorStop | Stop monitoring | At the timing to stop monitoring, call this API for each MicroPeckerX unit in use. If multiple MicroPeckerX units are operating, first stop monitoring on the master-mode unit, then sequentially stop monitoring on slave-mode units. |
| 13 | MPXClose | Release MicroPeckerX recognition | Call this API once to release recognized MicroPeckerX units. If you want to restart monitoring while keeping units recognized, restart the procedure from step #2. |