4.115
Last change
on this file since c499856 was
c499856,
checked in by Chris Johns <chrisj@…>, on 03/20/14 at 21:10:47
|
Change all references of rtems.com to rtems.org.
|
-
Property mode set to
100644
|
File size:
1.4 KB
|
Rev | Line | |
---|
[0074691a] | 1 | /* |
---|
| 2 | ------------------------------------------------------------------------ |
---|
| 3 | |
---|
| 4 | COPYRIGHT (c) 1997 |
---|
| 5 | Objective Design Systems Ltd Pty (ODS) |
---|
| 6 | All rights reserved (R) Objective Design Systems Ltd Pty |
---|
[1b4f2b30] | 7 | |
---|
[0074691a] | 8 | The license and distribution terms for this file may be found in the |
---|
| 9 | file LICENSE in this distribution or at |
---|
[c499856] | 10 | http://www.rtems.org/license/LICENSE. |
---|
[0074691a] | 11 | |
---|
| 12 | ------------------------------------------------------------------------ |
---|
| 13 | |
---|
| 14 | rtemsStatusCode controls and manages status codes from the RTEMS kernel. |
---|
[1b4f2b30] | 15 | |
---|
[0074691a] | 16 | ------------------------------------------------------------------------ |
---|
| 17 | */ |
---|
| 18 | |
---|
| 19 | #if !defined(_rtemsStatusCode_h_) |
---|
| 20 | #define _rtemsStatusCode_h_ |
---|
| 21 | |
---|
| 22 | #include <rtems.h> |
---|
| 23 | |
---|
| 24 | /* ---- |
---|
| 25 | rtemsStatusCode |
---|
| 26 | */ |
---|
| 27 | |
---|
| 28 | class rtemsStatusCode |
---|
| 29 | { |
---|
| 30 | public: |
---|
[1b4f2b30] | 31 | |
---|
[0074691a] | 32 | rtemsStatusCode() { last_status = RTEMS_NOT_CONFIGURED; } |
---|
[1b4f2b30] | 33 | |
---|
[0074691a] | 34 | const bool successful() { return last_status == RTEMS_SUCCESSFUL; } |
---|
| 35 | const bool unsuccessful() { return last_status != RTEMS_SUCCESSFUL; } |
---|
[1b4f2b30] | 36 | |
---|
[0074691a] | 37 | // return the last status code |
---|
| 38 | const rtems_status_code last_status_code() { return last_status; } |
---|
[1b4f2b30] | 39 | |
---|
[0074691a] | 40 | // return the last status as a string |
---|
| 41 | const char *last_status_string(); |
---|
| 42 | |
---|
| 43 | const char *status_string(rtems_status_code status_code); |
---|
| 44 | |
---|
| 45 | protected: |
---|
| 46 | const rtems_status_code set_status_code(const rtems_status_code status) |
---|
| 47 | { return (last_status = status); } |
---|
[1b4f2b30] | 48 | |
---|
[0074691a] | 49 | private: |
---|
[1b4f2b30] | 50 | |
---|
[0074691a] | 51 | // public at the moment, this might change |
---|
| 52 | rtems_status_code last_status; |
---|
| 53 | }; |
---|
| 54 | |
---|
| 55 | #endif // _rtemsStatusCode_h_ |
---|
Note: See
TracBrowser
for help on using the repository browser.