source: rtems/cpukit/include/rtems/bspcmdline.h @ 0f02e6f

5
Last change on this file since 0f02e6f was feea03b6, checked in by Sebastian Huber <sebastian.huber@…>, on 02/27/19 at 09:53:30

Remove explicit file names from @file

This makes the @file documentation independent of the actual file name.

Update #3707.

  • Property mode set to 100644
File size: 3.7 KB
Line 
1/**
2 * @file
3 *
4 * @defgroup BSPCommandLine BSP Command Line Helpers
5 *
6 * @ingroup libmisc
7 * @brief BSP Command Line Handler
8 *
9 * This include file contains all prototypes and specifications
10 * related to the BSP Command Line String and associated helper
11 * routines. The helpers are useful for locating command line
12 * type arguments (e.g. --mode) and their associated right
13 * hand side (e.g. FAST in --mode=FAST).
14 */
15
16/*
17 *  COPYRIGHT (c) 1989-2009.
18 *  On-Line Applications Research Corporation (OAR).
19 *
20 *  The license and distribution terms for this file may be
21 *  found in the file LICENSE in this distribution or at
22 *  http://www.rtems.org/license/LICENSE.
23 */
24
25#ifndef __BSP_COMMAND_LINE_h
26#define __BSP_COMMAND_LINE_h
27
28/**
29 * @defgroup BSPCommandLine BSP Command Line Helpers
30 *
31 * The BSP Command Line Handler provides a set of routines which assist
32 * in examining and decoding the Command Line String passed to the BSP
33 * at boot time.
34 */
35/**@{*/
36
37#include <stddef.h> /* for size_t */
38
39#ifdef __cplusplus
40extern "C" {
41#endif
42
43
44/**
45 * @brief Obtain Pointer to BSP Boot Command String
46 *
47 * This method returns a pointer to the BSP Boot Command String. It
48 * is as likely to be NULL as point to a string as most BSPs do not
49 * have a start environment that provides a boot string.
50 *
51 * @retval This method returns the pointer to the BSP Boot Command String.
52 */
53const char *rtems_bsp_cmdline_get(void);
54
55/**
56 * @brief Obtain COPY of the Entire Matching Argument
57 *
58 * This method searches for the argument @a name in the BSP Boot Command
59 * String and returns a copy of the entire string associated with it in
60 * @a value up to a string of @a length. This will include the argument
61 * and any right hand side portion of the string. For example, one might
62 * be returned --mode=FAST if
63 * searching for --mode.
64 *
65 * @param[in] name is the arugment to search for
66 * @param[in] value points to where the contents will
67 *            be placed if located.
68 * @param[in] length is the maximum length to copy
69 *
70 * @return This method returns NULL if not found and
71 *         @a value if found.
72 */
73const char *rtems_bsp_cmdline_get_param(
74  const char *name,
75  char       *value,
76  size_t      length
77);
78
79
80/**
81 * @brief Obtain COPY of the Right Hand Side of the Matching Argument
82 *
83 * This method searches for the argument @a name in
84 * the BSP Boot Command String and returns the right hand side
85 * associated with it in @a value up to a maximum string @a length.
86 * This will NOT include the argument but only any right hand side
87 * portion of the string. *  For example, one might be returned FAST if
88 * searching for --mode.
89 *
90 * @param[in] name is the arugment to search for
91 * @param[in] value points to where the contents will
92 *            be placed if located.
93 * @param[in] length is the maximum length to copy
94 *
95 * @retval This method returns NULL if not found and
96 *         @a value if found.
97 */
98const char *rtems_bsp_cmdline_get_param_rhs(
99  const char *name,
100  char       *value,
101  size_t      length
102);
103
104/**
105 * @brief Obtain Pointer to the Entire Matching Argument
106 *
107 * This method searches for the argument @a name in
108 * the BSP Boot Command String and returns a pointer to the
109 * entire string associated with it. This will include the
110 * argument and any right hand side portion of the string.
111 * For example, one might be returned --mode=FAST if
112 * searching for --mode.
113 *
114 * @param[in] name is the arugment to search for
115 *
116 * @retval This method returns NULL if not found and a pointer
117 *         into the BSP Boot Command String if found.
118 *
119 * @note The pointer will be to the original BSP Command
120 *       Line string. Exercise caution when using this.
121 */
122const char *rtems_bsp_cmdline_get_param_raw(
123  const char *name
124);
125
126#ifdef __cplusplus
127}
128#endif
129
130/**@}*/
131#endif
Note: See TracBrowser for help on using the repository browser.