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
60dd39e9
Commit
60dd39e9
authored
Oct 15, 2010
by
Claes Sjofors
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
SevHist, Disable attribute added
parent
d4812243
Changes
4
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
41 additions
and
17 deletions
+41
-17
src/exe/rt_sevhistmon/src/rt_sevhistmon.cpp
src/exe/rt_sevhistmon/src/rt_sevhistmon.cpp
+18
-12
src/exe/rt_sevhistmon/src/rt_sevhistmon.h
src/exe/rt_sevhistmon/src/rt_sevhistmon.h
+7
-5
src/wbl/pwrb/src/pwrb_c_sevhist.wb_load
src/wbl/pwrb/src/pwrb_c_sevhist.wb_load
+8
-0
src/wbl/pwrb/src/pwrb_c_sevhistobject.wb_load
src/wbl/pwrb/src/pwrb_c_sevhistobject.wb_load
+8
-0
No files found.
src/exe/rt_sevhistmon/src/rt_sevhistmon.cpp
View file @
60dd39e9
...
@@ -213,6 +213,7 @@ int rt_sevhistmon::init_objects()
...
@@ -213,6 +213,7 @@ int rt_sevhistmon::init_objects()
h
.
storagetime
=
h_p
->
StorageTime
;
h
.
storagetime
=
h_p
->
StorageTime
;
h
.
deadband
=
h_p
->
DeadBand
;
h
.
deadband
=
h_p
->
DeadBand
;
h
.
options
=
h_p
->
Options
;
h
.
options
=
h_p
->
Options
;
h
.
disabled
=
h_p
->
Disable
;
strncpy
(
h
.
description
,
h_p
->
Description
,
sizeof
(
h
.
description
));
strncpy
(
h
.
description
,
h_p
->
Description
,
sizeof
(
h
.
description
));
// Get unit from attribute object
// Get unit from attribute object
...
@@ -298,6 +299,7 @@ int rt_sevhistmon::init_sevhistobjects()
...
@@ -298,6 +299,7 @@ int rt_sevhistmon::init_sevhistobjects()
h
.
storagetime
=
h_p
->
StorageTime
;
h
.
storagetime
=
h_p
->
StorageTime
;
h
.
deadband
=
h_p
->
DeadBand
;
h
.
deadband
=
h_p
->
DeadBand
;
h
.
options
=
h_p
->
Options
;
h
.
options
=
h_p
->
Options
;
h
.
disabled
=
h_p
->
Disable
;
strncpy
(
h
.
description
,
h_p
->
Description
,
sizeof
(
h
.
description
));
strncpy
(
h
.
description
,
h_p
->
Description
,
sizeof
(
h
.
description
));
h
.
scantime
=
m_hs
[
hs_idx
].
scantime
;
h
.
scantime
=
m_hs
[
hs_idx
].
scantime
;
...
@@ -618,12 +620,14 @@ int rt_sevhistmon::send_data()
...
@@ -618,12 +620,14 @@ int rt_sevhistmon::send_data()
dp
=
(
sev_sHistData
*
)
&
msg
->
Data
;
dp
=
(
sev_sHistData
*
)
&
msg
->
Data
;
for
(
unsigned
int
j
=
0
;
j
<
m_hs
[
i
].
sevhistlist
.
size
();
j
++
)
{
for
(
unsigned
int
j
=
0
;
j
<
m_hs
[
i
].
sevhistlist
.
size
();
j
++
)
{
if
(
!
m_hs
[
i
].
sevhistlist
[
j
].
disabled
)
{
dp
->
sevid
=
m_hs
[
i
].
sevhistlist
[
j
].
sevid
;
dp
->
sevid
=
m_hs
[
i
].
sevhistlist
[
j
].
sevid
;
dp
->
type
=
m_hs
[
i
].
sevhistlist
[
j
].
type
;
dp
->
type
=
m_hs
[
i
].
sevhistlist
[
j
].
type
;
dp
->
size
=
m_hs
[
i
].
sevhistlist
[
j
].
size
;
dp
->
size
=
m_hs
[
i
].
sevhistlist
[
j
].
size
;
memcpy
(
&
dp
->
data
,
m_hs
[
i
].
sevhistlist
[
j
].
datap
,
dp
->
size
);
memcpy
(
&
dp
->
data
,
m_hs
[
i
].
sevhistlist
[
j
].
datap
,
dp
->
size
);
dp
=
(
sev_sHistData
*
)((
char
*
)
dp
+
sizeof
(
*
dp
)
-
sizeof
(
dp
->
data
)
+
dp
->
size
);
dp
=
(
sev_sHistData
*
)((
char
*
)
dp
+
sizeof
(
*
dp
)
-
sizeof
(
dp
->
data
)
+
dp
->
size
);
}
}
}
void
*
dpp
;
void
*
dpp
;
for
(
unsigned
int
j
=
0
;
j
<
m_hs
[
i
].
sevhistobjectlist
.
size
();
j
++
)
{
for
(
unsigned
int
j
=
0
;
j
<
m_hs
[
i
].
sevhistobjectlist
.
size
();
j
++
)
{
...
@@ -631,6 +635,7 @@ int rt_sevhistmon::send_data()
...
@@ -631,6 +635,7 @@ int rt_sevhistmon::send_data()
dp
->
size
=
m_hs
[
i
].
sevhistobjectlist
[
j
].
datasize
;
dp
->
size
=
m_hs
[
i
].
sevhistobjectlist
[
j
].
datasize
;
dpp
=
&
(
dp
->
data
);
dpp
=
&
(
dp
->
data
);
for
(
unsigned
int
k
=
0
;
k
<
m_hs
[
i
].
sevhistobjectlist
[
j
].
sevhistobjectattrlist
.
size
();
k
++
)
{
for
(
unsigned
int
k
=
0
;
k
<
m_hs
[
i
].
sevhistobjectlist
[
j
].
sevhistobjectattrlist
.
size
();
k
++
)
{
if
(
!
m_hs
[
i
].
sevhistobjectlist
[
j
].
disabled
)
{
//dp->type = m_hs[i].sevhistobjectlist[j].sevhistobjectattrlist[k].type;
//dp->type = m_hs[i].sevhistobjectlist[j].sevhistobjectattrlist[k].type;
//printf("sevhistobj[%d].attrlist[%d].aname: %s size:%d\n", j, k, m_hs[i].sevhistobjectlist[j].sevhistobjectattrlist[k].aname, m_hs[i].sevhistobjectlist[j].sevhistobjectattrlist[k].size);
//printf("sevhistobj[%d].attrlist[%d].aname: %s size:%d\n", j, k, m_hs[i].sevhistobjectlist[j].sevhistobjectattrlist[k].aname, m_hs[i].sevhistobjectlist[j].sevhistobjectattrlist[k].size);
//if( m_hs[i].sevhistobjectlist[j].sevhistobjectattrlist[k].type == pwr_eType_String ) {
//if( m_hs[i].sevhistobjectlist[j].sevhistobjectattrlist[k].type == pwr_eType_String ) {
...
@@ -639,6 +644,7 @@ int rt_sevhistmon::send_data()
...
@@ -639,6 +644,7 @@ int rt_sevhistmon::send_data()
memcpy
(
dpp
,
m_hs
[
i
].
sevhistobjectlist
[
j
].
sevhistobjectattrlist
[
k
].
datap
,
m_hs
[
i
].
sevhistobjectlist
[
j
].
sevhistobjectattrlist
[
k
].
size
);
memcpy
(
dpp
,
m_hs
[
i
].
sevhistobjectlist
[
j
].
sevhistobjectattrlist
[
k
].
datap
,
m_hs
[
i
].
sevhistobjectlist
[
j
].
sevhistobjectattrlist
[
k
].
size
);
dpp
=
(
sev_sHistData
*
)((
char
*
)
dpp
+
m_hs
[
i
].
sevhistobjectlist
[
j
].
sevhistobjectattrlist
[
k
].
size
);
dpp
=
(
sev_sHistData
*
)((
char
*
)
dpp
+
m_hs
[
i
].
sevhistobjectlist
[
j
].
sevhistobjectattrlist
[
k
].
size
);
}
}
}
dp
=
(
sev_sHistData
*
)((
char
*
)
dp
+
sizeof
(
*
dp
)
-
sizeof
(
dp
->
data
)
+
dp
->
size
);
dp
=
(
sev_sHistData
*
)((
char
*
)
dp
+
sizeof
(
*
dp
)
-
sizeof
(
dp
->
data
)
+
dp
->
size
);
}
}
...
...
src/exe/rt_sevhistmon/src/rt_sevhistmon.h
View file @
60dd39e9
...
@@ -40,6 +40,7 @@ class sev_sevhist {
...
@@ -40,6 +40,7 @@ class sev_sevhist {
pwr_tString80
description
;
pwr_tString80
description
;
pwr_tString16
unit
;
pwr_tString16
unit
;
pwr_tFloat32
scantime
;
pwr_tFloat32
scantime
;
pwr_tBoolean
disabled
;
};
};
class
sev_sevhistobjectattr
{
class
sev_sevhistobjectattr
{
...
@@ -65,6 +66,7 @@ class sev_sevhistobject {
...
@@ -65,6 +66,7 @@ class sev_sevhistobject {
pwr_tString80
description
;
pwr_tString80
description
;
pwr_tFloat32
scantime
;
pwr_tFloat32
scantime
;
unsigned
int
datasize
;
unsigned
int
datasize
;
pwr_tBoolean
disabled
;
vector
<
sev_sevhistobjectattr
>
sevhistobjectattrlist
;
vector
<
sev_sevhistobjectattr
>
sevhistobjectattrlist
;
};
};
...
...
src/wbl/pwrb/src/pwrb_c_sevhist.wb_load
View file @
60dd39e9
...
@@ -113,6 +113,14 @@ SObject pwrb:Class
...
@@ -113,6 +113,14 @@ SObject pwrb:Class
Attr TypeRef = "pwrb:Type-SevHistOptionsMask"
Attr TypeRef = "pwrb:Type-SevHistOptionsMask"
EndBody
EndBody
EndObject
EndObject
!/**
! Disable storage.
!*/
Object Disable $Attribute 7
Body SysBody
Attr TypeRef = "pwrs:Type-$Boolean"
EndBody
EndObject
EndObject
EndObject
Object Template SevHist
Object Template SevHist
Body RtBody
Body RtBody
...
...
src/wbl/pwrb/src/pwrb_c_sevhistobject.wb_load
View file @
60dd39e9
...
@@ -108,6 +108,14 @@ SObject pwrb:Class
...
@@ -108,6 +108,14 @@ SObject pwrb:Class
Attr TypeRef = "pwrb:Type-SevHistOptionsMask"
Attr TypeRef = "pwrb:Type-SevHistOptionsMask"
EndBody
EndBody
EndObject
EndObject
!/**
! Disable storage.
!*/
Object Disable $Attribute 7
Body SysBody
Attr TypeRef = "pwrs:Type-$Boolean"
EndBody
EndObject
EndObject
EndObject
Object Template SevHistObject
Object Template SevHistObject
Body RtBody
Body RtBody
...
...
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