]> git.sur5r.net Git - freertos/blob - FreeRTOS-Plus/Demo/Common/FreeRTOS_Plus_CLI_Demos/Sample-CLI-commands.c
Update FreeRTOS+ version number ready for version 9 release candidate 1.
[freertos] / FreeRTOS-Plus / Demo / Common / FreeRTOS_Plus_CLI_Demos / Sample-CLI-commands.c
1 /*\r
2     FreeRTOS V9.0.0rc1 - Copyright (C) 2016 Real Time Engineers Ltd.\r
3     All rights reserved\r
4 \r
5     VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.\r
6 \r
7     This file is part of the FreeRTOS distribution.\r
8 \r
9     FreeRTOS is free software; you can redistribute it and/or modify it under\r
10     the terms of the GNU General Public License (version 2) as published by the\r
11     Free Software Foundation >>>> AND MODIFIED BY <<<< the FreeRTOS exception.\r
12 \r
13     ***************************************************************************\r
14     >>!   NOTE: The modification to the GPL is included to allow you to     !<<\r
15     >>!   distribute a combined work that includes FreeRTOS without being   !<<\r
16     >>!   obliged to provide the source code for proprietary components     !<<\r
17     >>!   outside of the FreeRTOS kernel.                                   !<<\r
18     ***************************************************************************\r
19 \r
20     FreeRTOS is distributed in the hope that it will be useful, but WITHOUT ANY\r
21     WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS\r
22     FOR A PARTICULAR PURPOSE.  Full license text is available on the following\r
23     link: http://www.freertos.org/a00114.html\r
24 \r
25     ***************************************************************************\r
26      *                                                                       *\r
27      *    FreeRTOS provides completely free yet professionally developed,    *\r
28      *    robust, strictly quality controlled, supported, and cross          *\r
29      *    platform software that is more than just the market leader, it     *\r
30      *    is the industry's de facto standard.                               *\r
31      *                                                                       *\r
32      *    Help yourself get started quickly while simultaneously helping     *\r
33      *    to support the FreeRTOS project by purchasing a FreeRTOS           *\r
34      *    tutorial book, reference manual, or both:                          *\r
35      *    http://www.FreeRTOS.org/Documentation                              *\r
36      *                                                                       *\r
37     ***************************************************************************\r
38 \r
39     http://www.FreeRTOS.org/FAQHelp.html - Having a problem?  Start by reading\r
40     the FAQ page "My application does not run, what could be wrong?".  Have you\r
41     defined configASSERT()?\r
42 \r
43     http://www.FreeRTOS.org/support - In return for receiving this top quality\r
44     embedded software for free we request you assist our global community by\r
45     participating in the support forum.\r
46 \r
47     http://www.FreeRTOS.org/training - Investing in training allows your team to\r
48     be as productive as possible as early as possible.  Now you can receive\r
49     FreeRTOS training directly from Richard Barry, CEO of Real Time Engineers\r
50     Ltd, and the world's leading authority on the world's leading RTOS.\r
51 \r
52     http://www.FreeRTOS.org/plus - A selection of FreeRTOS ecosystem products,\r
53     including FreeRTOS+Trace - an indispensable productivity tool, a DOS\r
54     compatible FAT file system, and our tiny thread aware UDP/IP stack.\r
55 \r
56     http://www.FreeRTOS.org/labs - Where new FreeRTOS products go to incubate.\r
57     Come and try FreeRTOS+TCP, our new open source TCP/IP stack for FreeRTOS.\r
58 \r
59     http://www.OpenRTOS.com - Real Time Engineers ltd. license FreeRTOS to High\r
60     Integrity Systems ltd. to sell under the OpenRTOS brand.  Low cost OpenRTOS\r
61     licenses offer ticketed support, indemnification and commercial middleware.\r
62 \r
63     http://www.SafeRTOS.com - High Integrity Systems also provide a safety\r
64     engineered and independently SIL3 certified version for use in safety and\r
65     mission critical applications that require provable dependability.\r
66 \r
67     1 tab == 4 spaces!\r
68 */\r
69 \r
70 \r
71  /******************************************************************************\r
72  *\r
73  * http://www.FreeRTOS.org/cli\r
74  *\r
75  ******************************************************************************/\r
76 \r
77 \r
78 /* FreeRTOS includes. */\r
79 #include "FreeRTOS.h"\r
80 #include "task.h"\r
81 \r
82 /* Standard includes. */\r
83 #include <stdint.h>\r
84 #include <stdio.h>\r
85 #include <stdlib.h>\r
86 #include <string.h>\r
87 \r
88 /* FreeRTOS+CLI includes. */\r
89 #include "FreeRTOS_CLI.h"\r
90 \r
91 #ifndef  configINCLUDE_TRACE_RELATED_CLI_COMMANDS\r
92         #define configINCLUDE_TRACE_RELATED_CLI_COMMANDS 0\r
93 #endif\r
94 \r
95 #ifndef configINCLUDE_QUERY_HEAP_COMMAND\r
96         #define configINCLUDE_QUERY_HEAP_COMMAND 0\r
97 #endif\r
98 \r
99 /*\r
100  * The function that registers the commands that are defined within this file.\r
101  */\r
102 void vRegisterSampleCLICommands( void );\r
103 \r
104 /*\r
105  * Implements the task-stats command.\r
106  */\r
107 static BaseType_t prvTaskStatsCommand( char *pcWriteBuffer, size_t xWriteBufferLen, const char *pcCommandString );\r
108 \r
109 /*\r
110  * Implements the run-time-stats command.\r
111  */\r
112 #if( configGENERATE_RUN_TIME_STATS == 1 )\r
113         static BaseType_t prvRunTimeStatsCommand( char *pcWriteBuffer, size_t xWriteBufferLen, const char *pcCommandString );\r
114 #endif /* configGENERATE_RUN_TIME_STATS */\r
115 \r
116 /*\r
117  * Implements the echo-three-parameters command.\r
118  */\r
119 static BaseType_t prvThreeParameterEchoCommand( char *pcWriteBuffer, size_t xWriteBufferLen, const char *pcCommandString );\r
120 \r
121 /*\r
122  * Implements the echo-parameters command.\r
123  */\r
124 static BaseType_t prvParameterEchoCommand( char *pcWriteBuffer, size_t xWriteBufferLen, const char *pcCommandString );\r
125 \r
126 /*\r
127  * Implements the "query heap" command.\r
128  */\r
129 #if( configINCLUDE_QUERY_HEAP_COMMAND == 1 )\r
130         static BaseType_t prvQueryHeapCommand( char *pcWriteBuffer, size_t xWriteBufferLen, const char *pcCommandString );\r
131 #endif\r
132 \r
133 /*\r
134  * Implements the "trace start" and "trace stop" commands;\r
135  */\r
136 #if( configINCLUDE_TRACE_RELATED_CLI_COMMANDS == 1 )\r
137         static BaseType_t prvStartStopTraceCommand( char *pcWriteBuffer, size_t xWriteBufferLen, const char *pcCommandString );\r
138 #endif\r
139 \r
140 /* Structure that defines the "task-stats" command line command.  This generates\r
141 a table that gives information on each task in the system. */\r
142 static const CLI_Command_Definition_t xTaskStats =\r
143 {\r
144         "task-stats", /* The command string to type. */\r
145         "\r\ntask-stats:\r\n Displays a table showing the state of each FreeRTOS task\r\n",\r
146         prvTaskStatsCommand, /* The function to run. */\r
147         0 /* No parameters are expected. */\r
148 };\r
149 \r
150 /* Structure that defines the "echo_3_parameters" command line command.  This\r
151 takes exactly three parameters that the command simply echos back one at a\r
152 time. */\r
153 static const CLI_Command_Definition_t xThreeParameterEcho =\r
154 {\r
155         "echo-3-parameters",\r
156         "\r\necho-3-parameters <param1> <param2> <param3>:\r\n Expects three parameters, echos each in turn\r\n",\r
157         prvThreeParameterEchoCommand, /* The function to run. */\r
158         3 /* Three parameters are expected, which can take any value. */\r
159 };\r
160 \r
161 /* Structure that defines the "echo_parameters" command line command.  This\r
162 takes a variable number of parameters that the command simply echos back one at\r
163 a time. */\r
164 static const CLI_Command_Definition_t xParameterEcho =\r
165 {\r
166         "echo-parameters",\r
167         "\r\necho-parameters <...>:\r\n Take variable number of parameters, echos each in turn\r\n",\r
168         prvParameterEchoCommand, /* The function to run. */\r
169         -1 /* The user can enter any number of commands. */\r
170 };\r
171 \r
172 #if( configGENERATE_RUN_TIME_STATS == 1 )\r
173         /* Structure that defines the "run-time-stats" command line command.   This\r
174         generates a table that shows how much run time each task has */\r
175         static const CLI_Command_Definition_t xRunTimeStats =\r
176         {\r
177                 "run-time-stats", /* The command string to type. */\r
178                 "\r\nrun-time-stats:\r\n Displays a table showing how much processing time each FreeRTOS task has used\r\n",\r
179                 prvRunTimeStatsCommand, /* The function to run. */\r
180                 0 /* No parameters are expected. */\r
181         };\r
182 #endif /* configGENERATE_RUN_TIME_STATS */\r
183 \r
184 #if( configINCLUDE_QUERY_HEAP_COMMAND == 1 )\r
185         /* Structure that defines the "query_heap" command line command. */\r
186         static const CLI_Command_Definition_t xQueryHeap =\r
187         {\r
188                 "query-heap",\r
189                 "\r\nquery-heap:\r\n Displays the free heap space, and minimum ever free heap space.\r\n",\r
190                 prvQueryHeapCommand, /* The function to run. */\r
191                 0 /* The user can enter any number of commands. */\r
192         };\r
193 #endif /* configQUERY_HEAP_COMMAND */\r
194 \r
195 #if configINCLUDE_TRACE_RELATED_CLI_COMMANDS == 1\r
196         /* Structure that defines the "trace" command line command.  This takes a single\r
197         parameter, which can be either "start" or "stop". */\r
198         static const CLI_Command_Definition_t xStartStopTrace =\r
199         {\r
200                 "trace",\r
201                 "\r\ntrace [start | stop]:\r\n Starts or stops a trace recording for viewing in FreeRTOS+Trace\r\n",\r
202                 prvStartStopTraceCommand, /* The function to run. */\r
203                 1 /* One parameter is expected.  Valid values are "start" and "stop". */\r
204         };\r
205 #endif /* configINCLUDE_TRACE_RELATED_CLI_COMMANDS */\r
206 \r
207 /*-----------------------------------------------------------*/\r
208 \r
209 void vRegisterSampleCLICommands( void )\r
210 {\r
211         /* Register all the command line commands defined immediately above. */\r
212         FreeRTOS_CLIRegisterCommand( &xTaskStats );     \r
213         FreeRTOS_CLIRegisterCommand( &xThreeParameterEcho );\r
214         FreeRTOS_CLIRegisterCommand( &xParameterEcho );\r
215 \r
216         #if( configGENERATE_RUN_TIME_STATS == 1 )\r
217         {\r
218                 FreeRTOS_CLIRegisterCommand( &xRunTimeStats );\r
219         }\r
220         #endif\r
221         \r
222         #if( configINCLUDE_QUERY_HEAP_COMMAND == 1 )\r
223         {\r
224                 FreeRTOS_CLIRegisterCommand( &xQueryHeap );\r
225         }\r
226         #endif\r
227 \r
228         #if( configINCLUDE_TRACE_RELATED_CLI_COMMANDS == 1 )\r
229         {\r
230                 FreeRTOS_CLIRegisterCommand( &xStartStopTrace );\r
231         }\r
232         #endif\r
233 }\r
234 /*-----------------------------------------------------------*/\r
235 \r
236 static BaseType_t prvTaskStatsCommand( char *pcWriteBuffer, size_t xWriteBufferLen, const char *pcCommandString )\r
237 {\r
238 const char *const pcHeader = "     State   Priority  Stack    #\r\n************************************************\r\n";\r
239 BaseType_t xSpacePadding;\r
240 \r
241         /* Remove compile time warnings about unused parameters, and check the\r
242         write buffer is not NULL.  NOTE - for simplicity, this example assumes the\r
243         write buffer length is adequate, so does not check for buffer overflows. */\r
244         ( void ) pcCommandString;\r
245         ( void ) xWriteBufferLen;\r
246         configASSERT( pcWriteBuffer );\r
247 \r
248         /* Generate a table of task stats. */\r
249         strcpy( pcWriteBuffer, "Task" );\r
250         pcWriteBuffer += strlen( pcWriteBuffer );\r
251 \r
252         /* Minus three for the null terminator and half the number of characters in\r
253         "Task" so the column lines up with the centre of the heading. */\r
254         configASSERT( configMAX_TASK_NAME_LEN > 3 );\r
255         for( xSpacePadding = strlen( "Task" ); xSpacePadding < ( configMAX_TASK_NAME_LEN - 3 ); xSpacePadding++ )\r
256         {\r
257                 /* Add a space to align columns after the task's name. */\r
258                 *pcWriteBuffer = ' ';\r
259                 pcWriteBuffer++;\r
260 \r
261                 /* Ensure always terminated. */\r
262                 *pcWriteBuffer = 0x00;\r
263         }\r
264         strcpy( pcWriteBuffer, pcHeader );\r
265         vTaskList( pcWriteBuffer + strlen( pcHeader ) );\r
266 \r
267         /* There is no more data to return after this single string, so return\r
268         pdFALSE. */\r
269         return pdFALSE;\r
270 }\r
271 /*-----------------------------------------------------------*/\r
272 \r
273 #if( configINCLUDE_QUERY_HEAP_COMMAND == 1 )\r
274 \r
275         static BaseType_t prvQueryHeapCommand( char *pcWriteBuffer, size_t xWriteBufferLen, const char *pcCommandString )\r
276         {\r
277                 /* Remove compile time warnings about unused parameters, and check the\r
278                 write buffer is not NULL.  NOTE - for simplicity, this example assumes the\r
279                 write buffer length is adequate, so does not check for buffer overflows. */\r
280                 ( void ) pcCommandString;\r
281                 ( void ) xWriteBufferLen;\r
282                 configASSERT( pcWriteBuffer );\r
283 \r
284                 sprintf( pcWriteBuffer, "Current free heap %d bytes, minimum ever free heap %d bytes\r\n", ( int ) xPortGetFreeHeapSize(), ( int ) xPortGetMinimumEverFreeHeapSize() );\r
285 \r
286                 /* There is no more data to return after this single string, so return\r
287                 pdFALSE. */\r
288                 return pdFALSE;\r
289         }\r
290 \r
291 #endif /* configINCLUDE_QUERY_HEAP */\r
292 /*-----------------------------------------------------------*/\r
293 \r
294 #if( configGENERATE_RUN_TIME_STATS == 1 )\r
295         \r
296         static BaseType_t prvRunTimeStatsCommand( char *pcWriteBuffer, size_t xWriteBufferLen, const char *pcCommandString )\r
297         {\r
298         const char * const pcHeader = "  Abs Time      % Time\r\n****************************************\r\n";\r
299         BaseType_t xSpacePadding;\r
300 \r
301                 /* Remove compile time warnings about unused parameters, and check the\r
302                 write buffer is not NULL.  NOTE - for simplicity, this example assumes the\r
303                 write buffer length is adequate, so does not check for buffer overflows. */\r
304                 ( void ) pcCommandString;\r
305                 ( void ) xWriteBufferLen;\r
306                 configASSERT( pcWriteBuffer );\r
307 \r
308                 /* Generate a table of task stats. */\r
309                 strcpy( pcWriteBuffer, "Task" );\r
310                 pcWriteBuffer += strlen( pcWriteBuffer );\r
311 \r
312                 /* Pad the string "task" with however many bytes necessary to make it the\r
313                 length of a task name.  Minus three for the null terminator and half the\r
314                 number of characters in "Task" so the column lines up with the centre of\r
315                 the heading. */\r
316                 for( xSpacePadding = strlen( "Task" ); xSpacePadding < ( configMAX_TASK_NAME_LEN - 3 ); xSpacePadding++ )\r
317                 {\r
318                         /* Add a space to align columns after the task's name. */\r
319                         *pcWriteBuffer = ' ';\r
320                         pcWriteBuffer++;\r
321 \r
322                         /* Ensure always terminated. */\r
323                         *pcWriteBuffer = 0x00;\r
324                 }\r
325 \r
326                 strcpy( pcWriteBuffer, pcHeader );\r
327                 vTaskGetRunTimeStats( pcWriteBuffer + strlen( pcHeader ) );\r
328 \r
329                 /* There is no more data to return after this single string, so return\r
330                 pdFALSE. */\r
331                 return pdFALSE;\r
332         }\r
333         \r
334 #endif /* configGENERATE_RUN_TIME_STATS */\r
335 /*-----------------------------------------------------------*/\r
336 \r
337 static BaseType_t prvThreeParameterEchoCommand( char *pcWriteBuffer, size_t xWriteBufferLen, const char *pcCommandString )\r
338 {\r
339 const char *pcParameter;\r
340 BaseType_t xParameterStringLength, xReturn;\r
341 static UBaseType_t uxParameterNumber = 0;\r
342 \r
343         /* Remove compile time warnings about unused parameters, and check the\r
344         write buffer is not NULL.  NOTE - for simplicity, this example assumes the\r
345         write buffer length is adequate, so does not check for buffer overflows. */\r
346         ( void ) pcCommandString;\r
347         ( void ) xWriteBufferLen;\r
348         configASSERT( pcWriteBuffer );\r
349 \r
350         if( uxParameterNumber == 0 )\r
351         {\r
352                 /* The first time the function is called after the command has been\r
353                 entered just a header string is returned. */\r
354                 sprintf( pcWriteBuffer, "The three parameters were:\r\n" );\r
355 \r
356                 /* Next time the function is called the first parameter will be echoed\r
357                 back. */\r
358                 uxParameterNumber = 1U;\r
359 \r
360                 /* There is more data to be returned as no parameters have been echoed\r
361                 back yet. */\r
362                 xReturn = pdPASS;\r
363         }\r
364         else\r
365         {\r
366                 /* Obtain the parameter string. */\r
367                 pcParameter = FreeRTOS_CLIGetParameter\r
368                                                 (\r
369                                                         pcCommandString,                /* The command string itself. */\r
370                                                         uxParameterNumber,              /* Return the next parameter. */\r
371                                                         &xParameterStringLength /* Store the parameter string length. */\r
372                                                 );\r
373 \r
374                 /* Sanity check something was returned. */\r
375                 configASSERT( pcParameter );\r
376 \r
377                 /* Return the parameter string. */\r
378                 memset( pcWriteBuffer, 0x00, xWriteBufferLen );\r
379                 sprintf( pcWriteBuffer, "%d: ", ( int ) uxParameterNumber );\r
380                 strncat( pcWriteBuffer, pcParameter, ( size_t ) xParameterStringLength );\r
381                 strncat( pcWriteBuffer, "\r\n", strlen( "\r\n" ) );\r
382 \r
383                 /* If this is the last of the three parameters then there are no more\r
384                 strings to return after this one. */\r
385                 if( uxParameterNumber == 3U )\r
386                 {\r
387                         /* If this is the last of the three parameters then there are no more\r
388                         strings to return after this one. */\r
389                         xReturn = pdFALSE;\r
390                         uxParameterNumber = 0;\r
391                 }\r
392                 else\r
393                 {\r
394                         /* There are more parameters to return after this one. */\r
395                         xReturn = pdTRUE;\r
396                         uxParameterNumber++;\r
397                 }\r
398         }\r
399 \r
400         return xReturn;\r
401 }\r
402 /*-----------------------------------------------------------*/\r
403 \r
404 static BaseType_t prvParameterEchoCommand( char *pcWriteBuffer, size_t xWriteBufferLen, const char *pcCommandString )\r
405 {\r
406 const char *pcParameter;\r
407 BaseType_t xParameterStringLength, xReturn;\r
408 static UBaseType_t uxParameterNumber = 0;\r
409 \r
410         /* Remove compile time warnings about unused parameters, and check the\r
411         write buffer is not NULL.  NOTE - for simplicity, this example assumes the\r
412         write buffer length is adequate, so does not check for buffer overflows. */\r
413         ( void ) pcCommandString;\r
414         ( void ) xWriteBufferLen;\r
415         configASSERT( pcWriteBuffer );\r
416 \r
417         if( uxParameterNumber == 0 )\r
418         {\r
419                 /* The first time the function is called after the command has been\r
420                 entered just a header string is returned. */\r
421                 sprintf( pcWriteBuffer, "The parameters were:\r\n" );\r
422 \r
423                 /* Next time the function is called the first parameter will be echoed\r
424                 back. */\r
425                 uxParameterNumber = 1U;\r
426 \r
427                 /* There is more data to be returned as no parameters have been echoed\r
428                 back yet. */\r
429                 xReturn = pdPASS;\r
430         }\r
431         else\r
432         {\r
433                 /* Obtain the parameter string. */\r
434                 pcParameter = FreeRTOS_CLIGetParameter\r
435                                                 (\r
436                                                         pcCommandString,                /* The command string itself. */\r
437                                                         uxParameterNumber,              /* Return the next parameter. */\r
438                                                         &xParameterStringLength /* Store the parameter string length. */\r
439                                                 );\r
440 \r
441                 if( pcParameter != NULL )\r
442                 {\r
443                         /* Return the parameter string. */\r
444                         memset( pcWriteBuffer, 0x00, xWriteBufferLen );\r
445                         sprintf( pcWriteBuffer, "%d: ", ( int ) uxParameterNumber );\r
446                         strncat( pcWriteBuffer, ( char * ) pcParameter, ( size_t ) xParameterStringLength );\r
447                         strncat( pcWriteBuffer, "\r\n", strlen( "\r\n" ) );\r
448 \r
449                         /* There might be more parameters to return after this one. */\r
450                         xReturn = pdTRUE;\r
451                         uxParameterNumber++;\r
452                 }\r
453                 else\r
454                 {\r
455                         /* No more parameters were found.  Make sure the write buffer does\r
456                         not contain a valid string. */\r
457                         pcWriteBuffer[ 0 ] = 0x00;\r
458 \r
459                         /* No more data to return. */\r
460                         xReturn = pdFALSE;\r
461 \r
462                         /* Start over the next time this command is executed. */\r
463                         uxParameterNumber = 0;\r
464                 }\r
465         }\r
466 \r
467         return xReturn;\r
468 }\r
469 /*-----------------------------------------------------------*/\r
470 \r
471 #if configINCLUDE_TRACE_RELATED_CLI_COMMANDS == 1\r
472 \r
473         static BaseType_t prvStartStopTraceCommand( char *pcWriteBuffer, size_t xWriteBufferLen, const char *pcCommandString )\r
474         {\r
475         const char *pcParameter;\r
476         BaseType_t lParameterStringLength;\r
477 \r
478                 /* Remove compile time warnings about unused parameters, and check the\r
479                 write buffer is not NULL.  NOTE - for simplicity, this example assumes the\r
480                 write buffer length is adequate, so does not check for buffer overflows. */\r
481                 ( void ) pcCommandString;\r
482                 ( void ) xWriteBufferLen;\r
483                 configASSERT( pcWriteBuffer );\r
484 \r
485                 /* Obtain the parameter string. */\r
486                 pcParameter = FreeRTOS_CLIGetParameter\r
487                                                 (\r
488                                                         pcCommandString,                /* The command string itself. */\r
489                                                         1,                                              /* Return the first parameter. */\r
490                                                         &lParameterStringLength /* Store the parameter string length. */\r
491                                                 );\r
492 \r
493                 /* Sanity check something was returned. */\r
494                 configASSERT( pcParameter );\r
495 \r
496                 /* There are only two valid parameter values. */\r
497                 if( strncmp( pcParameter, "start", strlen( "start" ) ) == 0 )\r
498                 {\r
499                         /* Start or restart the trace. */\r
500                         vTraceStop();\r
501                         vTraceClear();\r
502                         vTraceStart();\r
503 \r
504                         sprintf( pcWriteBuffer, "Trace recording (re)started.\r\n" );\r
505                 }\r
506                 else if( strncmp( pcParameter, "stop", strlen( "stop" ) ) == 0 )\r
507                 {\r
508                         /* End the trace, if one is running. */\r
509                         vTraceStop();\r
510                         sprintf( pcWriteBuffer, "Stopping trace recording.\r\n" );\r
511                 }\r
512                 else\r
513                 {\r
514                         sprintf( pcWriteBuffer, "Valid parameters are 'start' and 'stop'.\r\n" );\r
515                 }\r
516 \r
517                 /* There is no more data to return after this single string, so return\r
518                 pdFALSE. */\r
519                 return pdFALSE;\r
520         }\r
521 \r
522 #endif /* configINCLUDE_TRACE_RELATED_CLI_COMMANDS */\r