source: rtems/cpukit/include/rtems/bspcmdline.h @ 7b09032

5
Last change on this file since 7b09032 was 7b09032, checked in by Andreas Dachsberger <andreas.dachsberger@…>, on 04/03/19 at 06:49:07

doxygen: Split up "libmisc" subgroups and removed libmisc

Update #3706.

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