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
b52df9c9
Commit
b52df9c9
authored
Sep 14, 2006
by
claes
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Skip configuration at warm restart
parent
77517ceb
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
19 additions
and
4 deletions
+19
-4
profibus/lib/rt/src/os_linux/rt_io_m_pb_profiboard.c
profibus/lib/rt/src/os_linux/rt_io_m_pb_profiboard.c
+19
-4
No files found.
profibus/lib/rt/src/os_linux/rt_io_m_pb_profiboard.c
View file @
b52df9c9
/*
/*
* Proview $Id: rt_io_m_pb_profiboard.c,v 1.
3 2006-04-12 12:16:59
claes Exp $
* Proview $Id: rt_io_m_pb_profiboard.c,v 1.
4 2006-09-14 10:28:16
claes Exp $
* Copyright (C) 2005 SSAB Oxelsund AB.
* Copyright (C) 2005 SSAB Oxelsund AB.
*
*
* This program is free software; you can redistribute it and/or
* This program is free software; you can redistribute it and/or
...
@@ -268,7 +268,8 @@ static short act_param_loc(int fp,
...
@@ -268,7 +268,8 @@ static short act_param_loc(int fp,
\*----------------------------------------------------------------------------*/
\*----------------------------------------------------------------------------*/
static
pwr_tStatus
init_dp_slave
(
static
pwr_tStatus
init_dp_slave
(
io_sAgent
*
ap
,
io_sAgent
*
ap
,
pwr_tObjid
oid
pwr_tObjid
oid
,
int
restart
)
)
{
{
...
@@ -291,7 +292,11 @@ static pwr_tStatus init_dp_slave (
...
@@ -291,7 +292,11 @@ static pwr_tStatus init_dp_slave (
// Try to initialize slave, make three attempts before we give up
// Try to initialize slave, make three attempts before we give up
sts
=
PB_OK
;
for
(
i
=
0
;
i
<
3
;
i
++
)
{
for
(
i
=
0
;
i
<
3
;
i
++
)
{
if
(
!
restart
)
{
if
(
op
->
AutoConfigure
==
1
)
{
if
(
op
->
AutoConfigure
==
1
)
{
sts
=
pb_get_slave_cfg
(
local_agent
->
Pb_fp
,
sts
=
pb_get_slave_cfg
(
local_agent
->
Pb_fp
,
op
->
SlaveAddress
,
op
->
SlaveAddress
,
...
@@ -314,6 +319,7 @@ static pwr_tStatus init_dp_slave (
...
@@ -314,6 +319,7 @@ static pwr_tStatus init_dp_slave (
op
->
ConfigDataLen
,
op
->
ConfigDataLen
,
&
op
->
ConfigData
);
&
op
->
ConfigData
);
}
}
}
if
(
sts
==
PB_OK
)
{
if
(
sts
==
PB_OK
)
{
sts
=
pb_get_slave_info
(
local_agent
->
Pb_fp
,
sts
=
pb_get_slave_info
(
local_agent
->
Pb_fp
,
op
->
SlaveAddress
,
op
->
SlaveAddress
,
...
@@ -393,6 +399,12 @@ static pwr_tStatus IoAgentInit (
...
@@ -393,6 +399,12 @@ static pwr_tStatus IoAgentInit (
return
IO__SUCCESS
;
return
IO__SUCCESS
;
}
}
if
(
ctx
->
Node
->
Restarts
>
0
)
{
errh_Info
(
"Warm restart - Skipping config of Profibus DP Master %s"
,
ap
->
Name
);
op
->
Status
=
PB__NORMAL
;
// return IO__SUCCESS;
}
errh_Info
(
"Config of Profibus DP Master %s"
,
ap
->
Name
);
errh_Info
(
"Config of Profibus DP Master %s"
,
ap
->
Name
);
if
(
op
->
DisableBus
!=
1
)
{
if
(
op
->
DisableBus
!=
1
)
{
...
@@ -401,6 +413,7 @@ static pwr_tStatus IoAgentInit (
...
@@ -401,6 +413,7 @@ static pwr_tStatus IoAgentInit (
while
(
!
ok
)
{
while
(
!
ok
)
{
if
(
ctx
->
Node
->
Restarts
==
0
)
{
op
->
Status
=
PB__NOTINIT
;
op
->
Status
=
PB__NOTINIT
;
/* Initialize CMI */
/* Initialize CMI */
...
@@ -456,7 +469,7 @@ static pwr_tStatus IoAgentInit (
...
@@ -456,7 +469,7 @@ static pwr_tStatus IoAgentInit (
}
}
op
->
Status
=
PB__STOPPED
;
op
->
Status
=
PB__STOPPED
;
}
/* Loop through all slaves (traverse agent's children) and initialize them */
/* Loop through all slaves (traverse agent's children) and initialize them */
op
->
NumberSlaves
=
0
;
op
->
NumberSlaves
=
0
;
...
@@ -465,12 +478,13 @@ static pwr_tStatus IoAgentInit (
...
@@ -465,12 +478,13 @@ static pwr_tStatus IoAgentInit (
while
(
ODD
(
status
))
{
while
(
ODD
(
status
))
{
status
=
gdh_GetObjectClass
(
slave_objid
,
&
slave_class
);
status
=
gdh_GetObjectClass
(
slave_objid
,
&
slave_class
);
// printf("Found slave, class %d\n", slave_class);
// printf("Found slave, class %d\n", slave_class);
status
=
init_dp_slave
(
ap
,
slave_objid
);
status
=
init_dp_slave
(
ap
,
slave_objid
,
ctx
->
Node
->
Restarts
);
op
->
NumberSlaves
++
;
op
->
NumberSlaves
++
;
status
=
gdh_GetNextSibling
(
slave_objid
,
&
slave_objid
);
status
=
gdh_GetNextSibling
(
slave_objid
,
&
slave_objid
);
}
}
/* Move to CLEAR and OPERATE mode */
/* Move to CLEAR and OPERATE mode */
if
(
ctx
->
Node
->
Restarts
==
0
)
{
sts
=
act_param_loc
(
local
->
Pb_fp
,
op
,
DP_OP_MODE_CLEAR
);
sts
=
act_param_loc
(
local
->
Pb_fp
,
op
,
DP_OP_MODE_CLEAR
);
if
(
sts
==
PB_OK
)
{
if
(
sts
==
PB_OK
)
{
...
@@ -503,6 +517,7 @@ static pwr_tStatus IoAgentInit (
...
@@ -503,6 +517,7 @@ static pwr_tStatus IoAgentInit (
nanosleep
(
&
rqtp
,
&
rmtp
);
nanosleep
(
&
rqtp
,
&
rmtp
);
}
}
}
}
}
}
}
...
...
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