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
425873de
Commit
425873de
authored
May 18, 2007
by
claes
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Added io-method IoAgentSwap
parent
87b55537
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
53 additions
and
3 deletions
+53
-3
profibus/lib/rt/src/os_linux/rt_io_m_pb_profiboard.c
profibus/lib/rt/src/os_linux/rt_io_m_pb_profiboard.c
+45
-1
profibus/lib/rt/src/os_linux/rt_io_pb_locals.h
profibus/lib/rt/src/os_linux/rt_io_pb_locals.h
+2
-1
profibus/wbl/mcomp/src/profibus.wb_load
profibus/wbl/mcomp/src/profibus.wb_load
+6
-1
No files found.
profibus/lib/rt/src/os_linux/rt_io_m_pb_profiboard.c
View file @
425873de
/*
* Proview $Id: rt_io_m_pb_profiboard.c,v 1.1
0 2007-05-07 12:19:44
claes Exp $
* Proview $Id: rt_io_m_pb_profiboard.c,v 1.1
1 2007-05-18 12:00:10
claes Exp $
* Copyright (C) 2005 SSAB Oxelsund AB.
*
* This program is free software; you can redistribute it and/or
...
...
@@ -75,6 +75,10 @@ static pwr_tStatus IoAgentClose (
io_tCtx
ctx
,
io_sAgent
*
ap
);
static
pwr_tStatus
IoAgentSwap
(
io_tCtx
ctx
,
io_sAgent
*
ap
);
...
...
@@ -742,6 +746,44 @@ static pwr_tStatus IoAgentInit (
return
IO__SUCCESS
;
}
/*----------------------------------------------------------------------------*\
Swap method for the Pb_profiboard agent
\*----------------------------------------------------------------------------*/
static
pwr_tStatus
IoAgentSwap
(
io_tCtx
ctx
,
io_sAgent
*
ap
)
{
pwr_sClass_Pb_Profiboard
*
op
;
char
DeviceName
[
64
];
io_sAgentLocal
*
local
;
if
(
ap
->
Local
==
NULL
)
{
/* Allocate area for local data structure */
ap
->
Local
=
calloc
(
1
,
sizeof
(
io_sAgentLocal
));
if
(
!
ap
->
Local
)
{
errh_Error
(
"ERROR swap init Profibus DP Master %s - %s"
,
ap
->
Name
,
"calloc"
);
return
IO__ERRINIDEVICE
;
}
local
=
(
io_sAgentLocal
*
)
ap
->
Local
;
errh_Info
(
"Swap init interface for Profibus DP Master %s"
,
ap
->
Name
);
op
=
(
pwr_sClass_Pb_Profiboard
*
)
ap
->
op
;
sprintf
(
DeviceName
,
"/dev/pbboard%u"
,
op
->
BusNumber
-
1
);
local
->
hDpsBoardDevice
=
open
(
DeviceName
,
O_RDONLY
|
O_NONBLOCK
);
if
(
local
->
hDpsBoardDevice
==
-
1
)
{
errh_Error
(
"ERROR swap init Profibus DP Master %s - %s"
,
ap
->
Name
,
"open"
);
return
IO__ERRINIDEVICE
;
}
}
return
IO__SUCCESS
;
}
/*----------------------------------------------------------------------------*\
...
...
@@ -1007,6 +1049,7 @@ static pwr_tStatus IoAgentClose (
close
(
local
->
hDpDataDevice
);
close
(
local
->
hDpsInputDataDevice
);
close
(
local
->
hDpsOutputDataDevice
);
close
(
local
->
hDpsBoardDevice
);
free
(
(
char
*
)
local
);
...
...
@@ -1023,5 +1066,6 @@ pwr_dExport pwr_BindIoMethods(Pb_Profiboard) = {
pwr_BindIoMethod
(
IoAgentRead
),
pwr_BindIoMethod
(
IoAgentWrite
),
pwr_BindIoMethod
(
IoAgentClose
),
pwr_BindIoMethod
(
IoAgentSwap
),
pwr_NullMethod
};
profibus/lib/rt/src/os_linux/rt_io_pb_locals.h
View file @
425873de
/*
* Proview $Id: rt_io_pb_locals.h,v 1.
4 2007-01-12 13:28:3
2 claes Exp $
* Proview $Id: rt_io_pb_locals.h,v 1.
5 2007-05-18 12:00:5
2 claes Exp $
* Copyright (C) 2005 SSAB Oxelsund AB.
*
* This program is free software; you can redistribute it and/or
...
...
@@ -59,6 +59,7 @@ typedef struct {
int
hDpsOutputDataDevice
;
// Handle for DP-Slave Output-Data device
unsigned
char
CurrentBoardNumber
;
int
slave_diag_requested
;
int
hDpsBoardDevice
;
// Handle for DP-Slave Output-Data device
}
io_sAgentLocal
;
typedef
struct
{
...
...
profibus/wbl/mcomp/src/profibus.wb_load
View file @
425873de
Volume Profibus $ClassVolume 0.0.250.7
Body SysBody 05-SEP-2005 17:51:40.00
Attr NextOix = "_X10
8
"
Attr NextOix = "_X10
9
"
Attr NextCix = "_X14"
Attr NextTix[0] = "_X7"
EndBody
...
...
@@ -1797,6 +1797,11 @@ Volume Profibus $ClassVolume 0.0.250.7
Attr MethodName = "Pb_Profiboard-IoAgentWrite"
EndBody
EndObject
Object IoAgentSwap $Method 109 18-MAY-2007 10:32:38.97
Body SysBody 18-MAY-2007 10:32:42.61
Attr MethodName = "Pb_Profiboard-IoAgentSwap"
EndBody
EndObject
EndObject
EndObject
EndObject
...
...
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