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
f9b279ee
Commit
f9b279ee
authored
Jan 22, 2013
by
Claes Sjofors
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Programmer's referense manual, sevcli API added
parent
5770ee7d
Changes
4
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
87 additions
and
20 deletions
+87
-20
src/doc/prm/src/doxygen.dx
src/doc/prm/src/doxygen.dx
+7
-0
src/doc/prm/src/os_templ/hw_templ/Doxyfile
src/doc/prm/src/os_templ/hw_templ/Doxyfile
+2
-0
src/lib/rt/src/rt_sevcli.c
src/lib/rt/src/rt_sevcli.c
+45
-1
src/lib/rt/src/rt_sevcli.h
src/lib/rt/src/rt_sevcli.h
+33
-19
No files found.
src/doc/prm/src/doxygen.dx
View file @
f9b279ee
...
...
@@ -23,6 +23,7 @@ This manual will give a description of the following API's
- Time Functions to convert and compare time values.
- Cdh Convert and compare object attributes.
- Errh Print messages on system log.
- Sevcli Storage environment client interface.
- NMps Interface to NMps Cell objects.
- rt_appl A base class for applications i c++.
*/
...
...
@@ -318,6 +319,12 @@ This manual will give a description of the following API's
This module contains functions for logging error messages.
*/
/*! \defgroup SEVCLI Sevcli SEV Client interface
\ingroup PRM
This module contains for the SEV cilent and is used to fetch historical
data from the database.
*/
/*! \defgroup NMpsAppl NMpsAppl NMps API
\ingroup PRM
This module contains interface functions for application access to NMps.
...
...
src/doc/prm/src/os_templ/hw_templ/Doxyfile
View file @
f9b279ee
...
...
@@ -589,6 +589,7 @@ INPUT = $(pwre_sroot)/doc/prm/src/doxygen.dx \
$(pwre_sroot)/lib/rt/src/rt_errh.h \
$(pwre_sroot)/lib/rt/src/rt_mh_appl.h \
$(pwre_sroot)/lib/rt/src/rt_qcom.h \
$(pwre_sroot)/lib/rt/src/rt_sevcli.h \
$(pwre_croot)/nmps/lib/nmps/src/nmps_appl.h \
$(pwre_sroot)/lib/rt/src/rt_appl.h \
$(pwre_sroot)/lib/rt/src/rt_appl.cpp \
...
...
@@ -598,6 +599,7 @@ INPUT = $(pwre_sroot)/doc/prm/src/doxygen.dx \
$(pwre_sroot)/lib/rt/src/rt_errh.c \
$(pwre_sroot)/lib/rt/src/rt_mh_appl.c \
$(pwre_sroot)/lib/rt/src/rt_qcom.c \
$(pwre_sroot)/lib/rt/src/rt_sevcli.c \
$(pwre_croot)/nmps/lib/nmps/src/nmps_appl.c \
$(pwre_sroot)/doc/prm/src/ra_appl.cpp \
$(pwre_sroot)/doc/prm/src/ra_advappl.cpp \
...
...
src/lib/rt/src/rt_sevcli.c
View file @
f9b279ee
...
...
@@ -45,6 +45,13 @@
#include "rt_sev_net.h"
/**
* @brief Initialization of the client. Creates a context and opens a Qcom queue for
* the communication. The function returns a context that is used in all subsequent
* sevcli calls.
*
* @return pwr_tStatus
*/
int
sevcli_init
(
pwr_tStatus
*
sts
,
sevcli_tCtx
*
ctx
)
{
// Create a queue to server
...
...
@@ -64,6 +71,11 @@ int sevcli_init( pwr_tStatus *sts, sevcli_tCtx *ctx)
return
1
;
}
/**
* @brief Close the communication. Removes the Qcom queue and frees the context.
*
* @return pwr_tStatus
*/
int
sevcli_close
(
pwr_tStatus
*
sts
,
sevcli_tCtx
ctx
)
{
// Delete queue
...
...
@@ -75,11 +87,25 @@ int sevcli_close( pwr_tStatus *sts, sevcli_tCtx ctx)
return
1
;
}
/**
* @brief Set server from node id.
* This function is called to state which server node you want to communicate with.
* The server is stated with node identity.
*
* @return pwr_tStatus
*/
void
sevcli_set_servernid
(
sevcli_tCtx
ctx
,
pwr_tNid
nid
)
{
ctx
->
server
=
nid
;
}
/**
* @brief Set server from node name.
* This function is called to state which server node you want to communicate with.
* The server is stated with node name.
*
* @return pwr_tStatus
*/
int
sevcli_set_servernode
(
pwr_tStatus
*
sts
,
sevcli_tCtx
ctx
,
char
*
nodename
)
{
qcom_sNode
node
;
...
...
@@ -114,6 +140,10 @@ int sevcli_set_servernode( pwr_tStatus *sts, sevcli_tCtx ctx, char *nodename)
return
0
;
}
/**
* @brief Fetches a list with the stored attributes of the server.
* @return pwr_tStatus
*/
int
sevcli_get_itemlist
(
pwr_tStatus
*
sts
,
sevcli_tCtx
ctx
,
sevcli_sHistItem
**
list
,
unsigned
int
*
cnt
)
{
...
...
@@ -296,6 +326,11 @@ int sevcli_get_itemlist( pwr_tStatus *sts, sevcli_tCtx ctx, sevcli_sHistItem **l
}
*/
/**
* @brief Fetch stored historical data for an attribute.
*
* @return pwr_tStatus
*/
int
sevcli_get_itemdata
(
pwr_tStatus
*
sts
,
sevcli_tCtx
ctx
,
pwr_tOid
oid
,
char
*
aname
,
pwr_tTime
starttime
,
pwr_tTime
endtime
,
int
numpoints
,
pwr_tTime
**
tbuf
,
void
**
vbuf
,
int
*
rows
,
...
...
@@ -387,6 +422,11 @@ int sevcli_get_itemdata( pwr_tStatus *sts, sevcli_tCtx ctx, pwr_tOid oid,
}
/**
* @brief Fetch stored historical data for an object item.
*
* @return pwr_tStatus
*/
int
sevcli_get_objectitemdata
(
pwr_tStatus
*
sts
,
sevcli_tCtx
ctx
,
pwr_tOid
oid
,
char
*
aname
,
pwr_tTime
starttime
,
pwr_tTime
endtime
,
int
numpoints
,
pwr_tTime
**
tbuf
,
void
**
vbuf
,
int
*
rows
,
...
...
@@ -498,7 +538,11 @@ int sevcli_get_objectitemdata( pwr_tStatus *sts, sevcli_tCtx ctx, pwr_tOid oid,
return
1
;
}
/**
* @brief Removes all data for a stored attribute in the storage database.
*
* @return pwr_tStatus
*/
int
sevcli_delete_item
(
pwr_tStatus
*
sts
,
sevcli_tCtx
ctx
,
pwr_tOid
oid
,
char
*
aname
)
{
sev_sMsgHistItemDelete
*
msg
;
...
...
src/lib/rt/src/rt_sevcli.h
View file @
f9b279ee
...
...
@@ -39,6 +39,9 @@
/* rt_sevcli.h -- Storage client */
/** @addtogroup SEVCLI */
/*@{*/
#ifndef pwr_h
# include "pwr.h"
#endif
...
...
@@ -52,33 +55,42 @@ extern "C"
{
#endif
/**
* Sevcli context
*/
typedef
struct
{
qcom_sQid
qid
;
pwr_tNid
server
;
unsigned
int
msg_id
;
qcom_sQid
qid
;
/**< QCOM queue id */
pwr_tNid
server
;
/**< Server node id */
unsigned
int
msg_id
;
/**< Counter for message id */
}
sevcli_sCtx
,
*
sevcli_tCtx
;
/**
* Sevcli attribute data
*/
typedef
struct
{
pwr_tAName
aname
;
pwr_eType
type
;
unsigned
int
size
;
unsigned
int
elem
;
pwr_tString16
unit
;
pwr_tAName
aname
;
/**< Attribute name */
pwr_eType
type
;
/**< Attribute type */
unsigned
int
size
;
/**< Attribute size */
unsigned
int
elem
;
/**< Number of elements */
pwr_tString16
unit
;
/**< Attribute unit */
}
sevcli_sHistAttr
;
/**
* Sevcli item data
*/
typedef
struct
{
pwr_tOid
oid
;
pwr_tAName
oname
;
pwr_tDeltaTime
storagetime
;
pwr_tTime
creatime
;
pwr_tTime
modtime
;
pwr_tString80
description
;
pwr_tFloat32
scantime
;
pwr_tFloat32
deadband
;
pwr_tMask
options
;
unsigned
int
attrnum
;
sevcli_sHistAttr
attr
[
1
];
pwr_tOid
oid
;
/**< Object identity */
pwr_tAName
oname
;
/**< Object name */
pwr_tDeltaTime
storagetime
;
/**< Storage time from SevHist object */
pwr_tTime
creatime
;
/**< Creation time */
pwr_tTime
modtime
;
/**< Modification time */
pwr_tString80
description
;
/**< Description from SevHist object */
pwr_tFloat32
scantime
;
/**< Scantime from SevHist object */
pwr_tFloat32
deadband
;
/**< Deadband from SevHist object */
pwr_tMask
options
;
/**< Options from SevHist object */
unsigned
int
attrnum
;
/**< Number of attributes */
sevcli_sHistAttr
attr
[
1
];
/**< Array of attribute data */
}
sevcli_sHistItem
;
...
...
@@ -98,6 +110,8 @@ int sevcli_get_objectitemdata( pwr_tStatus *sts, sevcli_tCtx ctx, pwr_tOid oid,
pwr_tTime
**
tbuf
,
void
**
vbuf
,
int
*
rows
,
sevcli_sHistAttr
**
histattr
,
int
*
numattributes
);
/** @} */
#ifdef __cplusplus
}
#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