Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
U
uniset2
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
1
Issues
1
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
UniSet project repositories
uniset2
Commits
9cd6dc01
Commit
9cd6dc01
authored
Jul 12, 2021
by
Pavel Vainerman
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
new release
parent
96f6e5d8
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
20 additions
and
8 deletions
+20
-8
libuniset2.spec
conf/libuniset2.spec
+4
-1
configure.ac
configure.ac
+2
-2
UDPPacket.h
extensions/UNetUDP/UDPPacket.h
+3
-3
UNetSender.cc
extensions/UNetUDP/UNetSender.cc
+2
-2
test_unetudp.cc
extensions/UNetUDP/tests/test_unetudp.cc
+9
-0
No files found.
conf/libuniset2.spec
View file @
9cd6dc01
...
...
@@ -25,7 +25,7 @@
%define oname uniset2
Name: libuniset2
Version: 2.1
2.2
Version: 2.1
3.1
Release: alt1
Summary: UniSet - library for building distributed industrial control systems
...
...
@@ -594,6 +594,9 @@ rm -f %buildroot%_docdir/%oname/html/*.md5
# history of current unpublished changes
%changelog
* Mon Jul 12 2021 Pavel Vainerman <pv@altlinux.ru> 2.13.1-alt1
- [unet]: zero-copy optimization
* Wed Jul 07 2021 Pavel Vainerman <pv@altlinux.ru> 2.12.2-alt1
- [unet]: multicast config params refactoring
...
...
configure.ac
View file @
9cd6dc01
...
...
@@ -3,10 +3,10 @@
# See doc: http://www.gnu.org/software/hello/manual/autoconf/Generic-Programs.html
# AC_PREREQ(2.59)
AC_INIT([uniset2], [2.1
2.2
], pv@etersoft.ru)
AC_INIT([uniset2], [2.1
3.1
], pv@etersoft.ru)
AM_INIT_AUTOMAKE([subdir-objects])
LIBVER=1
4:2:12
LIBVER=1
5:1:13
AC_SUBST(LIBVER)
# AC_CONFIG_MACRO_DIR([m4])
...
...
extensions/UNetUDP/UDPPacket.h
View file @
9cd6dc01
...
...
@@ -79,10 +79,10 @@ namespace uniset
// Теоретический размер данных в UDP пакете (исключая заголовки) 65507
// Фактически желательно не вылезать за размер MTU (обычно 1500) - заголовки = 1432 байта
// т.е. надо чтобы sizeof(UDPPacket) < 1432
//
При текущих настройках sizeof(UDPPacket) = 56421 (!)
//
static
const
size_t
MaxACount
=
2000
;
static
const
size_t
MaxDCount
=
3
000
;
static
const
size_t
MaxDDataCount
=
1
+
MaxDCount
/
8
*
sizeof
(
uint8_t
);
static
const
size_t
MaxDCount
=
4
000
;
static
const
size_t
MaxDDataCount
=
1
+
MaxDCount
/
(
8
*
sizeof
(
uint8_t
)
);
struct
UDPMessage
{
...
...
extensions/UNetUDP/UNetSender.cc
View file @
9cd6dc01
...
...
@@ -315,11 +315,11 @@ namespace uniset
}
catch
(
Poco
::
Net
::
NetException
&
ex
)
{
unetcrit
<<
myname
<<
"(real_send): error: "
<<
ex
.
displayText
()
<<
endl
;
unetcrit
<<
myname
<<
"(real_send):
sz="
<<
sizeof
(
mypack
.
msg
)
<<
"
error: "
<<
ex
.
displayText
()
<<
endl
;
}
catch
(
std
::
exception
&
ex
)
{
unetcrit
<<
myname
<<
"(real_send): error: "
<<
ex
.
what
()
<<
endl
;
unetcrit
<<
myname
<<
"(real_send):
sz="
<<
sizeof
(
mypack
.
msg
)
<<
"
error: "
<<
ex
.
what
()
<<
endl
;
}
}
// -----------------------------------------------------------------------------
...
...
extensions/UNetUDP/tests/test_unetudp.cc
View file @
9cd6dc01
...
...
@@ -98,6 +98,15 @@ TEST_CASE("[UNetUDP]: repack", "[unetudp][udp][repack]")
{
UniSetUDP
::
UDPMessage
pack
;
cerr
<<
"UniSetUDP::UDPMessage size: "
<<
sizeof
(
UniSetUDP
::
UDPMessage
)
<<
" [MaxACount="
<<
UniSetUDP
::
MaxACount
<<
" MaxDCount="
<<
UniSetUDP
::
MaxDCount
<<
"]"
<<
endl
;
REQUIRE
(
sizeof
(
UniSetUDP
::
UDPMessage
)
<
65507
);
// UDP packet
pack
.
header
.
nodeID
=
100
;
pack
.
header
.
procID
=
100
;
pack
.
header
.
num
=
1
;
...
...
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