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
d4c08858
Commit
d4c08858
authored
Jun 10, 2012
by
U-pluto\Claes
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'master' of 62.20.65.89:/data1/git/pwr
parents
4a587916
efa521d7
Changes
5
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
108 additions
and
8 deletions
+108
-8
profibus/changelog.txt
profibus/changelog.txt
+3
-0
profibus/exe/profinet_viewer/src/pn_viewer_pnac.cpp
profibus/exe/profinet_viewer/src/pn_viewer_pnac.cpp
+2
-0
profibus/lib/cow/src/cow_pn_gsdml_attrnav.cpp
profibus/lib/cow/src/cow_pn_gsdml_attrnav.cpp
+96
-8
profibus/lib/cow/src/cow_pn_gsdml_attrnav.h
profibus/lib/cow/src/cow_pn_gsdml_attrnav.h
+2
-0
profibus/lib/rt/src/os_linux/rt_io_m_pncontrollersoftingpnak.cpp
...s/lib/rt/src/os_linux/rt_io_m_pncontrollersoftingpnak.cpp
+5
-0
No files found.
profibus/changelog.txt
View file @
d4c08858
...
...
@@ -46,3 +46,6 @@
120102 cs profinet Profinet, set correct status on profinet device when losing connection
120120 cs profinet Profinet, IO status wasn't set properly
120227 cs profinet Profinet configurator bugfix in submodule index
120608 rk profinet Profinet configurator bugfix in submodule index
120608 rk profinet Profinet configurator bugfix in module deletion
120608 rk profinet Profinet configurator, added flexibility when changeing device type keeping same gsdml-file
profibus/exe/profinet_viewer/src/pn_viewer_pnac.cpp
View file @
d4c08858
...
...
@@ -241,6 +241,8 @@ void PnViewerPNAC::set_device_properties( unsigned char *macaddress, unsigned ch
sts
=
wait_service_con
(
local
,
0
);
}
sleep
(
3
);
pack_set_ip_settings_req
(
&
local
->
service_req_res
,
&
dev_info
);
sts
=
pnak_send_service_req_res
(
0
,
&
local
->
service_req_res
);
...
...
profibus/lib/cow/src/cow_pn_gsdml_attrnav.cpp
View file @
d4c08858
...
...
@@ -1039,6 +1039,85 @@ void GsdmlAttrNav::device_changed_ok( void *ctx, void *data)
}
void
GsdmlAttrNav
::
device_update_change
(
void
*
ctx
)
{
GsdmlAttrNav
*
attrnav
=
(
GsdmlAttrNav
*
)
ctx
;
// Get new item
attrnav
->
device_item
=
attrnav
->
gsdml
->
ApplicationProcess
->
DeviceAccessPointList
->
DeviceAccessPointItem
[
attrnav
->
device_num
-
1
];
gsdml_UseableModules
*
um
=
attrnav
->
device_item
->
UseableModules
;
// Save the enum numbers for the slots
for
(
unsigned
int
ii
=
0
;
ii
<
attrnav
->
dev_data
.
slot_data
.
size
();
ii
++
)
{
if
(
ii
==
0
)
{
attrnav
->
dev_data
.
slot_data
[
ii
]
->
slot_reset
();
attrnav
->
dev_data
.
slot_data
[
ii
]
->
module_ident_number
=
attrnav
->
device_item
->
Body
.
ModuleIdentNumber
;
continue
;
}
if
(
attrnav
->
dev_data
.
slot_data
[
ii
]
->
module_enum_number
==
0
)
{
break
;
}
for
(
unsigned
int
jj
=
0
;
jj
<
um
->
ModuleItemRef
.
size
();
jj
++
)
{
gsdml_ModuleItem
*
mi
=
(
gsdml_ModuleItem
*
)
um
->
ModuleItemRef
[
jj
]
->
Body
.
ModuleItemTarget
.
p
;
if
(
attrnav
->
dev_data
.
slot_data
[
ii
]
->
module_ident_number
==
mi
->
Body
.
ModuleIdentNumber
)
{
attrnav
->
dev_data
.
slot_data
[
ii
]
->
module_enum_number
=
jj
+
1
;
break
;
}
}
}
}
pwr_tBoolean
GsdmlAttrNav
::
device_check_change_ok
(
void
*
ctx
)
{
GsdmlAttrNav
*
attrnav
=
(
GsdmlAttrNav
*
)
ctx
;
pwr_tBoolean
found
,
check_ok
;
gsdml_UseableModules
*
um
=
attrnav
->
gsdml
->
ApplicationProcess
->
DeviceAccessPointList
->
DeviceAccessPointItem
[
attrnav
->
device_num
-
1
]
->
UseableModules
;
check_ok
=
true
;
for
(
unsigned
int
ii
=
0
;
ii
<
attrnav
->
dev_data
.
slot_data
.
size
();
ii
++
)
{
if
(
ii
==
0
)
{
continue
;
}
if
(
attrnav
->
dev_data
.
slot_data
[
ii
]
->
module_enum_number
==
0
)
{
break
;
}
found
=
FALSE
;
for
(
unsigned
int
jj
=
0
;
jj
<
um
->
ModuleItemRef
.
size
();
jj
++
)
{
if
(
um
->
ModuleItemRef
[
jj
]
->
Body
.
AllowedInSlots
.
list
&&
um
->
ModuleItemRef
[
jj
]
->
Body
.
AllowedInSlots
.
list
->
in_list
(
ii
))
{
gsdml_ModuleItem
*
mi
=
(
gsdml_ModuleItem
*
)
um
->
ModuleItemRef
[
jj
]
->
Body
.
ModuleItemTarget
.
p
;
if
(
attrnav
->
dev_data
.
slot_data
[
ii
]
->
module_ident_number
==
mi
->
Body
.
ModuleIdentNumber
)
{
found
=
TRUE
;
break
;
}
}
}
if
(
!
found
)
{
check_ok
=
FALSE
;
break
;
}
}
return
check_ok
;
}
void
GsdmlAttrNav
::
device_changed_cancel
(
void
*
ctx
,
void
*
data
)
{
long
int
old_device
=
(
long
int
)
data
;
...
...
@@ -1504,8 +1583,10 @@ int GsdmlAttrNav::save( const char *filename)
ModuleItemRef
[
dev_data
.
slot_data
[
i
]
->
module_enum_number
-
1
]
->
Body
.
ModuleItemTarget
.
p
;
dev_data
.
slot_data
[
i
]
->
module_ident_number
=
mi
->
Body
.
ModuleIdentNumber
;
}
else
else
{
dev_data
.
slot_data
[
i
]
->
module_ident_number
=
0
;
dev_data
.
slot_data
[
i
]
->
module_class
=
0
;
}
}
}
...
...
@@ -1662,6 +1743,7 @@ int GsdmlAttrNav::save( const char *filename)
}
ssd
->
api
=
vsd
->
Body
.
API
;
ssd
->
submodule_ident_number
=
vsd
->
Body
.
SubmoduleIdentNumber
;
if
(
!
vsd
->
IOData
)
continue
;
...
...
@@ -2126,6 +2208,11 @@ int ItemPnDevice::scan( GsdmlAttrNav *attrnav, void *p)
GsdmlAttrNav
::
device_changed_ok
(
attrnav
,
(
void
*
)
old_value
);
return
1
;
}
else
{
if
(
GsdmlAttrNav
::
device_check_change_ok
(
attrnav
))
{
GsdmlAttrNav
::
device_update_change
(
attrnav
);
}
else
{
attrnav
->
wow
->
DisplayQuestion
(
attrnav
,
"Device Changed"
,
"All configuration data will be lost when changing the device.
\n
"
...
...
@@ -2136,6 +2223,7 @@ int ItemPnDevice::scan( GsdmlAttrNav *attrnav, void *p)
return
1
;
}
}
}
if
(
*
(
int
*
)
p
==
0
)
strcpy
(
buf
,
"No"
);
...
...
profibus/lib/cow/src/cow_pn_gsdml_attrnav.h
View file @
d4c08858
...
...
@@ -220,6 +220,8 @@ class GsdmlAttrNav {
static
int
brow_cb
(
FlowCtx
*
ctx
,
flow_tEvent
event
);
static
void
device_changed_ok
(
void
*
ctx
,
void
*
data
);
static
void
device_changed_cancel
(
void
*
ctx
,
void
*
data
);
static
pwr_tBoolean
device_check_change_ok
(
void
*
ctx
);
static
void
device_update_change
(
void
*
ctx
);
};
class
ItemPn
{
...
...
profibus/lib/rt/src/os_linux/rt_io_m_pncontrollersoftingpnak.cpp
View file @
d4c08858
...
...
@@ -295,6 +295,11 @@ static pwr_tStatus IoAgentInit (
}
}
else
{
errh_Error
(
"Download of Profinet Device configuration failed for: %s"
,
device_vect
[
ii
]
->
device_name
);
/* Setup a dummy i/o area. Depending on exisiting channels this area needs to exist */
for
(
jj
=
0
;
jj
<
local
->
device_data
[
ii
]
->
iocr_data
.
size
();
jj
++
)
{
local
->
device_data
[
ii
]
->
iocr_data
[
jj
]
->
clean_io_data
=
(
unsigned
char
*
)
calloc
(
1
,
PROFINET_IO_DATA_MAX_LENGTH
);
}
}
}
}
...
...
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