Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
P
proview
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Esteban Blanc
proview
Commits
c6700a15
Commit
c6700a15
authored
Apr 28, 2004
by
claes
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Defines and macros for severity
parent
e3f7211c
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
37 additions
and
1 deletion
+37
-1
src/lib/rt/src/rt_errh.c
src/lib/rt/src/rt_errh.c
+15
-0
src/lib/rt/src/rt_errh.h
src/lib/rt/src/rt_errh.h
+22
-1
No files found.
src/lib/rt/src/rt_errh.c
View file @
c6700a15
...
...
@@ -1134,6 +1134,21 @@ errh_send (char *s, char severity, pwr_tStatus sts, errh_eMsgType message_type)
#endif
}
errh_eSeverity
errh_Severity
(
pwr_tStatus
sts
)
{
if
(
sts
==
0
)
return
errh_eSeverity_Null
;
switch
(
sts
&
7
)
{
case
1
:
return
errh_eSeverity_Success
;
case
3
:
return
errh_eSeverity_Info
;
case
0
:
return
errh_eSeverity_Warning
;
case
2
:
return
errh_eSeverity_Error
;
case
4
:
return
errh_eSeverity_Fatal
;
default:
return
errh_eSeverity_Null
;
}
}
#if 0
int main(int argc, char **argv)
...
...
src/lib/rt/src/rt_errh.h
View file @
c6700a15
...
...
@@ -42,6 +42,22 @@ extern "C" {
return (((int)(sts)?((*sts)=(lsts)):(EVEN(lsts)?(errh_Bugcheck(lsts, (str)),(lsts)):(lsts))),a)
#endif
#define errh_SeveritySuccess(sts) ((sts) & 7 == 3)
#define errh_SeverityInfo(sts) ((sts) & 7 == 1)
#define errh_SeverityWarning(sts) ((sts) & 7 == 0)
#define errh_SeverityError(sts) ((sts) & 7 == 2)
#define errh_SeverityFatal(sts) ((sts) & 7 == 4)
typedef
enum
{
errh_eSeverity_Null
,
errh_eSeverity_Success
,
errh_eSeverity_Info
,
errh_eSeverity_Warning
,
errh_eSeverity_Error
,
errh_eSeverity_Fatal
}
errh_eSeverity
;
#define errh_cAnix_SrvSize 40
typedef
enum
{
...
...
@@ -133,9 +149,14 @@ void *errh_ErrArgL (int val);
void
errh_CErrLog
(
pwr_tStatus
sts
,
...);
char
*
errh_Message
(
char
*
string
,
char
severity
,
char
*
msg
,
...);
errh_eAnix
errh_Anix
();
errh_eSeverity
errh_Severity
(
pwr_tStatus
);
#if defined __cplusplus
}
#endif
#endif
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment