source: rtems/cpukit/include/rtems/bspcmdline.h @ 529d251b

5
Last change on this file since 529d251b was 529d251b, checked in by Andreas Dachsberger <andreas.dachsberger@…>, on Apr 2, 2019 at 10:11:21 AM

doxygen: Added libmisc group and libmisc mouse group

Update #3706.

@ingroup for these groups already existed, but no @defgroup

Further restructuring necessary

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