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
78b734f0
Commit
78b734f0
authored
Dec 21, 2009
by
Jonas Nylund
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Minor changes to sev
parent
7701b57a
Changes
4
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
20 additions
and
10 deletions
+20
-10
sev/exe/sev_server/src/sev_server.cpp
sev/exe/sev_server/src/sev_server.cpp
+5
-5
sev/exe/sev_xtt/src/xtt_tblnav.cpp
sev/exe/sev_xtt/src/xtt_tblnav.cpp
+0
-1
src/lib/rt/src/rt_sevcli.c
src/lib/rt/src/rt_sevcli.c
+7
-4
xtt/lib/xtt/src/xtt_sevhist.cpp
xtt/lib/xtt/src/xtt_sevhist.cpp
+8
-0
No files found.
sev/exe/sev_server/src/sev_server.cpp
View file @
78b734f0
...
...
@@ -711,7 +711,7 @@ int sev_server::send_histdata( qcom_sQid tgt, sev_sMsgHistDataGetRequest *rmsg,
{
pwr_tTime
*
tbuf
;
void
*
vbuf
;
unsigned
int
rows
;
unsigned
int
rows
=
0
;
sev_sMsgHistDataGet
*
msg
;
int
msize
;
qcom_sPut
put
;
...
...
@@ -731,7 +731,7 @@ int sev_server::send_histdata( qcom_sQid tgt, sev_sMsgHistDataGetRequest *rmsg,
item
.
scantime
,
&
item
.
creatime
,
&
starttime
,
&
endtime
,
rmsg
->
NumPoints
,
&
tbuf
,
&
vbuf
,
&
rows
);
}
if
(
ODD
(
m_sts
))
if
(
ODD
(
m_sts
)
&&
rows
!=
0
)
msize
=
rows
*
(
sizeof
(
pwr_tTime
)
+
item
.
attr
[
0
].
size
)
+
sizeof
(
*
msg
)
-
sizeof
(
msg
->
Data
);
else
msize
=
sizeof
(
*
msg
);
...
...
@@ -771,7 +771,7 @@ int sev_server::send_objecthistdata( qcom_sQid tgt, sev_sMsgHistDataGetRequest *
{
pwr_tTime
*
tbuf
;
void
*
vbuf
;
unsigned
int
rows
;
unsigned
int
rows
=
0
;
sev_sMsgHistObjectDataGet
*
msg
;
int
msize
;
qcom_sPut
put
;
...
...
@@ -788,7 +788,7 @@ int sev_server::send_objecthistdata( qcom_sQid tgt, sev_sMsgHistDataGetRequest *
if
(
ODD
(
m_sts
))
{
m_db
->
get_objectvalues
(
&
m_sts
,
&
item
,
item
.
value_size
,
&
starttime
,
&
endtime
,
rmsg
->
NumPoints
,
&
tbuf
,
&
vbuf
,
&
rows
);
}
if
(
ODD
(
m_sts
))
{
if
(
ODD
(
m_sts
)
&&
rows
!=
0
)
{
msize
=
rows
*
(
sizeof
(
pwr_tTime
)
+
item
.
value_size
);
msize
+=
item
.
attr
.
size
()
*
sizeof
(
msg
->
Attr
);
msize
+=
sizeof
(
*
msg
)
-
sizeof
(
msg
->
Data
)
-
sizeof
(
msg
->
Attr
);
...
...
@@ -812,7 +812,7 @@ int sev_server::send_objecthistdata( qcom_sQid tgt, sev_sMsgHistDataGetRequest *
msg
->
Status
=
m_sts
;
msg
->
NumPoints
=
0
;
msg
->
NumAttributes
=
0
;
if
(
ODD
(
m_sts
))
{
if
(
ODD
(
m_sts
)
&&
rows
!=
0
)
{
msg
->
NumPoints
=
rows
;
msg
->
NumAttributes
=
item
.
attr
.
size
();
msg
->
TotalDataSize
=
rows
*
(
sizeof
(
pwr_tTime
)
+
item
.
value_size
);
...
...
sev/exe/sev_xtt/src/xtt_tblnav.cpp
View file @
78b734f0
...
...
@@ -634,7 +634,6 @@ ItemLocal::ItemLocal( TblNav *tblnav, TblNav_sevhistobject *xitem,
strcat
(
aname
,
"."
);
strcat
(
aname
,
item
.
objectattrlist
[
0
].
aname
);
}
printf
(
"aname %s
\n
"
,
aname
);
brow_SetAnnotation
(
node
,
0
,
aname
,
strlen
(
aname
));
brow_SetAnnotation
(
node
,
1
,
item
.
description
,
strlen
(
item
.
description
));
}
...
...
src/lib/rt/src/rt_sevcli.c
View file @
78b734f0
...
...
@@ -157,13 +157,11 @@ int sevcli_get_itemlist( pwr_tStatus *sts, sevcli_tCtx ctx, sevcli_sHistItem **l
int
attr_cnt
=
rmsg
->
NumAttributes
;
unsigned
int
data_size
=
(
item_cnt
*
sizeof
(
sevcli_sHistItem
))
+
((
attr_cnt
-
item_cnt
)
*
sizeof
(
sevcli_sHistAttr
));
printf
(
"Get size: %d, data size: %d
\n
"
,
get
.
size
,
data_size
);
lp
=
(
sevcli_sHistItem
*
)
malloc
(
data_size
);
sevcli_sHistItem
*
lp2
=
lp
;
sev_sHistItem
*
itemPtr
=
((
sev_sMsgHistItems
*
)
rmsg
)
->
Items
;
for
(
i
=
0
;
i
<
item_cnt
;
i
++
)
{
printf
(
"i : %d
\n
"
,
i
);
lp
->
oid
=
itemPtr
->
oid
;
strncpy
(
lp
->
oname
,
itemPtr
->
oname
,
sizeof
(
lp
->
oname
));
lp
->
storagetime
=
net_NetTimeToDeltaTime
(
&
itemPtr
->
storagetime
);
...
...
@@ -348,8 +346,10 @@ int sevcli_get_itemdata( pwr_tStatus *sts, sevcli_tCtx ctx, pwr_tOid oid,
}
*
sts
=
rmsg
->
Status
;
if
(
EVEN
(
*
sts
))
if
(
EVEN
(
*
sts
))
{
qcom_Free
(
sts
,
rmsg
);
return
0
;
}
int
item_cnt
=
rmsg
->
NumPoints
;
...
...
@@ -441,9 +441,12 @@ int sevcli_get_objectitemdata( pwr_tStatus *sts, sevcli_tCtx ctx, pwr_tOid oid,
}
*
sts
=
rmsg
->
Status
;
if
(
EVEN
(
*
sts
))
if
(
EVEN
(
*
sts
))
{
qcom_Free
(
sts
,
rmsg
);
return
0
;
}
if
(
rmsg
->
NumPoints
==
0
)
{
qcom_Free
(
sts
,
rmsg
);
*
sts
=
0
;
return
0
;
}
...
...
xtt/lib/xtt/src/xtt_sevhist.cpp
View file @
78b734f0
...
...
@@ -83,6 +83,10 @@ int XttSevHist::get_data( pwr_tStatus *sts, pwr_tTime from, pwr_tTime to)
if
(
EVEN
(
*
sts
))
return
0
;
if
(
rows
==
0
)
{
return
0
;
}
// Create data for time axis
gcd
=
new
GeCurveData
(
curve_eDataType_DsTrend
);
...
...
@@ -185,6 +189,10 @@ int XttSevHist::get_objectdata( pwr_tStatus *sts, pwr_tTime from, pwr_tTime to)
if
(
EVEN
(
*
sts
))
return
0
;
if
(
rows
==
0
)
{
return
0
;
}
// Create data for time axis
gcd
=
new
GeCurveData
(
curve_eDataType_DsTrend
);
...
...
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