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
164ea502
Commit
164ea502
authored
Oct 22, 2020
by
Claes
Committed by
Esteban Blanc
Dec 23, 2020
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Project pwrtest01 sev test adjusted
parent
445dfae2
Changes
2
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
108 additions
and
88 deletions
+108
-88
project/pwrtest01/src/appl/ra_sevtest.py
project/pwrtest01/src/appl/ra_sevtest.py
+59
-39
project/pwrtest01/src/db/volpwrtest01d.wb_dmp
project/pwrtest01/src/db/volpwrtest01d.wb_dmp
+49
-49
No files found.
project/pwrtest01/src/appl/ra_sevtest.py
View file @
164ea502
...
...
@@ -34,8 +34,15 @@ class Ctx:
try
:
self
.
itemlist
=
pwrrt
.
getSevItemList
(
'localhost'
,
''
)
for
i
in
range
(
len
(
d
)):
name
=
self
.
itemlist
[
i
][
0
]
+
'.'
+
self
.
itemlist
[
i
][
6
]
if
name
!=
d
[
i
]:
found
=
False
for
j
in
range
(
len
(
self
.
itemlist
)):
name
=
self
.
itemlist
[
j
][
0
]
+
'.'
+
self
.
itemlist
[
j
][
6
]
if
name
!=
d
[
i
]:
found
=
True
break
if
not
found
:
self
.
logger
.
vlog
(
'E'
,
"getSevItemList, Name doesn't match, %s != %s, idx %s"
,
name
,
d
[
i
][
0
],
str
(
i
))
return
...
...
@@ -51,22 +58,23 @@ class Ctx:
#
def
getSevItemData
(
self
):
try
:
result
=
pwrrt
.
getSevItemData
(
'localhost'
,
self
.
itemlist
[
0
][
1
],
self
.
itemlist
[
0
][
6
],
# Get Test01d-H1-Av1.ActualValue
result
=
pwrrt
.
getSevItemData
(
'localhost'
,
'_O0.254.254.204:68'
,
'ActualValue'
,
'00:02:00'
,
'now'
,
1000
)
ser
=
pd
.
Series
(
result
[
1
])
mean
=
ser
.
mean
()
std
=
ser
.
std
()
if
len
(
ser
)
<
119
or
len
(
result
)
>
121
:
if
len
(
ser
)
<
40
or
len
(
ser
)
>
60
:
self
.
logger
.
vlog
(
'E'
,
"getSevItemData, number of rows error, %s"
,
str
(
len
(
result
)))
if
mean
<
4
9
or
mean
>
51
:
str
(
len
(
ser
)))
if
mean
<
4
5
or
mean
>
55
:
self
.
logger
.
vlog
(
'E'
,
"getSevItemData, mean error, %s, idx %s"
,
str
(
mean
),
str
(
0
))
return
if
std
<
34
or
std
>
36
:
self
.
logger
.
vlog
(
'E'
,
"getSevItemData, std error, %s, idx %s"
,
str
(
std
),
str
(
0
))
return
#
if std < 34 or std > 36:
#
self.logger.vlog('E', "getSevItemData, std error, %s, idx %s",
#
str(std), str(0))
#
return
except
RuntimeError
as
e
:
self
.
logger
.
vlog
(
'E'
,
'getSevItemData, Unexpected exception %s'
,
str
(
e
))
...
...
@@ -80,10 +88,16 @@ class Ctx:
oidlist
=
[]
attrlist
=
[]
isobjectlist
=
[]
for
i
in
range
(
2
):
oidlist
.
append
(
self
.
itemlist
[
i
][
0
])
attrlist
.
append
(
self
.
itemlist
[
i
][
6
])
isobjectlist
.
append
(
0
)
# Append Test01d-H1-Av1.ActualValue
oidlist
.
append
(
'_O0.254.254.204:68'
)
attrlist
.
append
(
'ActualValue'
)
isobjectlist
.
append
(
0
)
# Append Test01d-H1-Av2.ActualValue
oidlist
.
append
(
'_O0.254.254.204:69'
)
attrlist
.
append
(
'ActualValue'
)
isobjectlist
.
append
(
0
)
try
:
result
=
pwrrt
.
getSevItemsDataFrame
(
'localhost'
,
oidlist
,
attrlist
,
isobjectlist
,
'00:02:00'
,
'now'
,
0.5
,
1000
)
...
...
@@ -95,25 +109,25 @@ class Ctx:
for
i
in
range
(
2
):
mean
.
append
(
data
[
columns
[
i
+
1
]].
mean
())
std
.
append
(
data
[
columns
[
i
+
1
]].
std
())
if
len
(
result
)
<
23
8
or
len
(
result
)
>
242
:
if
len
(
result
)
<
23
9
or
len
(
result
)
>
241
:
self
.
logger
.
vlog
(
'E'
,
"getSevItemsDataFrame, number of rows error, %s"
,
str
(
len
(
result
)))
if
mean
[
0
]
<
4
7
or
mean
[
0
]
>
53
:
if
mean
[
0
]
<
4
5
or
mean
[
0
]
>
55
:
self
.
logger
.
vlog
(
'E'
,
"getSevItemsDataFrame, mean error, %s, idx %s"
,
str
(
mean
[
0
]),
str
(
0
))
return
if
std
[
0
]
<
34
or
std
[
0
]
>
36
:
self
.
logger
.
vlog
(
'E'
,
"getSevItemsDataFrame, std error, %s, idx %s"
,
str
(
std
[
0
]),
str
(
0
))
return
if
mean
[
1
]
<
4
7
or
mean
[
1
]
>
53
:
#
if std[0] < 34 or std[0] > 36:
#
self.logger.vlog('E', "getSevItemsDataFrame, std error, %s, idx %s",
#
str(std[0]), str(0))
#
return
if
mean
[
1
]
<
4
5
or
mean
[
1
]
>
55
:
self
.
logger
.
vlog
(
'E'
,
"getSevItemsDataFrame, mean error, %s, idx %s"
,
str
(
mean
[
1
]),
str
(
1
))
return
if
std
[
1
]
<
27
or
std
[
1
]
>
29
:
self
.
logger
.
vlog
(
'E'
,
"getSevItemsDataFrame, std error, %s, idx %s"
,
str
(
std
[
1
]),
str
(
1
))
return
#
if std[1] < 27 or std[1] > 29:
#
self.logger.vlog('E', "getSevItemsDataFrame, std error, %s, idx %s",
#
str(std[1]), str(1))
#
return
except
RuntimeError
as
e
:
self
.
logger
.
vlog
(
'E'
,
'getSevItemsDataFrame, Unexpected exception %s'
,
str
(
e
))
...
...
@@ -127,10 +141,16 @@ class Ctx:
oidlist
=
[]
attrlist
=
[]
isobjectlist
=
[]
for
i
in
range
(
2
):
oidlist
.
append
(
self
.
itemlist
[
i
][
0
])
attrlist
.
append
(
self
.
itemlist
[
i
][
6
])
isobjectlist
.
append
(
0
)
# Append Test01d-H1-Av1.ActualValue
oidlist
.
append
(
'_O0.254.254.204:68'
)
attrlist
.
append
(
'ActualValue'
)
isobjectlist
.
append
(
0
)
# Append Test01d-H1-Av2.ActualValue
oidlist
.
append
(
'_O0.254.254.204:69'
)
attrlist
.
append
(
'ActualValue'
)
isobjectlist
.
append
(
0
)
try
:
result
=
pwrrt
.
getSevItemsDataFrameD
(
'localhost'
,
oidlist
,
attrlist
,
isobjectlist
,
'00:02:00'
,
'now'
,
0.5
,
1000
)
...
...
@@ -143,27 +163,27 @@ class Ctx:
mean
.
append
(
data
[
columns
[
i
+
1
]].
mean
())
std
.
append
(
data
[
columns
[
i
+
1
]].
std
())
print
data
[
columns
[
1
]].
mean
()
if
len
(
result
)
<
238
or
len
(
result
)
>
242
:
self
.
logger
.
vlog
(
'E'
,
"getSevItemsDataFrame, number of rows error, %s"
,
if
len
(
result
)
<
40
or
len
(
result
)
>
60
:
self
.
logger
.
vlog
(
'E'
,
"getSevItemsDataFrame
D
, number of rows error, %s"
,
str
(
len
(
result
)))
if
mean
[
0
]
<
47
or
mean
[
0
]
>
53
:
self
.
logger
.
vlog
(
'E'
,
"getSevItemsDataFrameD, mean error, %s, idx %s"
,
str
(
mean
[
0
]),
str
(
0
))
print
data
[
columns
[
1
]]
return
if
std
[
0
]
<
34
or
std
[
0
]
>
36
:
self
.
logger
.
vlog
(
'E'
,
"getSevItemsDataFrameD, std error, %s, idx %s"
,
str
(
std
[
0
]),
str
(
0
))
return
#
if std[0] < 34 or std[0] > 36:
#
self.logger.vlog('E', "getSevItemsDataFrameD, std error, %s, idx %s",
#
str(std[0]), str(0))
#
return
if
mean
[
1
]
<
47
or
mean
[
1
]
>
53
:
print
data
[
columns
[
2
]]
self
.
logger
.
vlog
(
'E'
,
"getSevItemsDataFrameD, mean error, %s, idx %s"
,
str
(
mean
[
1
]),
str
(
1
))
return
if
std
[
1
]
<
27
or
std
[
1
]
>
29
:
self
.
logger
.
vlog
(
'E'
,
"getSevItemsDataFrameD, std error, %s, idx %s"
,
str
(
std
[
1
]),
str
(
1
))
return
#
if std[1] < 27 or std[1] > 29:
#
self.logger.vlog('E', "getSevItemsDataFrameD, std error, %s, idx %s",
#
str(std[1]), str(1))
#
return
except
RuntimeError
as
e
:
self
.
logger
.
vlog
(
'E'
,
'getSevItemsDataFrameD, Unexpected exception %s'
,
str
(
e
))
...
...
project/pwrtest01/src/db/volpwrtest01d.wb_dmp
View file @
164ea502
This diff is collapsed.
Click to expand it.
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