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
a32f180d
Commit
a32f180d
authored
Jun 03, 2017
by
Pavel Vainerman
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Разборка с ev::timer
parent
d48e4892
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
12 additions
and
8 deletions
+12
-8
libuniset2.spec
conf/libuniset2.spec
+3
-0
LogServer.h
include/LogServer.h
+0
-1
LogSession.h
include/LogSession.h
+1
-1
ModbusTCPSession.cc
src/Communications/Modbus/ModbusTCPSession.cc
+6
-3
LogServer.cc
src/Log/LogServer.cc
+0
-1
CommonEventLoop.cc
src/Processes/CommonEventLoop.cc
+2
-2
No files found.
conf/libuniset2.spec
View file @
a32f180d
...
...
@@ -511,6 +511,9 @@ rm -f %buildroot%_libdir/*.la
* Tue Sep 12 2017 Alexei Takaseev <taf@altlinux.org> 2.6-alt19.1
- Rebuild with poco 1.7.9
# * Sat Jun 03 2017 Pavel Vainerman <pv@altlinux.ru> 2.6-alt30
# - test build (devel)
# * Fri Jun 02 2017 Pavel Vainerman <pv@altlinux.ru> 2.6-alt29
# - test build (devel)
...
...
include/LogServer.h
View file @
a32f180d
...
...
@@ -150,7 +150,6 @@ namespace uniset
private
:
timeout_t
timeout
=
{
UniSetTimer
::
WaitUpTime
};
timeout_t
cmdTimeout
=
{
2000
};
Debug
::
type
sessLogLevel
=
{
Debug
::
NONE
};
size_t
sessMaxCount
=
{
10
};
...
...
include/LogSession.h
View file @
a32f180d
...
...
@@ -105,7 +105,7 @@ namespace uniset
void
logOnEvent
(
const
std
::
string
&
s
)
noexcept
;
timeout_t
cmdTimeout
=
{
2000
};
float
checkConnectionTime
=
{
10
.
};
// время на проверку живости соединения..(сек)
double
checkConnectionTime
=
{
10
.
};
// время на проверку живости соединения..(сек)
// Т.к. сообщений может быть ОЧЕНЬ МНОГО.. сеть медленная
// очередь будет не успевать рассасываться,
...
...
src/Communications/Modbus/ModbusTCPSession.cc
View file @
a32f180d
...
...
@@ -102,7 +102,9 @@ namespace uniset
{
sessTimeout
=
t
;
if
(
ioTimeout
.
is_active
()
)
if
(
t
<=
0
)
ioTimeout
.
stop
();
else
if
(
ioTimeout
.
is_active
()
)
ioTimeout
.
start
(
t
);
}
// -------------------------------------------------------------------------
...
...
@@ -123,7 +125,8 @@ namespace uniset
io
.
start
(
sock
->
getSocket
(),
ev
::
READ
);
ioTimeout
.
set
(
loop
);
ioTimeout
.
start
(
sessTimeout
);
if
(
sessTimeout
>
0
)
ioTimeout
.
start
(
sessTimeout
);
}
// -------------------------------------------------------------------------
bool
ModbusTCPSession
::
isActive
()
const
...
...
@@ -159,7 +162,7 @@ namespace uniset
terminate
();
}
else
else
if
(
sessTimeout
>
0
)
ioTimeout
.
start
(
sessTimeout
);
// restart timer..
}
// -------------------------------------------------------------------------
...
...
src/Log/LogServer.cc
View file @
a32f180d
...
...
@@ -70,7 +70,6 @@ namespace uniset
}
// -------------------------------------------------------------------------
LogServer
::
LogServer
()
:
timeout
(
UniSetTimer
::
WaitUpTime
),
cmdTimeout
(
2000
),
sessLogLevel
(
Debug
::
NONE
),
sock
(
nullptr
),
...
...
src/Processes/CommonEventLoop.cc
View file @
a32f180d
...
...
@@ -246,9 +246,9 @@ namespace uniset
evterm
.
start
();
evprep
.
start
();
//
делаем очень маленькое время старта
//
нам нужен "одноразовый таймер"
// т.к. нам надо просто зафиксировать, что loop начал работать
evruntimer
.
start
(
0
,
0.001
);
evruntimer
.
start
(
0
);
isrunning
=
true
;
...
...
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