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
d52d7d65
Commit
d52d7d65
authored
Mar 19, 2016
by
Pavel Vainerman
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Исправления по результатам наладки
parent
19b6eeac
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
17 additions
and
16 deletions
+17
-16
libuniset2.spec
conf/libuniset2.spec
+9
-0
Makefile.am
extensions/tests/SMemoryTest/Makefile.am
+1
-1
start_fg.sh
extensions/tests/SMemoryTest/start_fg.sh
+1
-1
LogSession.h
include/LogSession.h
+0
-1
ModbusServer.h
include/modbus/ModbusServer.h
+1
-1
LogSession.cc
src/Log/LogSession.cc
+5
-12
No files found.
conf/libuniset2.spec
View file @
d52d7d65
...
@@ -495,6 +495,15 @@ mv -f %buildroot%python_sitelibdir_noarch/* %buildroot%python_sitelibdir/%oname
...
@@ -495,6 +495,15 @@ mv -f %buildroot%python_sitelibdir_noarch/* %buildroot%python_sitelibdir/%oname
* Sun Mar 20 2016 Pavel Vainerman <pv@etersoft.ru> 2.2-alt29.2
* Sun Mar 20 2016 Pavel Vainerman <pv@etersoft.ru> 2.2-alt29.2
- rebuild
- rebuild
* Sat Mar 19 2016 Pavel Vainerman <pv@altlinux.ru> 2.2-alt28.4
- test build
* Sat Mar 19 2016 Pavel Vainerman <pv@altlinux.ru> 2.2-alt28.3
- test build
* Sat Mar 19 2016 Pavel Vainerman <pv@altlinux.ru> 2.2-alt28.2
- test build
* Fri Mar 18 2016 Pavel Vainerman <pv@altlinux.ru> 2.2-alt28.1
* Fri Mar 18 2016 Pavel Vainerman <pv@altlinux.ru> 2.2-alt28.1
- test build
- test build
...
...
extensions/tests/SMemoryTest/Makefile.am
View file @
d52d7d65
...
@@ -9,7 +9,7 @@ smemory_test_CPPFLAGS = -I$(top_builddir)/include \
...
@@ -9,7 +9,7 @@ smemory_test_CPPFLAGS = -I$(top_builddir)/include \
$(SIGC_CFLAGS)
$(COMCPP_CFLAGS)
$(SIGC_CFLAGS)
$(COMCPP_CFLAGS)
smemory_test_SOURCES
=
TestProc_SK.cc TestProc.cc smemory-test.cc
smemory_test_SOURCES
=
TestProc_SK.cc TestProc.cc smemory-test.cc
BUILT_SOURCES
=
TestProc_SK.cc TestProc_SK.h
h
BUILT_SOURCES
=
TestProc_SK.cc TestProc_SK.h
TestProc_SK.cc
:
testproc.src.xml
TestProc_SK.cc
:
testproc.src.xml
# ./uniset2-codegen --ask -n TestProc --local-include --topdir $(top_builddir)/ --no-main testproc.src.xml
# ./uniset2-codegen --ask -n TestProc --local-include --topdir $(top_builddir)/ --no-main testproc.src.xml
...
...
extensions/tests/SMemoryTest/start_fg.sh
View file @
d52d7d65
...
@@ -3,7 +3,7 @@
...
@@ -3,7 +3,7 @@
START
=
uniset2-start.sh
START
=
uniset2-start.sh
${
START
}
-f
./smemory-test
--confile
./test.xml
--dlog-add-levels
level1
--localNode
LocalhostNode
\
${
START
}
-f
./smemory-test
--confile
./test.xml
--dlog-add-levels
level1
--localNode
LocalhostNode
\
--sm-log-add-levels
any
$*
--sm-run-logserver
--sm-log-add-levels
any
$*
--sm-run-logserver
--TestProc1-run-logserver
#--ulog-add-levels crit,warn,info
#--ulog-add-levels crit,warn,info
#system,level2,level8,level9
#system,level2,level8,level9
include/LogSession.h
View file @
d52d7d65
...
@@ -98,7 +98,6 @@ class LogSession
...
@@ -98,7 +98,6 @@ class LogSession
ev
::
io
io
;
ev
::
io
io
;
ev
::
timer
cmdTimer
;
ev
::
timer
cmdTimer
;
ev
::
async
asyncEvent
;
ev
::
async
asyncEvent
;
std
::
mutex
io_mutex
;
FinalSlot
slFin
;
FinalSlot
slFin
;
std
::
atomic_bool
cancelled
=
{
false
};
std
::
atomic_bool
cancelled
=
{
false
};
...
...
include/modbus/ModbusServer.h
View file @
d52d7d65
...
@@ -40,7 +40,7 @@ class ModbusServer
...
@@ -40,7 +40,7 @@ class ModbusServer
return
dlog
;
return
dlog
;
}
}
std
::
unordered_set
<
ModbusRTU
::
ModbusAddr
>
addr2vaddr
(
ModbusRTU
::
ModbusAddr
&
mbaddr
);
st
atic
st
d
::
unordered_set
<
ModbusRTU
::
ModbusAddr
>
addr2vaddr
(
ModbusRTU
::
ModbusAddr
&
mbaddr
);
/*! обработать очередное сообщение
/*! обработать очередное сообщение
\param vaddr - вектор адресов для которых принимать сообщения
\param vaddr - вектор адресов для которых принимать сообщения
...
...
src/Log/LogSession.cc
View file @
d52d7d65
...
@@ -128,7 +128,6 @@ void LogSession::terminate()
...
@@ -128,7 +128,6 @@ void LogSession::terminate()
cancelled
=
true
;
cancelled
=
true
;
{
{
std
::
unique_lock
<
std
::
mutex
>
lk2
(
io_mutex
);
io
.
stop
();
io
.
stop
();
cmdTimer
.
stop
();
cmdTimer
.
stop
();
asyncEvent
.
stop
();
asyncEvent
.
stop
();
...
@@ -156,8 +155,6 @@ void LogSession::event( ev::async& watcher, int revents )
...
@@ -156,8 +155,6 @@ void LogSession::event( ev::async& watcher, int revents )
return
;
return
;
}
}
//writeEvent(io);
std
::
unique_lock
<
std
::
mutex
>
lk
(
io_mutex
);
io
.
set
(
ev
::
READ
|
ev
::
WRITE
);
io
.
set
(
ev
::
READ
|
ev
::
WRITE
);
}
}
// ---------------------------------------------------------------------
// ---------------------------------------------------------------------
...
@@ -182,7 +179,6 @@ void LogSession::callback( ev::io& watcher, int revents )
...
@@ -182,7 +179,6 @@ void LogSession::callback( ev::io& watcher, int revents )
if
(
mylog
.
is_info
()
)
if
(
mylog
.
is_info
()
)
mylog
.
info
()
<<
peername
<<
": stop session... disconnect.."
<<
endl
;
mylog
.
info
()
<<
peername
<<
": stop session... disconnect.."
<<
endl
;
std
::
unique_lock
<
std
::
mutex
>
lk
(
io_mutex
);
io
.
stop
();
io
.
stop
();
cmdTimer
.
stop
();
cmdTimer
.
stop
();
{
{
...
@@ -235,8 +231,6 @@ void LogSession::writeEvent( ev::io& watcher )
...
@@ -235,8 +231,6 @@ void LogSession::writeEvent( ev::io& watcher )
delete
buffer
;
delete
buffer
;
}
}
std
::
unique_lock
<
std
::
mutex
>
lk1
(
io_mutex
);
if
(
logbuf
.
empty
()
)
if
(
logbuf
.
empty
()
)
io
.
set
(
ev
::
READ
);
io
.
set
(
ev
::
READ
);
else
else
...
@@ -326,9 +320,7 @@ void LogSession::readEvent( ev::io& watcher )
...
@@ -326,9 +320,7 @@ void LogSession::readEvent( ev::io& watcher )
#endif
#endif
std
::
unique_lock
<
std
::
mutex
>
lk
(
io_mutex
);
cmdTimer
.
stop
();
cmdTimer
.
stop
();
io
.
set
(
ev
::
WRITE
);
asyncEvent
.
start
();
asyncEvent
.
start
();
}
}
// --------------------------------------------------------------------------------
// --------------------------------------------------------------------------------
...
@@ -413,9 +405,11 @@ void LogSession::cmdProcessing( const string& cmdLogName, const LogServerTypes::
...
@@ -413,9 +405,11 @@ void LogSession::cmdProcessing( const string& cmdLogName, const LogServerTypes::
LogAgregator
::
printLogList
(
s
,
loglist
);
LogAgregator
::
printLogList
(
s
,
loglist
);
s
<<
"====================="
<<
endl
<<
endl
;
s
<<
"====================="
<<
endl
<<
endl
;
std
::
unique_lock
<
std
::
mutex
>
lk
(
logbuf_mutex
);
{
logbuf
.
push
(
new
UTCPCore
::
Buffer
(
s
.
str
()));
std
::
unique_lock
<
std
::
mutex
>
lk
(
logbuf_mutex
);
std
::
unique_lock
<
std
::
mutex
>
lk1
(
io_mutex
);
logbuf
.
push
(
new
UTCPCore
::
Buffer
(
s
.
str
()));
}
io
.
set
(
ev
::
WRITE
);
io
.
set
(
ev
::
WRITE
);
}
}
}
}
...
@@ -438,7 +432,6 @@ void LogSession::connectFinalSession( FinalSlot sl )
...
@@ -438,7 +432,6 @@ void LogSession::connectFinalSession( FinalSlot sl )
// ---------------------------------------------------------------------
// ---------------------------------------------------------------------
bool
LogSession
::
isAcive
()
bool
LogSession
::
isAcive
()
{
{
std
::
unique_lock
<
std
::
mutex
>
lk
(
io_mutex
);
return
io
.
is_active
();
return
io
.
is_active
();
}
}
// ---------------------------------------------------------------------
// ---------------------------------------------------------------------
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