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
5f3a1453
Commit
5f3a1453
authored
Oct 21, 2020
by
Claes
Committed by
Esteban Blanc
Dec 23, 2020
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Project test program updates
parent
ea314b66
Changes
6
Show whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
70 additions
and
25 deletions
+70
-25
project/pwrtest01/src/appl/ra_errhtest.cpp
project/pwrtest01/src/appl/ra_errhtest.cpp
+4
-0
project/pwrtest01/src/appl/ra_gdhtest.cpp
project/pwrtest01/src/appl/ra_gdhtest.cpp
+42
-18
project/pwrtest01/src/appl/ra_qcomtest.cpp
project/pwrtest01/src/appl/ra_qcomtest.cpp
+4
-1
project/pwrtest01/src/appl/ra_timetest.cpp
project/pwrtest01/src/appl/ra_timetest.cpp
+14
-0
project/pwrtest02/src/appl/wa_ldhtest.cpp
project/pwrtest02/src/appl/wa_ldhtest.cpp
+4
-4
src/tools/docker/pwrtest02/wa_ldhtest.cpp
src/tools/docker/pwrtest02/wa_ldhtest.cpp
+2
-2
No files found.
project/pwrtest01/src/appl/ra_errhtest.cpp
View file @
5f3a1453
...
...
@@ -11,6 +11,7 @@
#include "co_dcli.h"
#include "co_time.h"
#include "rt_gdh.h"
#include "rt_aproc.h"
#include "ra_errhtest.h"
#include "rt_pwr_msg.h"
#include "rt_errh_msg.h"
...
...
@@ -312,6 +313,9 @@ void ra_errhtest::SetStatus(void)
{
0
}
};
aproc_TimeStamp
(
10
,
10
);
m_nodep
->
ProcStatus
[
m_anix
-
1
]
=
0
;
for
(
unsigned
int
i
=
0
;
i
<
sizeof
(
d
)
/
sizeof
(
d
[
0
]);
i
++
)
{
errh_SetStatus
(
d
[
i
].
sts
);
time_Sleep
(
errhtest_wait
);
...
...
project/pwrtest01/src/appl/ra_gdhtest.cpp
View file @
5f3a1453
...
...
@@ -380,6 +380,11 @@ void ra_gdhtest::CreateObject(void)
};
pwr_tOName
oname
;
// Clear if objects already are created
m_sts
=
gdh_NameToObjid
(
d
[
0
].
name
,
&
d
[
0
].
oid
);
if
(
ODD
(
m_sts
))
m_sts
=
gdh_DeleteObjectTree
(
d
[
0
].
oid
);
for
(
unsigned
int
i
=
0
;
i
<
sizeof
(
d
)
/
sizeof
(
d
[
0
]);
i
++
)
{
m_sts
=
gdh_CreateObject
(
d
[
i
].
name
,
d
[
i
].
cid
,
0
,
&
d
[
i
].
oid
,
pwr_cNOid
,
0
,
pwr_cNOid
);
...
...
@@ -2394,10 +2399,16 @@ void ra_gdhtest::GetDynamicAttrSize(void)
for
(
unsigned
int
i
=
0
;
i
<
sizeof
(
d
)
/
sizeof
(
d
[
0
]);
i
++
)
{
m_sts
=
gdh_CreateObject
(
d
[
i
].
name
,
d
[
i
].
cid
,
d
[
i
].
size
,
&
d
[
i
].
oid
,
pwr_cNOid
,
0
,
pwr_cNOid
);
if
(
m_sts
==
GDH__DUPLNAME
)
m_sts
=
gdh_NameToObjid
(
d
[
i
].
name
,
&
d
[
i
].
oid
);
if
(
EVEN
(
m_sts
))
{
m_log
->
log
(
'E'
,
"GetDynamicAttrSize, gdh_CreateObject"
,
m_sts
);
return
;
}
m_sts
=
gdh_GetObjectSize
(
d
[
i
].
oid
,
&
size
);
if
(
m_sts
!=
d
[
i
].
sts
)
{
m_log
->
log
(
'E'
,
"Get
Object
Size"
,
m_sts
);
m_log
->
log
(
'E'
,
"Get
DynamicAttr
Size"
,
m_sts
);
return
;
}
if
(
ODD
(
m_sts
))
{
...
...
@@ -2409,7 +2420,7 @@ void ra_gdhtest::GetDynamicAttrSize(void)
m_sts
=
gdh_GetDynamicAttrSize
(
d
[
i
].
oid
,
d
[
i
].
aname
,
&
asize
);
if
(
EVEN
(
m_sts
))
{
m_log
->
log
(
'E'
,
"GetDynamicAttrSize
s
"
,
m_sts
);
m_log
->
log
(
'E'
,
"GetDynamicAttrSize"
,
m_sts
);
return
;
}
if
(
asize
!=
d
[
i
].
asize
)
{
...
...
@@ -2689,36 +2700,49 @@ void ra_gdhtest::GetNextVolume(void)
{
"_V0.254.254.203"
,
"_V254.254.254.245"
,
GDH__SUCCESS
},
{
"_V254.254.254.245"
,
"_V0.0.0.1"
,
GDH__SUCCESS
},
{
"_V0.0.0.1"
,
"_V0.0.0.2"
,
GDH__SUCCESS
},
{
"_V0.0.2
54
.254"
,
"_V1.254.254.203"
,
GDH__SUCCESS
},
{
"_V0.0.2
40
.254"
,
"_V1.254.254.203"
,
GDH__SUCCESS
},
{
"_V1.254.254.203"
,
""
,
GDH__NOSUCHVOL
}
};
pwr_tVid
vid
,
nextvid
,
nvid
;
char
volumes
[][
80
]
=
{
"_V0.0.0.1"
,
"_V0.0.0.2"
,
"_V0.0.250.7"
,
"_V0.254.254.203"
,
"_V0.0.240.254"
,
"_V254.254.254.245"
};
pwr_tVid
vids
[]
=
{
0
,
0
,
0
,
0
,
0
,
0
};
pwr_tVid
vid
,
nvid
;
int
found
;
for
(
unsigned
int
i
=
0
;
i
<
sizeof
(
d
)
/
sizeof
(
d
[
0
]);
i
++
)
{
m_sts
=
cdh_StringToVolumeId
(
d
[
i
].
vid
,
&
vid
);
for
(
unsigned
int
i
=
0
;
i
<
sizeof
(
vids
)
/
sizeof
(
vids
[
0
]);
i
++
)
{
m_sts
=
cdh_StringToVolumeId
(
volumes
[
i
],
&
vids
[
i
]
);
if
(
EVEN
(
m_sts
))
{
m_log
->
log
(
'E'
,
"GetNextVolume, cdh_StringToVolumeId"
,
d
[
i
].
vid
,
m_sts
);
m_log
->
log
(
'E'
,
"GetNextVolume, cdh_StringToVolumeId"
,
volumes
[
i
]
,
m_sts
);
return
;
}
if
(
strcmp
(
d
[
i
].
nextvid
,
""
)
!=
0
)
{
m_sts
=
cdh_StringToVolumeId
(
d
[
i
].
nextvid
,
&
nextvid
);
}
for
(
unsigned
int
i
=
0
;
i
<
sizeof
(
d
)
/
sizeof
(
d
[
0
]);
i
++
)
{
m_sts
=
cdh_StringToVolumeId
(
d
[
i
].
vid
,
&
vid
);
if
(
EVEN
(
m_sts
))
{
m_log
->
log
(
'E'
,
"GetNextVolume, cdh_StringToVolumeId"
,
d
[
i
].
next
vid
,
m_sts
);
m_log
->
log
(
'E'
,
"GetNextVolume, cdh_StringToVolumeId"
,
d
[
i
].
vid
,
m_sts
);
return
;
}
}
m_sts
=
gdh_GetNextVolume
(
vid
,
&
nvid
);
if
(
m_sts
!=
d
[
i
].
sts
)
{
if
(
m_sts
==
GDH__NOSUCHVOL
)
continue
;
else
if
(
m_sts
!=
GDH__SUCCESS
)
{
m_log
->
log
(
'E'
,
"GetNextVolume"
,
d
[
i
].
vid
,
m_sts
);
return
;
}
if
(
ODD
(
m_sts
))
{
if
(
nvid
!=
nextvid
)
{
m_log
->
log
(
'E'
,
"GetNextVolume, wrong volume"
,
d
[
i
].
vid
);
return
;
found
=
0
;
for
(
unsigned
int
j
=
0
;
j
<
sizeof
(
vids
)
/
sizeof
(
vids
[
0
]);
j
++
)
{
if
(
nvid
==
vids
[
j
])
{
found
=
1
;
break
;
}
}
if
(
!
found
)
{
m_log
->
vlog
(
'E'
,
"GetNextVolume, unknown volume %s"
,
cdh_VolumeIdToString
(
0
,
0
,
nvid
,
1
,
0
));
return
;
}
}
m_log
->
log
(
'S'
,
"GetNextVolume"
,
GDH__SUCCESS
);
...
...
@@ -2741,7 +2765,7 @@ void ra_gdhtest::VolumeIdToName(void)
{
"BaseComponent"
,
"_V0.0.0.10"
,
GDH__SUCCESS
},
{
"NMps"
,
"_V0.0.1.1"
,
GDH__SUCCESS
},
{
"Profibus"
,
"_V0.0.250.7"
,
GDH__SUCCESS
},
{
"CVolPwrtest01"
,
"_V0.0.2
54
.254"
,
GDH__SUCCESS
},
{
"CVolPwrtest01"
,
"_V0.0.2
40
.254"
,
GDH__SUCCESS
},
{
"1_254_254_203"
,
"_V1.254.254.203"
,
GDH__SUCCESS
}
};
pwr_tVid
vid
;
...
...
@@ -2788,7 +2812,7 @@ void ra_gdhtest::GetVolumeInfo(void)
{
"BaseComponent"
,
"_V0.0.0.10"
,
pwr_eClass_ClassVolume
,
GDH__SUCCESS
},
{
"NMps"
,
"_V0.0.1.1"
,
pwr_eClass_ClassVolume
,
GDH__SUCCESS
},
{
"Profibus"
,
"_V0.0.250.7"
,
pwr_eClass_ClassVolume
,
GDH__SUCCESS
},
{
"CVolPwrtest01"
,
"_V0.0.2
54
.254"
,
pwr_eClass_ClassVolume
,
GDH__SUCCESS
},
{
"CVolPwrtest01"
,
"_V0.0.2
40
.254"
,
pwr_eClass_ClassVolume
,
GDH__SUCCESS
},
{
"1_254_254_203"
,
"_V1.254.254.203"
,
pwr_eClass_SystemVolume
,
GDH__SUCCESS
}
};
pwr_tVid
vid
;
...
...
project/pwrtest01/src/appl/ra_qcomtest.cpp
View file @
5f3a1453
...
...
@@ -345,7 +345,10 @@ void ra_qcomtest::Alloc(void)
for
(
unsigned
int
i
=
0
;
i
<
sizeof
(
d
)
/
sizeof
(
d
[
0
]);
i
++
)
{
p
=
qcom_Alloc
(
&
m_sts
,
d
[
i
].
size
);
if
(
m_sts
!=
d
[
i
].
asts
)
{
m_log
->
vlog
(
'E'
,
"Alloc"
,
m_sts
);
if
(
d
[
i
].
size
<
5000000
)
m_log
->
vlog
(
'E'
,
"Alloc size %d, %d"
,
d
[
i
].
size
,
m_sts
);
else
m_log
->
vlog
(
'S'
,
"Alloc: size %d too large"
,
d
[
i
].
size
);
return
;
}
if
(
ODD
(
m_sts
))
{
...
...
project/pwrtest01/src/appl/ra_timetest.cpp
View file @
5f3a1453
...
...
@@ -784,6 +784,7 @@ void ra_timetest::AtoAscii(void)
{{
1587558870
,
220000000
},
time_eFormat_FileDateAndTime
,
"20200422_143430"
,
TIME__SUCCESS
},
{{
1587558870
,
220000000
},
time_eFormat_FileDate
,
"20200422"
,
TIME__SUCCESS
},
{{
1587558870
,
220000000
},
time_eFormat_TimeAndDate
,
"14:34:30 22/04/20"
,
TIME__SUCCESS
},
#ifdef __x86_64__
{{
2537701200
,
0
},
time_eFormat_DateAndTime
,
"01-JUN-2050 15:00:00.00"
,
TIME__SUCCESS
},
{{
2537701200
,
0
},
time_eFormat_Time
,
"15:00:00.00"
,
TIME__SUCCESS
},
{{
2537701200
,
0
},
time_eFormat_ComprDateAndTime
,
"50-06-01 15:00:00.00"
,
TIME__SUCCESS
},
...
...
@@ -791,6 +792,15 @@ void ra_timetest::AtoAscii(void)
{{
2537701200
,
0
},
time_eFormat_FileDateAndTime
,
"20500601_150000"
,
TIME__SUCCESS
},
{{
2537701200
,
0
},
time_eFormat_FileDate
,
"20500601"
,
TIME__SUCCESS
},
{{
2537701200
,
0
},
time_eFormat_TimeAndDate
,
"15:00:00 01/06/50"
,
TIME__SUCCESS
},
#else
{{
2537701200
,
0
},
time_eFormat_DateAndTime
,
"01-JUN-2050 15:00:00.00"
,
TIME__RANGE
},
{{
2537701200
,
0
},
time_eFormat_Time
,
"15:00:00.00"
,
TIME__RANGE
},
{{
2537701200
,
0
},
time_eFormat_ComprDateAndTime
,
"50-06-01 15:00:00.00"
,
TIME__RANGE
},
{{
2537701200
,
0
},
time_eFormat_NumDateAndTime
,
"2050-06-01 15:00:00.00"
,
TIME__RANGE
},
{{
2537701200
,
0
},
time_eFormat_FileDateAndTime
,
"20500601_150000"
,
TIME__RANGE
},
{{
2537701200
,
0
},
time_eFormat_FileDate
,
"20500601"
,
TIME__RANGE
},
{{
2537701200
,
0
},
time_eFormat_TimeAndDate
,
"15:00:00 01/06/50"
,
TIME__RANGE
},
#endif
{{
1587558870
,
-
220000000
},
time_eFormat_DateAndTime
,
"14:34:30 22/04/20"
,
TIME__NAT
},
{{
-
1587558870
,
-
220000000
},
time_eFormat_DateAndTime
,
"14:34:30 22/04/20"
,
TIME__NAT
}
};
...
...
@@ -826,7 +836,11 @@ void ra_timetest::AsciiToA(void)
{
"01-JAN-1970 01:00:00.00"
,
pwr_cNTime
,
TIME__SUCCESS
},
{
"22-APR-2020 14:34:30.22"
,
{
1587558870
,
220000000
},
TIME__SUCCESS
},
{
"22-apr-2020 14:34:30.22"
,
{
1587558870
,
220000000
},
TIME__SUCCESS
},
#ifdef __x86_64__
{
"01-JUN-2050 15:00:00.00"
,
{
2537701200
,
0
},
TIME__SUCCESS
},
#else
{
"01-JUN-2050 15:00:00.00"
,
{
2537701200
,
0
},
TIME__RANGE
},
#endif
{
"01-JAN-2020 00:00:00.00"
,
{
1577833200
,
0
},
TIME__SUCCESS
},
{
"01-FEB-2020 00:00:00.00"
,
{
1580511600
,
0
},
TIME__SUCCESS
},
{
"01-MAR-2020 00:00:00.00"
,
{
1583017200
,
0
},
TIME__SUCCESS
},
...
...
project/pwrtest02/src/appl/wa_ldhtest.cpp
View file @
5f3a1453
...
...
@@ -1617,6 +1617,8 @@ void wa_ldhtest::GetVolumeInfo(void)
void
wa_ldhtest
::
Close
(
void
)
{
ldh_DeleteObjectTree
(
m_ldhses
,
m_test
,
0
);
m_sts
=
ldh_DetachVolume
(
m_ldhwb
,
m_volctx
);
if
(
EVEN
(
m_sts
))
{
m_log
->
log
(
'F'
,
"Close, ldh_DetachVolume"
,
m_sts
);
...
...
@@ -2387,8 +2389,6 @@ wa_ldhtest::wa_ldhtest()
// Destructor
wa_ldhtest
::~
wa_ldhtest
()
{
ldh_DeleteObjectTree
(
m_ldhses
,
m_test
,
0
);
delete
m_log
;
}
...
...
@@ -2399,8 +2399,8 @@ int main(int argc, char *argv[])
if
(
argc
>
1
)
ldh
.
vname
(
argv
[
1
]);
setenv
(
"TZ"
,
"Europe/Stockholm"
,
1
);
tzset
();
//
setenv("TZ", "Europe/Stockholm", 1);
//
tzset();
ldh
.
OpenWB
();
ldh
.
AttachVolume
();
...
...
src/tools/docker/pwrtest02/wa_ldhtest.cpp
View file @
5f3a1453
...
...
@@ -1617,6 +1617,8 @@ void wa_ldhtest::GetVolumeInfo(void)
void
wa_ldhtest
::
Close
(
void
)
{
ldh_DeleteObjectTree
(
m_ldhses
,
m_test
,
0
);
m_sts
=
ldh_DetachVolume
(
m_ldhwb
,
m_volctx
);
if
(
EVEN
(
m_sts
))
{
m_log
->
log
(
'F'
,
"Close, ldh_DetachVolume"
,
m_sts
);
...
...
@@ -2387,8 +2389,6 @@ wa_ldhtest::wa_ldhtest()
// Destructor
wa_ldhtest
::~
wa_ldhtest
()
{
ldh_DeleteObjectTree
(
m_ldhses
,
m_test
,
0
);
delete
m_log
;
}
...
...
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