|
| 1 | +# Commands and Telemetry: |
| 2 | + |
| 3 | +## Telemetry ( tlmGUI/ directory ): |
| 4 | +Telemetry is sent from the running cFE/CFS as CCSDS telemetry packets encapsulated in |
| 5 | +UDP/IP packets. The `enable telemetry` command tells the TO_LAB application to start |
| 6 | +sending packets to a UDP port (port #1234 by default) on the `localhost` or a specified IP. |
| 7 | + |
| 8 | +Start the telemetry system using the Ground System's main window. |
| 9 | + |
| 10 | +Buttons are available for individual telemetry pages. |
| 11 | + |
| 12 | +New pages can be added by adding to the `telemetry-pages.txt` text file. |
| 13 | + |
| 14 | +The format is not very forgiving, and must be: |
| 15 | +Description, Name of the Python class, Telemetry Message ID, packet definition file |
| 16 | + |
| 17 | +Also, a corresponding telemetry packet definition file must be added. |
| 18 | + |
| 19 | +For example: `cfe-es-hk-tlm.txt` is for the cFE Executive Services housekeeping packet. |
| 20 | +That file contains the information needed to decode and display each data |
| 21 | +field of the packet. This is comma-delimited text, and has no error checking. |
| 22 | + |
| 23 | +### The fields are: |
| 24 | + |
| 25 | +1. Field Description -- This is displayed on the GUI telemetry page |
| 26 | + |
| 27 | +2. Byte offset in packet -- This is the starting byte for the data field |
| 28 | + |
| 29 | +3. Length of data field in packet -- For integer types it must be 1, 2, or 4 |
| 30 | + For strings, the number of characters (such as 16) |
| 31 | + |
| 32 | +4. Python type -- Python type for the field |
| 33 | +* B = unsigned byte |
| 34 | +* H = unsigned 16-bit integer |
| 35 | +* I = unsigned 32-bit integer |
| 36 | +* s = String |
| 37 | + |
| 38 | +Notes: Floating point types are not supported yet, but are planned. Also the |
| 39 | +type should match the length from #3 above. |
| 40 | + |
| 41 | +See all of the types here: |
| 42 | +http://docs.python.org/3/library/struct.html#format-characters |
| 43 | + |
| 44 | +5. Display type -- This is how the data is displayed on the page |
| 45 | + Dec = Decimal |
| 46 | + Hex = Hexadecimal |
| 47 | + Enm = Enumerated Type ( see next four fields ) |
| 48 | + Str = String |
| 49 | + |
| 50 | +6. Enumerated type 0 -- This string is displayed if the display type is Enm |
| 51 | +and the value is 0 |
| 52 | + |
| 53 | +7. Enumerated type 1 -- This string is displayed if the display type is Enm |
| 54 | +and the value is 1 |
| 55 | + |
| 56 | +8. Enumerated type 2 -- This string is displayed if the display type is Enm |
| 57 | +and the value is 2 |
| 58 | + |
| 59 | +9. Enumerated type 3 -- This string is displayed if the display type is Enm |
| 60 | +and the value is 3 |
| 61 | + |
| 62 | +### What needs to be done: |
| 63 | + |
| 64 | +1. Expand number of enumerated types |
| 65 | + |
| 66 | +2. Provide some sort of optional data transformation |
| 67 | + |
| 68 | +3. Implement floats |
| 69 | + |
| 70 | +4. Be able to record/graph data? May be beyond the scope of this. |
| 71 | + |
| 72 | +# Commands (cmdGUI/ directory) |
| 73 | + |
| 74 | +This is a simple Python / QT based Command GUI for the cmdUtil utility. |
| 75 | +It provides a list of "command pages" with a list of commands to send to a subsystem. |
| 76 | + |
| 77 | +Start the command system using the Ground System's main window. |
| 78 | + |
| 79 | +The dialogs were created in the QT designer program, and converted to Python classes |
| 80 | +using the "pyuic5" utility: |
| 81 | + |
| 82 | +``` |
| 83 | +pyuic5 -o MyDialog.py MyDialog.ui |
| 84 | +``` |
| 85 | + |
| 86 | +The list of pages along with the AppID and address for each page is defined in the |
| 87 | +file `command-pages.txt`. |
| 88 | + |
| 89 | +Each command page has a list of subsystem commands in the text files. For example, |
| 90 | +ES is in `cfe-es-cmds.txt`. |
| 91 | + |
| 92 | +This first release of the program does not allow editing of the command parameters |
| 93 | +in the GUI. This would be really helpful for on-the-fly commanding (when you |
| 94 | +want to do something like delete an app, and specify the app name in a dialog.) |
| 95 | + |
| 96 | +There is the possibility to implement multiple command interfaces using |
| 97 | +the Python class parameter that is passed in. For example, a copy of |
| 98 | +`UdpCommands.py` could be made, which would allow the commands to be sent |
| 99 | +over an Xbee RF radio, or TCP connection. |
| 100 | + |
| 101 | +The subsystem commands `cfe-es-cmds.txt` are interface-agnostic, so |
| 102 | +they can be reused. |
0 commit comments