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
3dffc334
Commit
3dffc334
authored
Jun 17, 2010
by
Claes Sjofors
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Profinet editor, Phase added to network attributes
parent
734e269e
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
15 additions
and
2 deletions
+15
-2
profibus/lib/cow/src/cow_pn_gsdml_attrnav.cpp
profibus/lib/cow/src/cow_pn_gsdml_attrnav.cpp
+9
-1
profibus/lib/cow/src/cow_pn_gsdml_attrnav.h
profibus/lib/cow/src/cow_pn_gsdml_attrnav.h
+1
-0
profibus/lib/cow/src/cow_pn_gsdml_data.cpp
profibus/lib/cow/src/cow_pn_gsdml_data.cpp
+3
-0
profibus/lib/cow/src/cow_pn_gsdml_data.h
profibus/lib/cow/src/cow_pn_gsdml_data.h
+2
-1
No files found.
profibus/lib/cow/src/cow_pn_gsdml_attrnav.cpp
View file @
3dffc334
...
...
@@ -451,7 +451,7 @@ GsdmlAttrNav::GsdmlAttrNav(
parent_ctx
(
xn_parent_ctx
),
gsdml
(
xn_gsdml
),
edit_mode
(
xn_edit_mode
),
trace_started
(
0
),
message_cb
(
0
),
change_value_cb
(
0
),
device_num
(
0
),
device_item
(
0
),
device_confirm_active
(
0
),
device_read
(
0
),
viewio
(
0
),
time_ratio
(
1
),
send_clock
(
32
)
device_confirm_active
(
0
),
device_read
(
0
),
viewio
(
0
),
time_ratio
(
1
),
send_clock
(
32
)
,
phase
(
0
)
{
strcpy
(
name
,
xn_name
);
...
...
@@ -1393,12 +1393,14 @@ int GsdmlAttrNav::save( const char *filename)
dev_data
.
iocr_data
[
0
]
->
properties
=
1
;
// Class 1
dev_data
.
iocr_data
[
0
]
->
send_clock_factor
=
send_clock
;
dev_data
.
iocr_data
[
0
]
->
reduction_ratio
=
time_ratio
;
// send_time = 8 * 31.2 us * send_clock
dev_data
.
iocr_data
[
0
]
->
phase
=
phase
;
dev_data
.
iocr_data
[
0
]
->
api
=
0
;
dev_data
.
iocr_data
[
1
]
->
type
=
2
;
// Output ?
dev_data
.
iocr_data
[
1
]
->
properties
=
dev_data
.
iocr_data
[
0
]
->
properties
;
dev_data
.
iocr_data
[
1
]
->
send_clock_factor
=
dev_data
.
iocr_data
[
0
]
->
send_clock_factor
;
dev_data
.
iocr_data
[
1
]
->
reduction_ratio
=
dev_data
.
iocr_data
[
0
]
->
reduction_ratio
;
dev_data
.
iocr_data
[
1
]
->
phase
=
dev_data
.
iocr_data
[
0
]
->
phase
;
dev_data
.
iocr_data
[
1
]
->
api
=
dev_data
.
iocr_data
[
0
]
->
api
;
// Load channel diag
...
...
@@ -1579,6 +1581,7 @@ int GsdmlAttrNav::open( const char *filename)
gsdml
->
byte_order
=
dev_data
.
byte_order
;
time_ratio
=
dev_data
.
iocr_data
[
0
]
->
reduction_ratio
;
send_clock
=
dev_data
.
iocr_data
[
0
]
->
send_clock_factor
;
phase
=
dev_data
.
iocr_data
[
0
]
->
phase
;
if
(
device_num
>
0
)
{
if
(
device_num
>
gsdml
->
ApplicationProcess
->
DeviceAccessPointList
->
DeviceAccessPointItem
.
size
())
{
...
...
@@ -2409,6 +2412,11 @@ int ItemPnNetwork::open_children( GsdmlAttrNav *attrnav, double x, double y)
new
ItemPnEnumTimeRatio
(
attrnav
,
"ReductionRatio"
,
attrnav
->
device_item
->
SystemDefinedSubmoduleList
->
InterfaceSubmoduleItem
,
p
,
node
,
flow_eDest_IntoLast
);
p
=
(
void
*
)
&
attrnav
->
phase
;
new
ItemPnBase
(
attrnav
,
"Phase"
,
"LocalGsdmlAttr"
,
pwr_eType_UInt32
,
sizeof
(
pwr_tUInt32
),
0
,
0
,
p
,
0
,
node
,
flow_eDest_IntoLast
);
}
brow_SetOpen
(
node
,
attrnav_mOpen_Children
);
brow_SetAnnotPixmap
(
node
,
0
,
attrnav
->
brow
->
pixmap_openmap
);
...
...
profibus/lib/cow/src/cow_pn_gsdml_attrnav.h
View file @
3dffc334
...
...
@@ -149,6 +149,7 @@ class GsdmlAttrNav {
int
viewio
;
unsigned
int
time_ratio
;
unsigned
int
send_clock
;
unsigned
int
phase
;
GsdmlAttrNav
(
void
*
xn_parent_ctx
,
...
...
profibus/lib/cow/src/cow_pn_gsdml_data.cpp
View file @
3dffc334
...
...
@@ -113,6 +113,7 @@ int GsdmlIOCRData::print( ofstream& fp)
" Properties=
\"
"
<<
properties
<<
"
\"
"
<<
endl
<<
" SendClockFactor=
\"
"
<<
send_clock_factor
<<
"
\"
"
<<
endl
<<
" ReductionRatio=
\"
"
<<
reduction_ratio
<<
"
\"
"
<<
endl
<<
" Phase=
\"
"
<<
phase
<<
"
\"
"
<<
endl
<<
" API=
\"
"
<<
api
<<
"
\"
/>"
<<
endl
;
return
1
;
...
...
@@ -471,6 +472,8 @@ int GsdmlDataReader::tag_attribute( const char *name, const char *value)
sscanf
(
value
,
"%hu"
,
&
iod
->
send_clock_factor
);
else
if
(
strcmp
(
name
,
"ReductionRatio"
)
==
0
)
sscanf
(
value
,
"%hu"
,
&
iod
->
reduction_ratio
);
else
if
(
strcmp
(
name
,
"Phase"
)
==
0
)
sscanf
(
value
,
"%u"
,
&
iod
->
phase
);
else
if
(
strcmp
(
name
,
"API"
)
==
0
)
sscanf
(
value
,
"%u"
,
&
iod
->
api
);
break
;
...
...
profibus/lib/cow/src/cow_pn_gsdml_data.h
View file @
3dffc334
...
...
@@ -51,12 +51,13 @@ class GsdmlDataRecord {
class
GsdmlIOCRData
{
public:
GsdmlIOCRData
()
:
type
(
0
),
properties
(
0
),
send_clock_factor
(
0
),
api
(
0
)
{}
GsdmlIOCRData
()
:
type
(
0
),
properties
(
0
),
send_clock_factor
(
0
),
phase
(
0
),
api
(
0
)
{}
unsigned
short
type
;
unsigned
int
properties
;
unsigned
short
send_clock_factor
;
unsigned
short
reduction_ratio
;
unsigned
int
phase
;
unsigned
int
api
;
int
print
(
ofstream
&
fp
);
...
...
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