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
4b91e069
Commit
4b91e069
authored
Sep 18, 2008
by
claes
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
HighTimeRes replaced by Options
parent
fb346057
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
40 additions
and
16 deletions
+40
-16
src/exe/rt_sevhistmon/src/rt_sevhistmon.cpp
src/exe/rt_sevhistmon/src/rt_sevhistmon.cpp
+31
-8
src/exe/rt_sevhistmon/src/rt_sevhistmon.h
src/exe/rt_sevhistmon/src/rt_sevhistmon.h
+3
-2
src/lib/rt/src/rt_sev_net.h
src/lib/rt/src/rt_sev_net.h
+2
-2
src/lib/rt/src/rt_sevcli.c
src/lib/rt/src/rt_sevcli.c
+2
-2
src/lib/rt/src/rt_sevcli.h
src/lib/rt/src/rt_sevcli.h
+2
-2
No files found.
src/exe/rt_sevhistmon/src/rt_sevhistmon.cpp
View file @
4b91e069
/*
* Proview $Id: rt_sevhistmon.cpp,v 1.
2 2008-09-09 11:24:42
claes Exp $
* Proview $Id: rt_sevhistmon.cpp,v 1.
3 2008-09-18 15:06:13
claes Exp $
* Copyright (C) 2005 SSAB Oxelsund AB.
*
* This program is free software; you can redistribute it and/or
...
...
@@ -30,6 +30,7 @@
#include "rt_sevhistmon.h"
#include "rt_sev_net.h"
#include "rt_sev_msg.h"
#include "rt_pwr_msg.h"
#define sevclient_cQix 121
...
...
@@ -45,8 +46,24 @@ int rt_sevhistmon::init()
qcom_sQid
qid
;
qcom_sNode
node
;
pwr_tNid
nid
;
pwr_tOid
conf_oid
;
pwr_sClass_SevHistMonitor
*
conf_p
;
sts
=
gdh_Init
(
"rt_sevhistmon"
);
if
(
EVEN
(
sts
))
throw
co_error
(
sts
);
// Get the config object
sts
=
gdh_GetClassList
(
pwr_cClass_SevHistMonitor
,
&
conf_oid
);
if
(
EVEN
(
sts
))
{
errh_CErrLog
(
PWR__SRVNOTCONF
,
0
);
exit
(
0
);
}
sts
=
gdh_ObjidToPointer
(
conf_oid
,
(
void
**
)
&
conf_p
);
if
(
EVEN
(
sts
))
throw
co_error
(
sts
);
m_scantime
=
conf_p
->
ScanTime
;
if
(
m_scantime
<
0.02
)
m_scantime
=
0.02
;
// Create a queue to server
qcom_sQattr
attr
;
...
...
@@ -60,9 +77,9 @@ int rt_sevhistmon::init()
if
(
sts
==
QCOM__QALLREXIST
)
{
if
(
!
qcom_AttachQ
(
&
sts
,
&
qid
))
{
if
(
!
qcom_DeleteQ
(
&
sts
,
&
qid
))
co_error
(
sts
);
throw
co_error
(
sts
);
if
(
!
qcom_CreateQ
(
&
sts
,
&
qid
,
&
attr
,
"SevClient"
))
co_error
(
sts
);
throw
co_error
(
sts
);
}
}
else
...
...
@@ -159,7 +176,7 @@ int rt_sevhistmon::init()
h
.
sevid
.
rix
=
m_next_rix
++
;
h
.
storagetime
=
h_p
->
StorageTime
;
h
.
deadband
=
h_p
->
DeadBand
;
h
.
hightimeres
=
h_p
->
HighTimeResolution
;
h
.
options
=
h_p
->
Options
;
strncpy
(
h
.
description
,
h_p
->
Description
,
sizeof
(
h
.
description
));
// Get unit from attribute object
...
...
@@ -233,7 +250,7 @@ int rt_sevhistmon::send_data()
int
stime
;
for
(
unsigned
int
i
=
0
;
i
<
m_hs
.
size
();
i
++
)
{
stime
=
int
(
m_hs
[
i
].
scantime
+
0.5
);
stime
=
int
(
m_hs
[
i
].
scantime
/
m_scantime
+
0.5
);
if
(
!
stime
||
m_loopcnt
%
stime
!=
0
)
continue
;
...
...
@@ -357,7 +374,7 @@ int rt_sevhistmon::send_itemlist( pwr_tNid nid)
strcpy
(
((
sev_sMsgHistItems
*
)
put
.
data
)
->
Items
[
k
].
attr
[
0
].
aname
,
s
+
1
);
((
sev_sMsgHistItems
*
)
put
.
data
)
->
Items
[
k
].
storagetime
=
m_hs
[
i
].
sevhistlist
[
j
].
storagetime
;
((
sev_sMsgHistItems
*
)
put
.
data
)
->
Items
[
k
].
deadband
=
m_hs
[
i
].
sevhistlist
[
j
].
deadband
;
((
sev_sMsgHistItems
*
)
put
.
data
)
->
Items
[
k
].
hightimeres
=
m_hs
[
i
].
sevhistlist
[
j
].
hightimere
s
;
((
sev_sMsgHistItems
*
)
put
.
data
)
->
Items
[
k
].
options
=
m_hs
[
i
].
sevhistlist
[
j
].
option
s
;
((
sev_sMsgHistItems
*
)
put
.
data
)
->
Items
[
k
].
attr
[
0
].
type
=
m_hs
[
i
].
sevhistlist
[
j
].
type
;
((
sev_sMsgHistItems
*
)
put
.
data
)
->
Items
[
k
].
attr
[
0
].
size
=
m_hs
[
i
].
sevhistlist
[
j
].
size
;
((
sev_sMsgHistItems
*
)
put
.
data
)
->
Items
[
k
].
sevid
=
m_hs
[
i
].
sevhistlist
[
j
].
sevid
;
...
...
@@ -393,7 +410,7 @@ int rt_sevhistmon::send_itemlist( pwr_tNid nid)
int
rt_sevhistmon
::
mainloop
()
{
qcom_sQid
qid
;
int
tmo
=
1000
;
int
tmo
=
int
(
1000
*
m_scantime
)
;
qcom_sGet
get
;
void
*
mp
;
pwr_tStatus
sts
;
...
...
@@ -432,7 +449,13 @@ int main()
{
rt_sevhistmon
client
;
client
.
init
();
try
{
client
.
init
();
}
catch
(
co_error
e
)
{
errh_Error
(
"SevHistMonitor terminating, %m"
,
e
.
sts
());
exit
(
0
);
}
client
.
mainloop
();
...
...
src/exe/rt_sevhistmon/src/rt_sevhistmon.h
View file @
4b91e069
/*
* Proview $Id: rt_sevhistmon.h,v 1.
2 2008-09-09 11:24:42
claes Exp $
* Proview $Id: rt_sevhistmon.h,v 1.
3 2008-09-18 15:06:13
claes Exp $
* Copyright (C) 2005 SSAB Oxelsund AB.
*
* This program is free software; you can redistribute it and/or
...
...
@@ -33,7 +33,7 @@ class sev_sevhist {
void
*
datap
;
pwr_tDeltaTime
storagetime
;
pwr_tFloat32
deadband
;
pwr_t
Boolean
hightimere
s
;
pwr_t
Mask
option
s
;
pwr_eType
type
;
unsigned
int
size
;
pwr_tRefId
sevid
;
...
...
@@ -69,6 +69,7 @@ class rt_sevhistmon {
unsigned
int
m_msg_id
;
unsigned
int
m_next_rix
;
unsigned
int
m_loopcnt
;
float
m_scantime
;
int
init
();
int
close
();
...
...
src/lib/rt/src/rt_sev_net.h
View file @
4b91e069
/*
* Proview $Id: rt_sev_net.h,v 1.
3 2008-09-09 11:27:32
claes Exp $
* Proview $Id: rt_sev_net.h,v 1.
4 2008-09-18 15:06:13
claes Exp $
* Copyright (C) 2005 SSAB Oxelsund AB.
*
* This program is free software; you can redistribute it and/or
...
...
@@ -60,7 +60,7 @@ typedef struct {
pwr_tString80
description
;
pwr_tFloat32
scantime
;
pwr_tFloat32
deadband
;
pwr_t
Boolean
hightimere
s
;
pwr_t
Mask
option
s
;
unsigned
int
attrnum
;
sev_sHistAttr
attr
[
1
];
}
sev_sHistItem
;
...
...
src/lib/rt/src/rt_sevcli.c
View file @
4b91e069
/*
* Proview $Id: rt_sevcli.c,v 1.
3 2008-09-09 11:27:32
claes Exp $
* Proview $Id: rt_sevcli.c,v 1.
4 2008-09-18 15:06:13
claes Exp $
* Copyright (C) 2005 SSAB Oxelsund AB.
*
* This program is free software; you can redistribute it and/or
...
...
@@ -161,7 +161,7 @@ int sevcli_get_itemlist( pwr_tStatus *sts, sevcli_tCtx ctx, sevcli_sHistItem **l
strncpy
(
lp
[
i
].
oname
,
rmsg
->
Items
[
i
].
oname
,
sizeof
(
lp
[
0
].
oname
));
lp
[
i
].
storagetime
=
rmsg
->
Items
[
i
].
storagetime
;
lp
[
i
].
deadband
=
rmsg
->
Items
[
i
].
deadband
;
lp
[
i
].
hightimeres
=
rmsg
->
Items
[
i
].
hightimere
s
;
lp
[
i
].
options
=
rmsg
->
Items
[
i
].
option
s
;
lp
[
i
].
creatime
=
rmsg
->
Items
[
i
].
creatime
;
lp
[
i
].
modtime
=
rmsg
->
Items
[
i
].
modtime
;
strncpy
(
lp
[
i
].
description
,
rmsg
->
Items
[
i
].
description
,
sizeof
(
lp
[
0
].
description
));
...
...
src/lib/rt/src/rt_sevcli.h
View file @
4b91e069
/*
* Proview $Id: rt_sevcli.h,v 1.
3 2008-09-09 11:27:32
claes Exp $
* Proview $Id: rt_sevcli.h,v 1.
4 2008-09-18 15:06:13
claes Exp $
* Copyright (C) 2005 SSAB Oxelsund AB.
*
* This program is free software; you can redistribute it and/or
...
...
@@ -59,7 +59,7 @@ typedef struct {
pwr_tString80
description
;
pwr_tFloat32
scantime
;
pwr_tFloat32
deadband
;
pwr_t
Boolean
hightimere
s
;
pwr_t
Mask
option
s
;
unsigned
int
attrnum
;
sevcli_sHistAttr
attr
[
1
];
}
sevcli_sHistItem
;
...
...
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