Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
O
opcua-asyncio
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
1
Merge Requests
1
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
Nikola Balog
opcua-asyncio
Commits
1f751932
Commit
1f751932
authored
Jul 18, 2020
by
oroulet
Committed by
oroulet
Jul 30, 2020
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
set MaxMessageSize to a high number instead of 0. Last version of prosys does not seem to support 0
parent
b8affcd2
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
20 additions
and
13 deletions
+20
-13
asyncua/ua/uaprotocol_hand.py
asyncua/ua/uaprotocol_hand.py
+20
-13
No files found.
asyncua/ua/uaprotocol_hand.py
View file @
1f751932
...
...
@@ -10,16 +10,24 @@ OPC_TCP_SCHEME = 'opc.tcp'
class
Hello
(
uatypes
.
FrozenClass
):
ua_types
=
(
(
'ProtocolVersion'
,
'UInt32'
),
(
'ReceiveBufferSize'
,
'UInt32'
),
(
'SendBufferSize'
,
'UInt32'
),
(
'MaxMessageSize'
,
'UInt32'
),
(
'MaxChunkCount'
,
'UInt32'
),
(
'EndpointUrl'
,
'String'
),
(
'ProtocolVersion'
,
'UInt32'
),
(
'ReceiveBufferSize'
,
'UInt32'
),
(
'SendBufferSize'
,
'UInt32'
),
(
'MaxMessageSize'
,
'UInt32'
),
(
'MaxChunkCount'
,
'UInt32'
),
(
'EndpointUrl'
,
'String'
),
)
def
__init__
(
self
):
self
.
ProtocolVersion
=
0
self
.
ReceiveBufferSize
=
2
**
32
-
1
self
.
SendBufferSize
=
2
**
32
-
1
self
.
MaxMessageSize
=
0
# No limits
self
.
MaxChunkCount
=
0
# No limits
# the following values couldbe set to 0 (meaning no limits)
# unfortunaltely many servers do not support it
# even newer version of prosys are broken
# so we set then to a high value known to work most places
self
.
ReceiveBufferSize
=
2
**
31
-
1
self
.
SendBufferSize
=
2
**
31
-
1
self
.
MaxMessageSize
=
2
**
31
-
1
self
.
MaxChunkCount
=
2
**
31
-
1
self
.
EndpointUrl
=
""
self
.
_freeze
=
True
...
...
@@ -66,7 +74,10 @@ class Header(uatypes.FrozenClass):
class
ErrorMessage
(
uatypes
.
FrozenClass
):
ua_types
=
((
'Error'
,
'StatusCode'
),
(
'Reason'
,
'String'
),)
ua_types
=
(
(
'Error'
,
'StatusCode'
),
(
'Reason'
,
'String'
),
)
def
__init__
(
self
):
self
.
Error
=
uatypes
.
StatusCode
()
...
...
@@ -163,7 +174,6 @@ class CryptographyNone:
"""
Base class for symmetric/asymmetric cryprography
"""
def
__init__
(
self
):
pass
...
...
@@ -246,9 +256,7 @@ class SecurityPolicyFactory:
Server has one certificate and private key, but needs a separate
SecurityPolicy for every client and client's certificate
"""
def
__init__
(
self
,
cls
=
SecurityPolicy
,
mode
=
auto
.
MessageSecurityMode
.
None_
,
certificate
=
None
,
private_key
=
None
,
permission_ruleset
=
None
):
def
__init__
(
self
,
cls
=
SecurityPolicy
,
mode
=
auto
.
MessageSecurityMode
.
None_
,
certificate
=
None
,
private_key
=
None
,
permission_ruleset
=
None
):
self
.
cls
=
cls
self
.
mode
=
mode
self
.
certificate
=
certificate
...
...
@@ -262,8 +270,7 @@ class SecurityPolicyFactory:
if
self
.
cls
is
SecurityPolicy
:
return
self
.
cls
()
else
:
return
self
.
cls
(
peer_certificate
,
self
.
certificate
,
self
.
private_key
,
self
.
mode
,
permission_ruleset
=
self
.
permission_ruleset
)
return
self
.
cls
(
peer_certificate
,
self
.
certificate
,
self
.
private_key
,
self
.
mode
,
permission_ruleset
=
self
.
permission_ruleset
)
class
Message
:
...
...
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