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
f42fceca
Commit
f42fceca
authored
May 21, 2019
by
Marcus Nordenberg
Committed by
Claes Sjöfors
Mar 03, 2020
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Properly propagate emergency break to Profinet
parent
89610e70
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
20 additions
and
6 deletions
+20
-6
profibus/lib/rt/src/rt_io_m_pncontrollersoftingpnak.cpp
profibus/lib/rt/src/rt_io_m_pncontrollersoftingpnak.cpp
+20
-6
No files found.
profibus/lib/rt/src/rt_io_m_pncontrollersoftingpnak.cpp
View file @
f42fceca
...
...
@@ -64,12 +64,11 @@
#include "rt_io_pnak_locals.h"
#include "rt_pn_iface.h"
// static int count;
static
pwr_tStatus
IoAgentInit
(
io_tCtx
ctx
,
io_sAgent
*
ap
);
static
pwr_tStatus
IoAgentRead
(
io_tCtx
ctx
,
io_sAgent
*
ap
);
static
pwr_tStatus
IoAgentWrite
(
io_tCtx
ctx
,
io_sAgent
*
ap
);
static
pwr_tStatus
IoAgentClose
(
io_tCtx
ctx
,
io_sAgent
*
ap
);
static
pwr_tStatus
IoAgentSwap
(
io_tCtx
ctx
,
io_sAgent
*
ap
);
/*----------------------------------------------------------------------------*\
Init method for the Pb_profiboard agent
...
...
@@ -372,11 +371,26 @@ static pwr_tStatus IoAgentClose(io_tCtx ctx, io_sAgent* ap)
return
sts
;
}
static
pwr_tStatus
IoAgentSwap
(
io_tCtx
ctx
,
io_sAgent
*
ap
,
io_eEvent
event
)
{
switch
(
event
)
{
case
io_eEvent_EmergencyBreak
:
case
io_eEvent_IoCommEmergencyBreak
:
errh_Fatal
(
"Emergency break detected shutting down profinet"
);
IoAgentClose
(
ctx
,
ap
);
break
;
default:
break
;
}
return
IO__SUCCESS
;
}
/*----------------------------------------------------------------------------*\
Every method to be exported to the workbench should be registred here.
\*----------------------------------------------------------------------------*/
pwr_dExport
pwr_BindIoMethods
(
PnControllerSoftingPNAK
)
=
{
pwr_BindIoMethod
(
IoAgentInit
),
pwr_BindIoMethod
(
IoAgentRead
),
pwr_dExport
pwr_BindIoMethods
(
PnControllerSoftingPNAK
)
=
{
pwr_BindIoMethod
(
IoAgentInit
),
pwr_BindIoMethod
(
IoAgentRead
),
pwr_BindIoMethod
(
IoAgentWrite
),
pwr_BindIoMethod
(
IoAgentClose
),
pwr_NullMethod
};
pwr_BindIoMethod
(
IoAgentSwap
),
pwr_NullMethod
};
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