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
2c0c533d
Commit
2c0c533d
authored
Aug 31, 2011
by
Claes Sjofors
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Profinet configurator, submodule selection implemented
parent
207e02cb
Changes
6
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
457 additions
and
16 deletions
+457
-16
profibus/lib/cow/src/cow_pn_gsdml.cpp
profibus/lib/cow/src/cow_pn_gsdml.cpp
+23
-0
profibus/lib/cow/src/cow_pn_gsdml.h
profibus/lib/cow/src/cow_pn_gsdml.h
+2
-1
profibus/lib/cow/src/cow_pn_gsdml_attrnav.cpp
profibus/lib/cow/src/cow_pn_gsdml_attrnav.cpp
+388
-13
profibus/lib/cow/src/cow_pn_gsdml_attrnav.h
profibus/lib/cow/src/cow_pn_gsdml_attrnav.h
+38
-0
profibus/lib/rt/src/rt_pn_gsdml_data.cpp
profibus/lib/rt/src/rt_pn_gsdml_data.cpp
+3
-0
profibus/lib/rt/src/rt_pn_gsdml_data.h
profibus/lib/rt/src/rt_pn_gsdml_data.h
+3
-2
No files found.
profibus/lib/cow/src/cow_pn_gsdml.cpp
View file @
2c0c533d
...
@@ -117,6 +117,7 @@ static gsdml_sTag taglist[] = {
...
@@ -117,6 +117,7 @@ static gsdml_sTag taglist[] = {
{
"ModuleItemRef"
,
gsdml_eTag_ModuleItemRef
,
gsdml_eType_
,
0
,
0
,
1
},
{
"ModuleItemRef"
,
gsdml_eTag_ModuleItemRef
,
gsdml_eType_
,
0
,
0
,
1
},
{
"VirtualSubmoduleList"
,
gsdml_eTag_VirtualSubmoduleList
,
gsdml_eType_
,
0
,
0
,
1
},
{
"VirtualSubmoduleList"
,
gsdml_eTag_VirtualSubmoduleList
,
gsdml_eType_
,
0
,
0
,
1
},
{
"VirtualSubmoduleItem"
,
gsdml_eTag_VirtualSubmoduleItem
,
gsdml_eType_
,
0
,
0
,
1
},
{
"VirtualSubmoduleItem"
,
gsdml_eTag_VirtualSubmoduleItem
,
gsdml_eType_
,
0
,
0
,
1
},
{
"SubmoduleItem"
,
gsdml_eTag_VirtualSubmoduleItem
,
gsdml_eType_
,
0
,
0
,
1
},
{
"IOData"
,
gsdml_eTag_IOData
,
gsdml_eType_
,
0
,
0
,
1
},
{
"IOData"
,
gsdml_eTag_IOData
,
gsdml_eType_
,
0
,
0
,
1
},
{
"Input"
,
gsdml_eTag_Input
,
gsdml_eType_
,
0
,
0
,
1
},
{
"Input"
,
gsdml_eTag_Input
,
gsdml_eType_
,
0
,
0
,
1
},
{
"Output"
,
gsdml_eTag_Output
,
gsdml_eType_
,
0
,
0
,
1
},
{
"Output"
,
gsdml_eTag_Output
,
gsdml_eType_
,
0
,
0
,
1
},
...
@@ -2167,6 +2168,20 @@ void *pn_gsdml::object_factory( gsdml_eTag id)
...
@@ -2167,6 +2168,20 @@ void *pn_gsdml::object_factory( gsdml_eTag id)
ro
=
o
;
ro
=
o
;
break
;
break
;
}
}
case
gsdml_eTag_SubmoduleList
:
{
gsdml_SubmoduleList
*
o
=
new
gsdml_SubmoduleList
(
this
);
void
*
p
;
if
(
(
p
=
get_object_stack
(
gsdml_eTag_ApplicationProcess
)))
((
gsdml_ApplicationProcess
*
)
p
)
->
SubmoduleList
=
o
;
else
{
error_message_line
(
"Misplaced SubmoduleList"
);
return
0
;
}
ro
=
o
;
break
;
}
case
gsdml_eTag_VirtualSubmoduleItem
:
{
case
gsdml_eTag_VirtualSubmoduleItem
:
{
gsdml_VirtualSubmoduleItem
*
o
=
new
gsdml_VirtualSubmoduleItem
(
this
);
gsdml_VirtualSubmoduleItem
*
o
=
new
gsdml_VirtualSubmoduleItem
(
this
);
current_body
=
&
o
->
Body
;
current_body
=
&
o
->
Body
;
...
@@ -4968,6 +4983,12 @@ gsdml_ModuleList::~gsdml_ModuleList()
...
@@ -4968,6 +4983,12 @@ gsdml_ModuleList::~gsdml_ModuleList()
delete
ModuleItem
[
i
];
delete
ModuleItem
[
i
];
}
}
void
gsdml_SubmoduleList
::
build
()
{
for
(
unsigned
int
i
=
0
;
i
<
SubmoduleItem
.
size
();
i
++
)
SubmoduleItem
[
i
]
->
build
();
}
gsdml_SubmoduleList
::~
gsdml_SubmoduleList
()
gsdml_SubmoduleList
::~
gsdml_SubmoduleList
()
{
{
for
(
unsigned
int
i
=
0
;
i
<
SubmoduleItem
.
size
();
i
++
)
for
(
unsigned
int
i
=
0
;
i
<
SubmoduleItem
.
size
();
i
++
)
...
@@ -5121,6 +5142,8 @@ void gsdml_ApplicationProcess::build()
...
@@ -5121,6 +5142,8 @@ void gsdml_ApplicationProcess::build()
DeviceAccessPointList
->
build
();
DeviceAccessPointList
->
build
();
if
(
ModuleList
)
if
(
ModuleList
)
ModuleList
->
build
();
ModuleList
->
build
();
if
(
SubmoduleList
)
SubmoduleList
->
build
();
if
(
ValueList
)
if
(
ValueList
)
ValueList
->
build
();
ValueList
->
build
();
if
(
ChannelDiagList
)
if
(
ChannelDiagList
)
...
...
profibus/lib/cow/src/cow_pn_gsdml.h
View file @
2c0c533d
...
@@ -850,7 +850,7 @@ typedef struct {
...
@@ -850,7 +850,7 @@ typedef struct {
gsdml_tUnsigned16
NumberOfAdditionalOutputCR
;
gsdml_tUnsigned16
NumberOfAdditionalOutputCR
;
gsdml_tUnsigned16
NumberOfAdditionalMulticastProviderCR
;
gsdml_tUnsigned16
NumberOfAdditionalMulticastProviderCR
;
gsdml_tUnsigned16
NumberOfMulticastConsumerCR
;
gsdml_tUnsigned16
NumberOfMulticastConsumerCR
;
gsdml_t
Unsigned16
PullModuleAlarmSupported
;
gsdml_t
Boolean
PullModuleAlarmSupported
;
}
gsdml_sInterfaceSubmoduleItem_ApplicationRelations
;
}
gsdml_sInterfaceSubmoduleItem_ApplicationRelations
;
class
gsdml_InterfaceSubmoduleItem_ApplicationRelations
{
class
gsdml_InterfaceSubmoduleItem_ApplicationRelations
{
...
@@ -1143,6 +1143,7 @@ class gsdml_SubmoduleList {
...
@@ -1143,6 +1143,7 @@ class gsdml_SubmoduleList {
vector
<
gsdml_VirtualSubmoduleItem
*>
SubmoduleItem
;
vector
<
gsdml_VirtualSubmoduleItem
*>
SubmoduleItem
;
pn_gsdml
*
gsdml
;
pn_gsdml
*
gsdml
;
~
gsdml_SubmoduleList
();
~
gsdml_SubmoduleList
();
void
build
();
void
print
(
int
ind
);
void
print
(
int
ind
);
};
};
...
...
profibus/lib/cow/src/cow_pn_gsdml_attrnav.cpp
View file @
2c0c533d
This diff is collapsed.
Click to expand it.
profibus/lib/cow/src/cow_pn_gsdml_attrnav.h
View file @
2c0c533d
...
@@ -88,8 +88,10 @@ typedef enum {
...
@@ -88,8 +88,10 @@ typedef enum {
attrnav_eItemType_PnPortSubmodule
,
attrnav_eItemType_PnPortSubmodule
,
attrnav_eItemType_PnSlot
,
attrnav_eItemType_PnSlot
,
attrnav_eItemType_PnSubslot
,
attrnav_eItemType_PnSubslot
,
attrnav_eItemType_PnSubslotPhys
,
attrnav_eItemType_PnModuleInfo
,
attrnav_eItemType_PnModuleInfo
,
attrnav_eItemType_PnModuleType
,
attrnav_eItemType_PnModuleType
,
attrnav_eItemType_PnSubmoduleType
,
attrnav_eItemType_PnParRecord
,
attrnav_eItemType_PnParRecord
,
attrnav_eItemType_PnParValue
,
attrnav_eItemType_PnParValue
,
attrnav_eItemType_PnParEnum
,
attrnav_eItemType_PnParEnum
,
...
@@ -332,6 +334,23 @@ class ItemPnSubslot : public ItemPn {
...
@@ -332,6 +334,23 @@ class ItemPnSubslot : public ItemPn {
int
open_children
(
GsdmlAttrNav
*
attrnav
,
double
x
,
double
y
);
int
open_children
(
GsdmlAttrNav
*
attrnav
,
double
x
,
double
y
);
};
};
//! Item for a physical subslot.
class
ItemPnSubslotPhys
:
public
ItemPn
{
public:
ItemPnSubslotPhys
(
GsdmlAttrNav
*
attrnav
,
const
char
*
item_name
,
GsdmlSubslotData
*
item_subslotdata
,
gsdml_VirtualSubmoduleItem
*
item_virtualsubmodule
,
int
item_slot_idx
,
gsdml_UseableSubmodules
*
item_us
,
brow_tNode
dest
,
flow_eDest
dest_code
);
virtual
~
ItemPnSubslotPhys
()
{}
GsdmlSubslotData
*
subslotdata
;
gsdml_VirtualSubmoduleItem
*
virtualsubmodule
;
gsdml_UseableSubmodules
*
us
;
int
slot_idx
;
int
open_children
(
GsdmlAttrNav
*
attrnav
,
double
x
,
double
y
);
};
//! Item for the DeviceAccessPoint, slot 0
//! Item for the DeviceAccessPoint, slot 0
class
ItemPnDAP
:
public
ItemPn
{
class
ItemPnDAP
:
public
ItemPn
{
public:
public:
...
@@ -419,6 +438,25 @@ class ItemPnModuleType : public ItemPn {
...
@@ -419,6 +438,25 @@ class ItemPnModuleType : public ItemPn {
int
scan
(
GsdmlAttrNav
*
attrnav
,
void
*
p
);
int
scan
(
GsdmlAttrNav
*
attrnav
,
void
*
p
);
};
};
//! Item for module type selection.
class
ItemPnSubmoduleType
:
public
ItemPn
{
public:
ItemPnSubmoduleType
(
GsdmlAttrNav
*
attrnav
,
const
char
*
item_name
,
int
item_subslot_number
,
int
item_slot_idx
,
int
item_subslot_idx
,
gsdml_UseableSubmodules
*
item_us
,
brow_tNode
dest
,
flow_eDest
dest_code
);
virtual
~
ItemPnSubmoduleType
()
{}
int
subslot_number
;
int
slot_idx
;
int
subslot_idx
;
gsdml_UseableSubmodules
*
us
;
int
old_value
;
int
first_scan
;
int
open_children
(
GsdmlAttrNav
*
attrnav
,
double
x
,
double
y
);
int
scan
(
GsdmlAttrNav
*
attrnav
,
void
*
p
);
};
//! Item for module type selection.
//! Item for module type selection.
class
ItemPnParRecord
:
public
ItemPn
{
class
ItemPnParRecord
:
public
ItemPn
{
public:
public:
...
...
profibus/lib/rt/src/rt_pn_gsdml_data.cpp
View file @
2c0c533d
...
@@ -92,6 +92,7 @@ int GsdmlSubslotData::print( ofstream& fp)
...
@@ -92,6 +92,7 @@ int GsdmlSubslotData::print( ofstream& fp)
{
{
fp
<<
fp
<<
" <Subslot SubslotNumber=
\"
"
<<
subslot_number
<<
"
\"
"
<<
endl
<<
" <Subslot SubslotNumber=
\"
"
<<
subslot_number
<<
"
\"
"
<<
endl
<<
" SubmoduleEnumNumber=
\"
"
<<
submodule_enum_number
<<
"
\"
"
<<
endl
<<
" SubmoduleIdentNumber=
\"
"
<<
submodule_ident_number
<<
"
\"
"
<<
endl
<<
" SubmoduleIdentNumber=
\"
"
<<
submodule_ident_number
<<
"
\"
"
<<
endl
<<
" IOInputLength=
\"
"
<<
io_input_length
<<
"
\"
"
<<
endl
<<
" IOInputLength=
\"
"
<<
io_input_length
<<
"
\"
"
<<
endl
<<
" IOOutputLength=
\"
"
<<
io_output_length
<<
"
\"
>"
<<
endl
;
" IOOutputLength=
\"
"
<<
io_output_length
<<
"
\"
>"
<<
endl
;
...
@@ -554,6 +555,8 @@ int GsdmlDataReader::tag_attribute( const char *name, const char *value)
...
@@ -554,6 +555,8 @@ int GsdmlDataReader::tag_attribute( const char *name, const char *value)
sscanf
(
value
,
"%u"
,
&
sd
->
subslot_number
);
sscanf
(
value
,
"%u"
,
&
sd
->
subslot_number
);
else
if
(
strcmp
(
name
,
"SubmoduleIdentNumber"
)
==
0
)
else
if
(
strcmp
(
name
,
"SubmoduleIdentNumber"
)
==
0
)
sscanf
(
value
,
"%u"
,
&
sd
->
submodule_ident_number
);
sscanf
(
value
,
"%u"
,
&
sd
->
submodule_ident_number
);
else
if
(
strcmp
(
name
,
"SubmoduleEnumNumber"
)
==
0
)
sscanf
(
value
,
"%d"
,
&
sd
->
submodule_enum_number
);
else
if
(
strcmp
(
name
,
"IOInputLength"
)
==
0
)
else
if
(
strcmp
(
name
,
"IOInputLength"
)
==
0
)
sscanf
(
value
,
"%u"
,
&
sd
->
io_input_length
);
sscanf
(
value
,
"%u"
,
&
sd
->
io_input_length
);
else
if
(
strcmp
(
name
,
"IOOutputLength"
)
==
0
)
else
if
(
strcmp
(
name
,
"IOOutputLength"
)
==
0
)
...
...
profibus/lib/rt/src/rt_pn_gsdml_data.h
View file @
2c0c533d
...
@@ -82,12 +82,13 @@ class GsdmlIOCRData {
...
@@ -82,12 +82,13 @@ class GsdmlIOCRData {
class
GsdmlSubslotData
{
class
GsdmlSubslotData
{
public:
public:
GsdmlSubslotData
()
:
subslot_number
(
0
),
subslot_idx
(
0
),
submodule_
ident
_number
(
0
),
GsdmlSubslotData
()
:
subslot_number
(
0
),
subslot_idx
(
0
),
submodule_
enum
_number
(
0
),
io_input_length
(
0
),
io_output_length
(
0
)
{}
submodule_ident_number
(
0
),
io_input_length
(
0
),
io_output_length
(
0
)
{}
vector
<
GsdmlDataRecord
*>
data_record
;
vector
<
GsdmlDataRecord
*>
data_record
;
unsigned
int
subslot_number
;
unsigned
int
subslot_number
;
unsigned
int
subslot_idx
;
unsigned
int
subslot_idx
;
unsigned
int
submodule_enum_number
;
unsigned
int
submodule_ident_number
;
unsigned
int
submodule_ident_number
;
unsigned
int
io_input_length
;
unsigned
int
io_input_length
;
unsigned
int
io_output_length
;
unsigned
int
io_output_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