source: rtems-tools/rtemstoolkit/rld-rtems.h @ 3618a62

5
Last change on this file since 3618a62 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
RevLine 
[7ccb6701]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    /**
[b28e8b3]35     * Set the RTEMS version.
[7ccb6701]36     */
[b28e8b3]37    void set_version (const std::string& version);
[7ccb6701]38
39    /**
[b28e8b3]40     * Set the arch/bsp string.
[7ccb6701]41     */
[b28e8b3]42    void set_arch_bsp (const std::string& arch_bsp);
[7ccb6701]43
44    /**
[b28e8b3]45     * Set the path to RTEMS.
[7ccb6701]46     */
[b28e8b3]47    void set_path (const std::string& path);
[7ccb6701]48
49    /**
[b28e8b3]50     * Get the RTEMS version.
[7ccb6701]51     */
[b28e8b3]52    const std::string version ();
53
[0c0b2d4]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
[b28e8b3]69    /**
70     * Return the arch/bsp string.
71     */
72    const std::string arch_bsp ();
[7ccb6701]73
74    /**
75     * Return the architecture given an arch/bsp string.
76     */
[b28e8b3]77    const std::string arch ();
[7ccb6701]78
79    /**
80     * Return the bsp given an arch/bsp string.
81     */
[b28e8b3]82    const std::string bsp ();
[7ccb6701]83
84    /**
[b28e8b3]85     * Get the RTEMS path.
[7ccb6701]86     */
[b28e8b3]87    const std::string path ();
[7ccb6701]88
89    /**
[b28e8b3]90     * Return the RTEMS BSP prefix.
[7ccb6701]91     */
[b28e8b3]92    const std::string rtems_arch_prefix ();
[7ccb6701]93
94    /**
[b28e8b3]95     * Return the arch/bsp as an RTEMS prefix and BSP string.
[7ccb6701]96     */
[b28e8b3]97    const std::string rtems_arch_bsp ();
[7ccb6701]98  }
99}
100
101#endif
Note: See TracBrowser for help on using the repository browser.