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
26cd3135
Commit
26cd3135
authored
Sep 06, 2011
by
Claes Sjofors
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Profinet Subslot API added
parent
1d491e3e
Changes
4
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
36 additions
and
16 deletions
+36
-16
profibus/lib/cow/src/cow_pn_gsdml_attrnav.cpp
profibus/lib/cow/src/cow_pn_gsdml_attrnav.cpp
+4
-0
profibus/lib/rt/src/os_linux/rt_pn_iface.cpp
profibus/lib/rt/src/os_linux/rt_pn_iface.cpp
+27
-15
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
+2
-1
No files found.
profibus/lib/cow/src/cow_pn_gsdml_attrnav.cpp
View file @
26cd3135
...
...
@@ -1577,6 +1577,8 @@ int GsdmlAttrNav::save( const char *filename)
continue
;
}
ssd
->
api
=
vsd
->
Body
.
API
;
if
(
!
vsd
->
IOData
)
continue
;
...
...
@@ -1656,6 +1658,8 @@ int GsdmlAttrNav::save( const char *filename)
continue
;
}
ssd
->
api
=
vsd
->
Body
.
API
;
if
(
!
vsd
->
IOData
)
continue
;
...
...
profibus/lib/rt/src/os_linux/rt_pn_iface.cpp
View file @
26cd3135
...
...
@@ -400,7 +400,6 @@ void pack_download_req(T_PNAK_SERVICE_REQ_RES *ServiceReqRes, GsdmlDeviceData *d
(
num_iocrs
*
num_apis
+
num_modules
+
num_datarecords
)
*
sizeof
(
T_PN_REFERENCE
)
+
data_record_length
;
service_desc
->
DataLength
=
length
;
pData
=
(
char
*
)
(
service_desc
+
1
);
...
...
@@ -708,10 +707,14 @@ void pack_download_req(T_PNAK_SERVICE_REQ_RES *ServiceReqRes, GsdmlDeviceData *d
pDataRecord
->
VersionLowByte
=
pSDR
->
VersionLowByte
;
pDataRecord
->
SequenceHighByte
=
_PN_U16_HIGH_BYTE
(
dev_data
->
slot_data
[
ii
]
->
subslot_data
[
jj
]
->
data_record
[
kk
]
->
transfer_sequence
);
pDataRecord
->
SequenceLowByte
=
_PN_U16_LOW_BYTE
(
dev_data
->
slot_data
[
ii
]
->
subslot_data
[
jj
]
->
data_record
[
kk
]
->
transfer_sequence
);
pDataRecord
->
APIHighWordHighByte
=
_PN_U32_HIGH_HIGH_BYTE
(
PROFINET_DEFAULT_API
);
pDataRecord
->
APIHighWordLowByte
=
_PN_U32_HIGH_LOW_BYTE
(
PROFINET_DEFAULT_API
);
pDataRecord
->
APILowWordHighByte
=
_PN_U32_LOW_HIGH_BYTE
(
PROFINET_DEFAULT_API
);
pDataRecord
->
APILowWordLowByte
=
_PN_U32_LOW_LOW_BYTE
(
PROFINET_DEFAULT_API
);
pDataRecord
->
APIHighWordHighByte
=
_PN_U32_HIGH_HIGH_BYTE
(
dev_data
->
slot_data
[
ii
]
->
subslot_data
[
jj
]
->
api
);
pDataRecord
->
APIHighWordLowByte
=
_PN_U32_HIGH_LOW_BYTE
(
dev_data
->
slot_data
[
ii
]
->
subslot_data
[
jj
]
->
api
);
pDataRecord
->
APILowWordHighByte
=
_PN_U32_LOW_HIGH_BYTE
(
dev_data
->
slot_data
[
ii
]
->
subslot_data
[
jj
]
->
api
);
pDataRecord
->
APILowWordLowByte
=
_PN_U32_LOW_LOW_BYTE
(
dev_data
->
slot_data
[
ii
]
->
subslot_data
[
jj
]
->
api
);
// pDataRecord->APIHighWordHighByte = _PN_U32_HIGH_HIGH_BYTE(PROFINET_DEFAULT_API);
// pDataRecord->APIHighWordLowByte = _PN_U32_HIGH_LOW_BYTE(PROFINET_DEFAULT_API);
// pDataRecord->APILowWordHighByte = _PN_U32_LOW_HIGH_BYTE(PROFINET_DEFAULT_API);
// pDataRecord->APILowWordLowByte = _PN_U32_LOW_LOW_BYTE(PROFINET_DEFAULT_API);
pDataRecord
->
IndexHighByte
=
_PN_U16_HIGH_BYTE
(
dev_data
->
slot_data
[
ii
]
->
subslot_data
[
jj
]
->
data_record
[
kk
]
->
index
);
pDataRecord
->
IndexLowByte
=
_PN_U16_LOW_BYTE
(
dev_data
->
slot_data
[
ii
]
->
subslot_data
[
jj
]
->
data_record
[
kk
]
->
index
);
pDataRecord
->
LengthHighByte
=
_PN_U16_HIGH_BYTE
(
dev_data
->
slot_data
[
ii
]
->
subslot_data
[
jj
]
->
data_record
[
kk
]
->
data_length
);
...
...
@@ -720,12 +723,21 @@ void pack_download_req(T_PNAK_SERVICE_REQ_RES *ServiceReqRes, GsdmlDeviceData *d
pData
=
(
char
*
)
(
pDataRecord
+
1
);
memcpy
(
pData
,
dev_data
->
slot_data
[
ii
]
->
subslot_data
[
jj
]
->
data_record
[
kk
]
->
data
,
dev_data
->
slot_data
[
ii
]
->
subslot_data
[
jj
]
->
data_record
[
kk
]
->
data_length
);
pData
+=
dev_data
->
slot_data
[
ii
]
->
subslot_data
[
jj
]
->
data_record
[
kk
]
->
data_length
;
/* if (((dev_data->slot_data[ii]->subslot_data[jj]->data_record[kk]->data_length % 2) > 0) &&
(kk != dev_data->slot_data[ii]->subslot_data[jj]->data_record.size() - 1)) {
length++;
pData++;
} */
pDataRecord
=
(
T_PN_DATA_RECORD
*
)
pData
;
}
}
}
/* if (device_ref != 0) {
service_desc
->
DataLength
=
length
;
if
(
device_ref
!=
0
)
{
pData
=
(
char
*
)
(
pSDR
);
printf
(
"Download of device: %s
\n
"
,
dev_data
->
device_name
);
...
...
@@ -736,7 +748,7 @@ void pack_download_req(T_PNAK_SERVICE_REQ_RES *ServiceReqRes, GsdmlDeviceData *d
}
printf
(
"
\n
"
);
printf
(
"
\n
"
);
} */
}
}
int
unpack_get_los_con
(
T_PNAK_SERVICE_DESCRIPTION
*
pSdb
,
io_sAgentLocal
*
local
)
...
...
profibus/lib/rt/src/rt_pn_gsdml_data.cpp
View file @
26cd3135
...
...
@@ -94,6 +94,7 @@ int GsdmlSubslotData::print( ofstream& fp)
" <Subslot SubslotNumber=
\"
"
<<
subslot_number
<<
"
\"
"
<<
endl
<<
" SubmoduleEnumNumber=
\"
"
<<
submodule_enum_number
<<
"
\"
"
<<
endl
<<
" SubmoduleIdentNumber=
\"
"
<<
submodule_ident_number
<<
"
\"
"
<<
endl
<<
" API=
\"
"
<<
api
<<
"
\"
"
<<
endl
<<
" IOInputLength=
\"
"
<<
io_input_length
<<
"
\"
"
<<
endl
<<
" IOOutputLength=
\"
"
<<
io_output_length
<<
"
\"
>"
<<
endl
;
...
...
@@ -555,6 +556,8 @@ int GsdmlDataReader::tag_attribute( const char *name, const char *value)
sscanf
(
value
,
"%u"
,
&
sd
->
subslot_number
);
else
if
(
strcmp
(
name
,
"SubmoduleIdentNumber"
)
==
0
)
sscanf
(
value
,
"%u"
,
&
sd
->
submodule_ident_number
);
else
if
(
strcmp
(
name
,
"API"
)
==
0
)
sscanf
(
value
,
"%u"
,
&
sd
->
api
);
else
if
(
strcmp
(
name
,
"SubmoduleEnumNumber"
)
==
0
)
sscanf
(
value
,
"%d"
,
&
sd
->
submodule_enum_number
);
else
if
(
strcmp
(
name
,
"IOInputLength"
)
==
0
)
...
...
profibus/lib/rt/src/rt_pn_gsdml_data.h
View file @
26cd3135
...
...
@@ -83,13 +83,14 @@ class GsdmlIOCRData {
class
GsdmlSubslotData
{
public:
GsdmlSubslotData
()
:
subslot_number
(
0
),
subslot_idx
(
0
),
submodule_enum_number
(
0
),
submodule_ident_number
(
0
),
io_input_length
(
0
),
io_output_length
(
0
)
{}
submodule_ident_number
(
0
),
api
(
0
),
io_input_length
(
0
),
io_output_length
(
0
)
{}
vector
<
GsdmlDataRecord
*>
data_record
;
unsigned
int
subslot_number
;
unsigned
int
subslot_idx
;
unsigned
int
submodule_enum_number
;
unsigned
int
submodule_ident_number
;
unsigned
int
api
;
unsigned
int
io_input_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