source: rtems-tools/rtemstoolkit/rld-rtems.h @ 0c0b2d4

4.105
Last change on this file since 0c0b2d4 was 0c0b2d4, checked in by Chris Johns <chrisj@…>, on 04/03/16 at 05:37:01

rtemstoolkit: Add version number parsing to get major, minor, revision.

Add support to return the major, minor or revision numbers as numbers.

  • Property mode set to 100644
File size: 2.2 KB
Line 
1/*
2 * Copyright (c) 2011-2014, Chris Johns <chrisj@rtems.org>
3 *
4 * Permission to use, copy, modify, and/or distribute this software for any
5 * purpose with or without fee is hereby granted, provided that the above
6 * copyright notice and this permission notice appear in all copies.
7 *
8 * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
9 * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
10 * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
11 * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
12 * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
13 * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
14 * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
15 */
16/**
17 * @file
18 *
19 * @ingroup rtems-ld
20 *
21 * @brief Support to manage RTEMS.
22 *
23 */
24
25#if !defined (_RLD_RTEMS_H_)
26#define _RLD_RTEMS_H_
27
28#include <string>
29
30namespace rld
31{
32  namespace rtems
33  {
34    /**
35     * Set the RTEMS version.
36     */
37    void set_version (const std::string& version);
38
39    /**
40     * Set the arch/bsp string.
41     */
42    void set_arch_bsp (const std::string& arch_bsp);
43
44    /**
45     * Set the path to RTEMS.
46     */
47    void set_path (const std::string& path);
48
49    /**
50     * Get the RTEMS version.
51     */
52    const std::string version ();
53
54    /**
55     * Get the RTEMS major version number.
56     */
57    uint64_t version_major ();
58
59    /**
60     * Get the RTEMS minor version number.
61     */
62    uint64_t version_minor ();
63
64    /**
65     * Get the RTEMS revision version number.
66     */
67    uint64_t version_revision ();
68
69    /**
70     * Return the arch/bsp string.
71     */
72    const std::string arch_bsp ();
73
74    /**
75     * Return the architecture given an arch/bsp string.
76     */
77    const std::string arch ();
78
79    /**
80     * Return the bsp given an arch/bsp string.
81     */
82    const std::string bsp ();
83
84    /**
85     * Get the RTEMS path.
86     */
87    const std::string path ();
88
89    /**
90     * Return the RTEMS BSP prefix.
91     */
92    const std::string rtems_arch_prefix ();
93
94    /**
95     * Return the arch/bsp as an RTEMS prefix and BSP string.
96     */
97    const std::string rtems_arch_bsp ();
98  }
99}
100
101#endif
Note: See TracBrowser for help on using the repository browser.