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
f6922d86
Commit
f6922d86
authored
Oct 15, 2010
by
Claes Sjofors
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Process supervision modified
parent
be472320
Changes
24
Show whitespace changes
Inline
Side-by-side
Showing
24 changed files
with
46 additions
and
41 deletions
+46
-41
opc/exe/opc_server/src/opc_server.cpp
opc/exe/opc_server/src/opc_server.cpp
+1
-1
remote/exe/rs_remote_alcm/src/rs_remote_alcm.c
remote/exe/rs_remote_alcm/src/rs_remote_alcm.c
+1
-1
remote/exe/rs_remote_mq/src/rs_remote_mq.c
remote/exe/rs_remote_mq/src/rs_remote_mq.c
+1
-1
remote/exe/rs_remote_tcpip/src/rs_remote_tcpip.c
remote/exe/rs_remote_tcpip/src/rs_remote_tcpip.c
+1
-1
remote/exe/rs_remote_udpip/src/rs_remote_udpip.c
remote/exe/rs_remote_udpip/src/rs_remote_udpip.c
+1
-1
remote/exe/rs_remotehandler/src/rs_remotehandler.c
remote/exe/rs_remotehandler/src/rs_remotehandler.c
+1
-1
sev/exe/sev_server/src/sev_server.cpp
sev/exe/sev_server/src/sev_server.cpp
+1
-1
src/doc/prm/src/ra_advappl.cpp
src/doc/prm/src/ra_advappl.cpp
+2
-2
src/exe/rt_bck/src/rt_bck.c
src/exe/rt_bck/src/rt_bck.c
+4
-3
src/exe/rt_elog/src/os_linux/rt_elog.c
src/exe/rt_elog/src/os_linux/rt_elog.c
+1
-1
src/exe/rt_elog/src/os_macos/rt_elog.c
src/exe/rt_elog/src/os_macos/rt_elog.c
+1
-1
src/exe/rt_emon/src/rt_emon.c
src/exe/rt_emon/src/rt_emon.c
+1
-1
src/exe/rt_fast/src/rt_fast.cpp
src/exe/rt_fast/src/rt_fast.cpp
+2
-2
src/exe/rt_io_comm/src/rt_io_comm.c
src/exe/rt_io_comm/src/rt_io_comm.c
+1
-1
src/exe/rt_linksup/src/rt_linksup.c
src/exe/rt_linksup/src/rt_linksup.c
+1
-1
src/exe/rt_statussrv/src/rt_statussrv.cpp
src/exe/rt_statussrv/src/rt_statussrv.cpp
+1
-1
src/exe/rt_sysmon/src/rt_sysmon.cpp
src/exe/rt_sysmon/src/rt_sysmon.cpp
+2
-2
src/exe/rt_tmon/src/rt_tmon.c
src/exe/rt_tmon/src/rt_tmon.c
+2
-2
src/exe/rt_trend/src/rt_trend.c
src/exe/rt_trend/src/rt_trend.c
+2
-2
src/lib/rt/src/rt_appl.cpp
src/lib/rt/src/rt_appl.cpp
+2
-2
src/lib/rt/src/rt_appl.h
src/lib/rt/src/rt_appl.h
+2
-1
src/lib/rt/src/rt_aproc.c
src/lib/rt/src/rt_aproc.c
+6
-3
src/lib/rt/src/rt_aproc.h
src/lib/rt/src/rt_aproc.h
+1
-1
src/lib/rt/src/rt_c_node.c
src/lib/rt/src/rt_c_node.c
+8
-8
No files found.
opc/exe/opc_server/src/opc_server.cpp
View file @
f6922d86
...
...
@@ -319,7 +319,7 @@ static void *opcsrv_cyclic( void *arg)
for
(;;)
{
time_GetTime
(
&
current_time
);
aproc_TimeStamp
();
aproc_TimeStamp
(
((
float
)
tmo
)
/
1000
,
5
);
get
.
maxSize
=
sizeof
(
mp
);
get
.
data
=
mp
;
...
...
remote/exe/rs_remote_alcm/src/rs_remote_alcm.c
View file @
f6922d86
...
...
@@ -738,7 +738,7 @@ int main(int argc, char *argv[]) {
/* Timestamp */
aproc_TimeStamp
();
aproc_TimeStamp
(
TIME_INCR
,
5
);
RemoteSleep
(
TIME_INCR
);
...
...
remote/exe/rs_remote_mq/src/rs_remote_mq.c
View file @
f6922d86
...
...
@@ -387,7 +387,7 @@ if (debug) printf("Before remtrans_init\n");
errh_SetStatus
(
PWR__SRVTERM
);
exit
(
0
);
}
aproc_TimeStamp
();
aproc_TimeStamp
(
TIME_INCR
,
5
);
RemoteSleep
(
TIME_INCR
);
time_since_scan
+=
TIME_INCR
;
...
...
remote/exe/rs_remote_tcpip/src/rs_remote_tcpip.c
View file @
f6922d86
...
...
@@ -791,7 +791,7 @@ int main(int argc, char *argv[])
/* Timestamp */
aproc_TimeStamp
();
aproc_TimeStamp
(
TIME_INCR
,
5
);
RemoteSleep
(
TIME_INCR
);
...
...
remote/exe/rs_remote_udpip/src/rs_remote_udpip.c
View file @
f6922d86
...
...
@@ -651,7 +651,7 @@ int main(int argc, char *argv[])
/* Timestamp */
aproc_TimeStamp
();
aproc_TimeStamp
(
TIME_INCR
,
5
);
RemoteSleep
(
TIME_INCR
);
...
...
remote/exe/rs_remotehandler/src/rs_remotehandler.c
View file @
f6922d86
...
...
@@ -445,7 +445,7 @@ int main()
do
{
if
(
!
hotswap
)
errh_SetStatus
(
PWR__SRUN
);
aproc_TimeStamp
();
aproc_TimeStamp
(
0
.
1
,
5
);
get
.
maxSize
=
sizeof
(
mp
);
get
.
data
=
mp
;
qcom_Get
(
&
status
,
&
qid
,
&
get
,
100
);
// TMO == 100 ms
...
...
sev/exe/sev_server/src/sev_server.cpp
View file @
f6922d86
...
...
@@ -495,7 +495,7 @@ int sev_server::check_histitems( sev_sMsgHistItems *msg, unsigned int size)
if
(
msg
->
Items
[
i
].
attrnum
>
1
)
{
//printf( "Received: %s.%s AttrNum:%d\n", msg->Items[i].oname, msg->Items[i].attr[0].aname, msg->Items[i].attrnum);
sev_sHistItem
*
buffP
=
&
msg
->
Items
[
i
];
while
(
buffP
<
&
msg
->
Items
[
item_cnt
-
1
])
{
while
(
buffP
<
&
msg
->
Items
[
item_cnt
])
{
//for(size_t j = 0; j < buffP->attrnum; j++) {
// printf( "Received: %s.%s\n", buffP->oname, buffP->attr[j].aname);
//}
...
...
src/doc/prm/src/ra_advappl.cpp
View file @
f6922d86
...
...
@@ -105,7 +105,7 @@ void MyAppl::close()
void
MyAppl
::
scan
()
{
aproc_TimeStamp
(
);
aproc_TimeStamp
(
scantime
(),
1
);
// Do something
}
...
...
@@ -133,7 +133,7 @@ int main()
exit
(
0
);
}
aproc_TimeStamp
();
aproc_TimeStamp
(
appl
.
scantime
(),
1
);
errh_SetStatus
(
PWR__ARUN
);
first_scan
=
true
;
...
...
src/exe/rt_bck/src/rt_bck.c
View file @
f6922d86
...
...
@@ -793,6 +793,8 @@ bck_file_process (
backup_confp
->
BytesFast
=
wrtblk
->
cyclehead
.
length
;
backup_confp
->
SegFast
=
wrtblk
->
cyclehead
.
segments
;
backup_confp
->
ObjTimeFast
=
wrtblk
->
cyclehead
.
objtime
;
aproc_TimeStamp
(
((
float
)
backup_confp
->
CycleFast
)
/
10
,
30
);
}
else
{
backup_confp
->
CntSlow
++
;
...
...
@@ -801,7 +803,6 @@ bck_file_process (
backup_confp
->
ObjTimeSlow
=
wrtblk
->
cyclehead
.
objtime
;
}
aproc_TimeStamp
();
/* Signal bck_write_done */
...
...
@@ -1456,6 +1457,8 @@ pwr_tUInt32 bck_init ()
UNLOCK
;
if
(
EVEN
(
sts
))
return
sts
;
aproc_TimeStamp
(
((
float
)
backup_confp
->
CycleFast
)
/
10
,
30
);
/* Activate the disk process
Activate the fast and slow cycle processes */
...
...
@@ -1535,8 +1538,6 @@ int main( int argc, char *argv[])
sts
=
gdh_Init
(
"pwr_bck"
);
if
(
EVEN
(
sts
))
return
sts
;
aproc_TimeStamp
();
sts
=
bck_init
();
if
(
EVEN
(
sts
))
{
errh_Fatal
(
"Initialization error, %m"
,
sts
);
...
...
src/exe/rt_elog/src/os_linux/rt_elog.c
View file @
f6922d86
...
...
@@ -145,7 +145,7 @@ main ()
qcom_Free
(
&
sts
,
get
.
data
);
}
aproc_TimeStamp
();
aproc_TimeStamp
(
lHelCB
.
ScanTime
,
5
.
0
);
}
}
...
...
src/exe/rt_elog/src/os_macos/rt_elog.c
View file @
f6922d86
...
...
@@ -145,7 +145,7 @@ main ()
qcom_Free
(
&
sts
,
get
.
data
);
}
aproc_TimeStamp
();
aproc_TimeStamp
(
lHelCB
.
ScanTime
,
5
.
0
);
}
}
...
...
src/exe/rt_emon/src/rt_emon.c
View file @
f6922d86
...
...
@@ -3400,7 +3400,7 @@ receive (
tmo
=
MIN
(
l
.
timerTime
*
1000
,
tmo
);
}
}
aproc_TimeStamp
();
aproc_TimeStamp
(
((
float
)
tmo
)
/
1000
,
2
);
}
}
...
...
src/exe/rt_fast/src/rt_fast.cpp
View file @
f6922d86
...
...
@@ -410,7 +410,7 @@ void rt_fast::close()
void
rt_fast
::
scan
()
{
aproc_TimeStamp
();
aproc_TimeStamp
(
scantime
(),
5
);
for
(
int
i
=
0
;
i
<
(
int
)
objects
.
size
();
i
++
)
objects
[
i
]
->
scan
();
...
...
@@ -476,7 +476,7 @@ int main()
exit
(
0
);
}
aproc_TimeStamp
();
aproc_TimeStamp
(
fast
.
scantime
(),
5
);
errh_SetStatus
(
PWR__SRUN
);
first_scan
=
true
;
...
...
src/exe/rt_io_comm/src/rt_io_comm.c
View file @
f6922d86
...
...
@@ -148,7 +148,7 @@ int main (int argc, char **argv)
if
(
delay_action
==
2
)
ihp
->
IOReadWriteFlag
=
FALSE
;
aproc_TimeStamp
();
aproc_TimeStamp
(
ihp
->
CycleTimeBus
,
5
);
}
else
{
ini_mEvent
new_event
;
qcom_sEvent
*
ep
=
(
qcom_sEvent
*
)
get
.
data
;
...
...
src/exe/rt_linksup/src/rt_linksup.c
View file @
f6922d86
...
...
@@ -157,7 +157,7 @@ int main (int argc, char ** argv)
}
qcom_Free
(
&
sts
,
get
.
data
);
}
aproc_TimeStamp
();
aproc_TimeStamp
(
((
float
)
cTimerTimeScan
)
/
1000
,
5
);
}
}
...
...
src/exe/rt_statussrv/src/rt_statussrv.cpp
View file @
f6922d86
...
...
@@ -236,7 +236,7 @@ static void *statussrv_cyclic( void *arg)
for
(;;)
{
time_GetTime
(
&
current_time
);
aproc_TimeStamp
();
aproc_TimeStamp
(
((
float
)
tmo
)
/
1000
,
5
);
get
.
maxSize
=
sizeof
(
mp
);
get
.
data
=
mp
;
...
...
src/exe/rt_sysmon/src/rt_sysmon.cpp
View file @
f6922d86
...
...
@@ -160,7 +160,7 @@ void rt_sysmon::scan()
pwr_tStatus
osts
,
sts
;
errh_eSeverity
severity
,
oseverity
;
aproc_TimeStamp
();
aproc_TimeStamp
(
scantime
(),
5
);
// Find most severe status
sts
=
PWR__SRUN
;
...
...
@@ -237,7 +237,7 @@ int main()
exit
(
0
);
}
aproc_TimeStamp
();
aproc_TimeStamp
(
sysmon
.
scantime
(),
5
);
errh_SetStatus
(
PWR__SRUN
);
first_scan
=
true
;
...
...
src/exe/rt_tmon/src/rt_tmon.c
View file @
f6922d86
...
...
@@ -275,6 +275,8 @@ main (
}
#if defined OS_LINUX || defined OS_MACOS
aproc_TimeStamp
(
((
float
)
tmo_ms
)
/
1000
,
5
);
get
.
data
=
NULL
;
qcom_Get
(
&
sts
,
&
my_q
,
&
get
,
tmo_ms
);
if
(
sts
!=
QCOM__TMO
&&
sts
!=
QCOM__QEMPTY
)
{
...
...
@@ -285,8 +287,6 @@ main (
}
#endif
aproc_TimeStamp
();
now_clock
=
time_Clock
(
NULL
,
NULL
);
if
(
now_clock
<
last_clock
)
{
errh_Info
(
"The uptime clock has wrapped"
);
...
...
src/exe/rt_trend/src/rt_trend.c
View file @
f6922d86
...
...
@@ -154,7 +154,7 @@ int main (int argc, char **argv)
ScanDeltaTime
.
tv_sec
=
ScanTime
;
ScanDeltaTime
.
tv_nsec
=
0
;
aproc_TimeStamp
();
aproc_TimeStamp
(
ScanTime
,
5
.
0
);
errh_SetStatus
(
PWR__SRUN
);
for
(;;)
{
...
...
@@ -198,7 +198,7 @@ int main (int argc, char **argv)
LastScan
=
NextScan
;
aproc_TimeStamp
();
aproc_TimeStamp
(
ScanTime
,
5
.
0
);
}
return
1
;
...
...
src/lib/rt/src/rt_appl.cpp
View file @
f6922d86
...
...
@@ -107,7 +107,7 @@ void rt_appl::mainloop()
exit
(
0
);
}
aproc_TimeStamp
();
aproc_TimeStamp
(
m_scantime
,
m_maxdelay
);
errh_SetStatus
(
PWR__ARUN
);
first_scan
=
true
;
...
...
@@ -121,7 +121,7 @@ void rt_appl::mainloop()
qcom_Get
(
&
sts
,
&
m_qid
,
&
get
,
tmo
);
if
(
sts
==
QCOM__TMO
||
sts
==
QCOM__QEMPTY
)
{
if
(
!
swap
)
{
aproc_TimeStamp
();
aproc_TimeStamp
(
m_scantime
,
m_maxdelay
);
scan
();
}
}
...
...
src/lib/rt/src/rt_appl.h
View file @
f6922d86
...
...
@@ -44,7 +44,7 @@ class rt_appl {
errh_eAnix
anix
,
//< Application index.
double
scantime
=
1.0
,
//< Scantime for call of the scan() function.
qcom_sQid
qid
=
qcom_cNQid
//< Qcom queue identity.
)
:
m_anix
(
anix
),
m_scantime
(
scantime
),
m_qid
(
qid
)
)
:
m_anix
(
anix
),
m_scantime
(
scantime
),
m_
maxdelay
(
5
),
m_
qid
(
qid
)
{
strcpy
(
m_name
,
name
);
}
void
init
();
...
...
@@ -79,6 +79,7 @@ class rt_appl {
private:
errh_eAnix
m_anix
;
double
m_scantime
;
double
m_maxdelay
;
qcom_sQid
m_qid
;
char
m_name
[
80
];
pwr_tOid
m_apploid
;
...
...
src/lib/rt/src/rt_aproc.c
View file @
f6922d86
...
...
@@ -52,10 +52,11 @@ pwr_tStatus aproc_RegisterObject(
return
PROC__SUCCESS
;
}
pwr_tStatus
aproc_TimeStamp
()
pwr_tStatus
aproc_TimeStamp
(
float
cycletime
,
float
maxdelay
)
{
pwr_tStatus
sts
;
pwr_tTime
t
;
pwr_tTime
t
,
tmo_time
;
pwr_tDeltaTime
dt
;
errh_eAnix
anix
=
errh_Anix
();
if
(
!
anix
)
...
...
@@ -72,7 +73,9 @@ pwr_tStatus aproc_TimeStamp()
}
time_GetTime
(
&
t
);
proc_np
->
ProcTimeStamp
[
anix
-
1
]
=
t
;
time_FloatToD
(
&
dt
,
cycletime
+
maxdelay
);
time_Aadd
(
&
tmo_time
,
&
t
,
&
dt
);
proc_np
->
ProcTimeStamp
[
anix
-
1
]
=
tmo_time
;
return
PROC__SUCCESS
;
}
...
...
src/lib/rt/src/rt_aproc.h
View file @
f6922d86
...
...
@@ -28,7 +28,7 @@ extern "C" {
#include "rt_errh.h"
pwr_tStatus
aproc_RegisterObject
(
pwr_tOid
);
pwr_tStatus
aproc_TimeStamp
();
pwr_tStatus
aproc_TimeStamp
(
float
scantime
,
float
maxdelay
);
#if defined __cplusplus
}
...
...
src/lib/rt/src/rt_c_node.c
View file @
f6922d86
...
...
@@ -47,11 +47,11 @@ pwrs_Node_Exec (
errh_eSeverity
severity
;
errh_eSeverity
system_severity
;
int
new_idx
=
-
1
;
static
float
timeout
[
40
]
=
{
0
,
0
,
0
,
0
,
3
,
5
,
5
,
0
,
60
,
5
,
5
,
5
,
5
,
0
,
0
,
20
,
0
,
5
,
5
,
5
,
5
,
5
,
5
,
5
,
5
,
5
,
5
,
5
,
5
,
5
,
5
,
5
,
5
,
5
,
5
,
5
,
5
,
5
,
5
,
5
};
static
int
supervise
[
40
]
=
{
0
,
0
,
0
,
0
,
1
,
1
,
1
,
0
,
1
,
1
,
1
,
1
,
1
,
0
,
0
,
1
,
0
,
1
,
1
,
1
,
1
,
1
,
1
,
1
,
1
,
1
,
1
,
1
,
1
,
1
,
1
,
1
,
1
,
1
,
1
,
1
,
1
,
1
,
1
,
1
};
static
int
reboot_done
=
0
;
if
(
!
np
)
{
...
...
@@ -92,10 +92,10 @@ pwrs_Node_Exec (
system_severity
=
errh_Severity
(
np
->
SystemStatus
);
time_GetTime
(
&
current_time
);
for
(
i
=
0
;
i
<
sizeof
(
np
->
ProcStatus
)
/
sizeof
(
np
->
ProcStatus
[
0
]);
i
++
)
{
if
(
np
->
ProcStatus
[
i
]
!=
0
&&
timeout
[
i
]
!=
0
.
0
)
{
time_Adiff
(
&
diff
,
&
current_time
,
&
np
->
ProcTimeStamp
[
i
]
);
if
(
np
->
ProcStatus
[
i
]
!=
0
&&
supervise
[
i
]
)
{
time_Adiff
(
&
diff
,
&
np
->
ProcTimeStamp
[
i
],
&
current_time
);
if
(
time_D
ToFloat
(
0
,
&
diff
)
>
timeout
[
i
]
)
{
if
(
time_D
comp
(
&
diff
,
0
)
<
0
)
{
if
(
errh_Severity
(
np
->
ProcStatus
[
i
])
<
errh_Severity
(
PWR__PTIMEOUT
))
np
->
ProcStatus
[
i
]
=
PWR__PTIMEOUT
;
}
...
...
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