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
e5422aa3
Commit
e5422aa3
authored
Jul 22, 2011
by
Claes Sjofors
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Programmers reference manual, errh added
parent
500da2e1
Changes
5
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
104 additions
and
14 deletions
+104
-14
src/doc/prm/src/doxygen.dx
src/doc/prm/src/doxygen.dx
+7
-1
src/doc/prm/src/os_templ/hw_templ/Doxyfile
src/doc/prm/src/os_templ/hw_templ/Doxyfile
+2
-0
src/lib/co/src/co_cdh.c
src/lib/co/src/co_cdh.c
+1
-0
src/lib/rt/src/rt_errh.c
src/lib/rt/src/rt_errh.c
+77
-11
src/lib/rt/src/rt_errh.h
src/lib/rt/src/rt_errh.h
+17
-2
No files found.
src/doc/prm/src/doxygen.dx
View file @
e5422aa3
...
@@ -22,6 +22,7 @@ This manual will give a description of the following API's
...
@@ -22,6 +22,7 @@ This manual will give a description of the following API's
- QCom Using the Proview communication protocol.
- QCom Using the Proview communication protocol.
- Time Functions to convert and compare time values.
- Time Functions to convert and compare time values.
- Cdh Convert and compare object attributes.
- Cdh Convert and compare object attributes.
- Errh Print messages on system log.
- NMps Interface to NMps Cell objects.
- NMps Interface to NMps Cell objects.
- rt_appl A base class for applications i c++.
- rt_appl A base class for applications i c++.
*/
*/
...
@@ -307,11 +308,16 @@ This manual will give a description of the following API's
...
@@ -307,11 +308,16 @@ This manual will give a description of the following API's
This module contains utilites for time management.
This module contains utilites for time management.
*/
*/
/*! \defgroup Cdh Class definition handler
/*! \defgroup Cdh C
dh C
lass definition handler
\ingroup PRM
\ingroup PRM
This module contains functions for class definitions.
This module contains functions for class definitions.
*/
*/
/*! \defgroup Errh Errh System log messages
\ingroup PRM
This module contains functions for logging error messages.
*/
/*! \defgroup NMpsAppl NMpsAppl NMps API
/*! \defgroup NMpsAppl NMpsAppl NMps API
\ingroup PRM
\ingroup PRM
This module contains interface functions for application access to NMps.
This module contains interface functions for application access to NMps.
...
...
src/doc/prm/src/os_templ/hw_templ/Doxyfile
View file @
e5422aa3
...
@@ -539,6 +539,7 @@ INPUT = $(pwre_sroot)/doc/prm/src/doxygen.dx \
...
@@ -539,6 +539,7 @@ INPUT = $(pwre_sroot)/doc/prm/src/doxygen.dx \
$(pwre_sroot)/lib/co/src/co_time.h \
$(pwre_sroot)/lib/co/src/co_time.h \
$(pwre_sroot)/lib/co/src/co_cdh.h \
$(pwre_sroot)/lib/co/src/co_cdh.h \
$(pwre_sroot)/lib/rt/src/rt_gdh.h \
$(pwre_sroot)/lib/rt/src/rt_gdh.h \
$(pwre_sroot)/lib/rt/src/rt_errh.h \
$(pwre_sroot)/lib/rt/src/rt_mh_appl.h \
$(pwre_sroot)/lib/rt/src/rt_mh_appl.h \
$(pwre_sroot)/lib/rt/src/rt_qcom.h \
$(pwre_sroot)/lib/rt/src/rt_qcom.h \
$(pwre_croot)/nmps/lib/nmps/src/nmps_appl.h \
$(pwre_croot)/nmps/lib/nmps/src/nmps_appl.h \
...
@@ -547,6 +548,7 @@ INPUT = $(pwre_sroot)/doc/prm/src/doxygen.dx \
...
@@ -547,6 +548,7 @@ INPUT = $(pwre_sroot)/doc/prm/src/doxygen.dx \
$(pwre_sroot)/lib/co/src/co_time.c \
$(pwre_sroot)/lib/co/src/co_time.c \
$(pwre_sroot)/lib/co/src/co_cdh.c \
$(pwre_sroot)/lib/co/src/co_cdh.c \
$(pwre_sroot)/lib/rt/src/rt_gdh.c \
$(pwre_sroot)/lib/rt/src/rt_gdh.c \
$(pwre_sroot)/lib/rt/src/rt_errh.c \
$(pwre_sroot)/lib/rt/src/rt_mh_appl.c \
$(pwre_sroot)/lib/rt/src/rt_mh_appl.c \
$(pwre_sroot)/lib/rt/src/rt_qcom.c \
$(pwre_sroot)/lib/rt/src/rt_qcom.c \
$(pwre_croot)/nmps/lib/nmps/src/nmps_appl.c \
$(pwre_croot)/nmps/lib/nmps/src/nmps_appl.c \
...
...
src/lib/co/src/co_cdh.c
View file @
e5422aa3
...
@@ -2948,6 +2948,7 @@ cdh_NextObjectName (
...
@@ -2948,6 +2948,7 @@ cdh_NextObjectName (
\param outname Out string.
\param outname Out string.
\param name In string.
\param name In string.
\param segments Number of segments to return.
*/
*/
void
cdh_CutNameSegments
(
void
cdh_CutNameSegments
(
char
*
outname
,
char
*
outname
,
...
...
src/lib/rt/src/rt_errh.c
View file @
e5422aa3
...
@@ -183,8 +183,17 @@ errh_Interactive ()
...
@@ -183,8 +183,17 @@ errh_Interactive ()
interactive
=
1
;
interactive
=
1
;
}
}
/* Set up a queue to write to, set module name. */
/**
* @brief Initialize errh.
* Set up a queue to write to, set application name.
*
* \param name Name of application. This name is written in the logging entry
* to identify the process.
* \param anix Application index. Applications should choose a index in the range
* errh_eAnix_appl1 - errh_eAnix_appl20.
* \return Status or operation.
*/
pwr_tStatus
pwr_tStatus
errh_Init
(
errh_Init
(
const
char
*
name
,
const
char
*
name
,
...
@@ -204,6 +213,13 @@ errh_Init (
...
@@ -204,6 +213,13 @@ errh_Init (
return
1
;
return
1
;
}
}
/**
* @brief Set application status.
* The application status is showed in the Node graph. The application can set this status
* with a call to errh_SetStatus. The status should be defined in the message file.
*
* \param sts New application status.
*/
void
void
errh_SetStatus
(
pwr_tStatus
sts
)
errh_SetStatus
(
pwr_tStatus
sts
)
{
{
...
@@ -211,6 +227,10 @@ errh_SetStatus( pwr_tStatus sts)
...
@@ -211,6 +227,10 @@ errh_SetStatus( pwr_tStatus sts)
errh_send
(
0
,
0
,
sts
,
errh_eMsgType_Status
);
errh_send
(
0
,
0
,
sts
,
errh_eMsgType_Status
);
}
}
/**
* @brief Get application index for the process.
* \return Application index.
*/
errh_eAnix
errh_eAnix
errh_Anix
()
errh_Anix
()
{
{
...
@@ -270,8 +290,18 @@ errh_Log (
...
@@ -270,8 +290,18 @@ errh_Log (
return
buff
;
return
buff
;
}
}
/* Log a success message. */
/**
* @brief Log a success message.
* The function has a variable argument list similar to sprintf.
*
* \param msg String with message to log. The string can contain format specifiers.
*
* Example
*
* errh_Success("Process initialized");
*/
void
void
errh_Success
(
errh_Success
(
const
char
*
msg
,
const
char
*
msg
,
...
@@ -284,8 +314,17 @@ errh_Success (
...
@@ -284,8 +314,17 @@ errh_Success (
log_message
(
NULL
,
'S'
,
msg
,
args
);
log_message
(
NULL
,
'S'
,
msg
,
args
);
va_end
(
args
);
va_end
(
args
);
}
}
/* Log an info message */
/**
* @brief Log an info message.
* The function has a variable argument list similar to sprintf.
*
* \param msg String with message to log. The string can contain format specifiers.
*
* Example
*
* errh_Info("Reset count %d", cnt);
*/
void
void
errh_Info
(
const
char
*
msg
,
...)
errh_Info
(
const
char
*
msg
,
...)
...
@@ -296,8 +335,17 @@ errh_Info (const char *msg, ...)
...
@@ -296,8 +335,17 @@ errh_Info (const char *msg, ...)
log_message
(
NULL
,
'I'
,
msg
,
args
);
log_message
(
NULL
,
'I'
,
msg
,
args
);
va_end
(
args
);
va_end
(
args
);
}
}
/* Log a warning message */
/**
* @brief Log a warning message.
* The function has a variable argument list similar to sprintf.
*
* \param msg String with message to log. The string can contain format specifiers.
*
* Example
*
* errh_Warning("Connection lost to %s", name);
*/
void
void
errh_Warning
(
const
char
*
msg
,
...)
errh_Warning
(
const
char
*
msg
,
...)
...
@@ -308,8 +356,17 @@ errh_Warning(const char *msg, ...)
...
@@ -308,8 +356,17 @@ errh_Warning(const char *msg, ...)
log_message
(
NULL
,
'W'
,
msg
,
args
);
log_message
(
NULL
,
'W'
,
msg
,
args
);
va_end
(
args
);
va_end
(
args
);
}
}
/* Log an error message */
/**
* @brief Log an error message.
* The function has a variable argument list similar to sprintf.
*
* \param msg String with message to log. The string can contain format specifiers.
*
* Example
*
* errh_Error("Configuration error");
*/
void
void
errh_Error
(
const
char
*
msg
,
...)
errh_Error
(
const
char
*
msg
,
...)
...
@@ -320,8 +377,17 @@ errh_Error(const char *msg, ...)
...
@@ -320,8 +377,17 @@ errh_Error(const char *msg, ...)
log_message
(
NULL
,
'E'
,
msg
,
args
);
log_message
(
NULL
,
'E'
,
msg
,
args
);
va_end
(
args
);
va_end
(
args
);
}
}
/* Log a fatal message */
/**
* @brief Log a fatal message.
* The function has a variable argument list similar to sprintf.
*
* \param msg String with message to log. The string can contain format specifiers.
*
* Example
*
* errh_Fatal("Process terminated, %m", sts);
*/
void
void
errh_Fatal
(
const
char
*
msg
,
...)
errh_Fatal
(
const
char
*
msg
,
...)
...
...
src/lib/rt/src/rt_errh.h
View file @
e5422aa3
...
@@ -53,6 +53,9 @@
...
@@ -53,6 +53,9 @@
extern
"C"
{
extern
"C"
{
#endif
#endif
/** @addtogroup Errh */
/*@{*/
#ifndef errh_Bugcheck
#ifndef errh_Bugcheck
# if defined OS_ELN || defined OS_VMS
# if defined OS_ELN || defined OS_VMS
# define errh_Bugcheck(sts, str) \
# define errh_Bugcheck(sts, str) \
...
@@ -76,6 +79,9 @@ extern "C" {
...
@@ -76,6 +79,9 @@ extern "C" {
#define errh_SeverityError(sts) (((sts) & 7) == 2)
#define errh_SeverityError(sts) (((sts) & 7) == 2)
#define errh_SeverityFatal(sts) (((sts) & 7) == 4)
#define errh_SeverityFatal(sts) (((sts) & 7) == 4)
/**
* Severity enumeration
*/
typedef
enum
{
typedef
enum
{
errh_eSeverity_Null
,
errh_eSeverity_Null
,
errh_eSeverity_Success
,
errh_eSeverity_Success
,
...
@@ -88,6 +94,9 @@ typedef enum {
...
@@ -88,6 +94,9 @@ typedef enum {
#define errh_cAnix_SrvSize 40
#define errh_cAnix_SrvSize 40
/**
* Application index
*/
typedef
enum
{
typedef
enum
{
errh_eNAnix
=
0
,
errh_eNAnix
=
0
,
errh_eAnix_ini
=
1
,
errh_eAnix_ini
=
1
,
...
@@ -132,9 +141,12 @@ typedef enum {
...
@@ -132,9 +141,12 @@ typedef enum {
errh_eAnix_appl20
=
40
errh_eAnix_appl20
=
40
}
errh_eAnix
;
}
errh_eAnix
;
/**
* Message type
*/
typedef
enum
{
typedef
enum
{
errh_eMsgType_Log
=
1
,
errh_eMsgType_Log
=
1
,
/**< Write to console log */
errh_eMsgType_Status
=
2
errh_eMsgType_Status
=
2
/**< Set application status */
}
errh_eMsgType
;
}
errh_eMsgType
;
...
@@ -178,6 +190,9 @@ void errh_CErrLog (pwr_tStatus sts, ...);
...
@@ -178,6 +190,9 @@ void errh_CErrLog (pwr_tStatus sts, ...);
char
*
errh_Message
(
char
*
string
,
char
severity
,
char
*
msg
,
...);
char
*
errh_Message
(
char
*
string
,
char
severity
,
char
*
msg
,
...);
errh_eAnix
errh_Anix
();
errh_eAnix
errh_Anix
();
errh_eSeverity
errh_Severity
(
pwr_tStatus
);
errh_eSeverity
errh_Severity
(
pwr_tStatus
);
/** @} */
#if defined __cplusplus
#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