This shows you the differences between two versions of the page.
Both sides previous revision Previous revision | Next revision Both sides next revision | ||
projects:crazyflie:crtp:log [2013-03-20 10:22] macke |
projects:crazyflie:crtp:log [2013-03-20 10:45] macke |
||
---|---|---|---|
Line 2: | Line 2: | ||
For more information on how to use this and how this is implemented have a look [[projects: | For more information on how to use this and how this is implemented have a look [[projects: | ||
- | ===== State machines ===== | + | ====== State machines |
- | ==== Downloading the Table Of Contents ==== | + | ===== Downloading the Table Of Contents |
< | < | ||
/ | / | ||
Line 13: | Line 13: | ||
Yes | Yes | ||
</ | </ | ||
- | ===== Communication protocol ===== | + | ====== Communication protocol |
The log port is separated in 3 channels: | The log port is separated in 3 channels: | ||
Line 22: | Line 22: | ||
| | | | ||
- | ==== Table of content access ==== | + | ===== Table of content access |
This channel is used to download the Table Of Contents that contains all the variables that are available for logging and what types they are. | This channel is used to download the Table Of Contents that contains all the variables that are available for logging and what types they are. | ||
Line 31: | Line 31: | ||
| 1 | GET_INFO | | 1 | GET_INFO | ||
- | === Get TOC item === | + | ==== Get TOC item ==== |
The GET_ITEM TOC command permits to retrieved the log variables name, group and types from the copter. This command is intended to be requested from all the ID from 0 to LOG_LEN (see GET_INFO). | The GET_ITEM TOC command permits to retrieved the log variables name, group and types from the copter. This command is intended to be requested from all the ID from 0 to LOG_LEN (see GET_INFO). | ||
Line 63: | Line 63: | ||
Type, group and name are not sent if the required ID is higher than TOC_LEN-1. | Type, group and name are not sent if the required ID is higher than TOC_LEN-1. | ||
- | === Get Info === | + | ==== Get Info ==== |
The get info command is intended to be requested first when connecting to the copter. This permits to know the number of variable, the limitations of the log implementation and the fingerprint of the log variables. | The get info command is intended to be requested first when connecting to the copter. This permits to know the number of variable, the limitations of the log implementation and the fingerprint of the log variables. | ||
Line 91: | Line 91: | ||
| 7 | LOG_MAX_OPS | | 7 | LOG_MAX_OPS | ||
- | ==== Log control ==== | + | ===== Log control |
The log control channel permits to setup, activate, deactivate and remove log packets. Like the TOC access channel the first data byte represents a command. | The log control channel permits to setup, activate, deactivate and remove log packets. Like the TOC access channel the first data byte represents a command. | ||
Line 102: | Line 102: | ||
| 4 | STOP_BLOCK | | 4 | STOP_BLOCK | ||
- | === Create block === | + | ==== Create block ==== |
- | === Append variable to block === | + | ==== Append variable to block ==== |
- | === Delete block === | + | ==== Delete block ==== |
- | === Start block === | + | ==== Start block ==== |
- | === Stop block === | + | ==== Stop block ==== |
- | ==== Log data ==== | + | ===== Log data ===== |
The log data channel is used by the copter to send the log blocks at the programmed rate. The packet format is | The log data channel is used by the copter to send the log blocks at the programmed rate. The packet format is |