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
ca13e446
Commit
ca13e446
authored
Dec 09, 2020
by
Pavel Vainerman
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
make style
parent
69a42967
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
11 changed files
with
11 additions
and
8 deletions
+11
-8
IOControl.h
extensions/IOControl/IOControl.h
+0
-0
TOR.cc
extensions/LogicProcessor/TOR.cc
+0
-1
MBSlave.cc
extensions/ModbusSlave/MBSlave.cc
+0
-1
DBServer.h
include/DBServer.h
+0
-1
UInterface.h
include/UInterface.h
+3
-0
MessageType.cc
src/Core/MessageType.cc
+2
-1
UniSetActivator.cc
src/Core/UniSetActivator.cc
+1
-0
UniSetManager.cc
src/Core/UniSetManager.cc
+4
-4
UniSetObject.cc
src/Core/UniSetObject.cc
+0
-0
UniSetTypes.cc
src/Core/UniSetTypes.cc
+0
-0
test_unixml.cc
tests/test_unixml.cc
+1
-0
No files found.
extensions/IOControl/IOControl.h
View file @
ca13e446
This diff is collapsed.
Click to expand it.
extensions/LogicProcessor/TOR.cc
View file @
ca13e446
...
@@ -49,7 +49,6 @@ namespace uniset
...
@@ -49,7 +49,6 @@ namespace uniset
void
TOR
::
setIn
(
size_t
num
,
long
value
)
void
TOR
::
setIn
(
size_t
num
,
long
value
)
{
{
// cout << getType() << "(" << myid << "): input " << num << " set " << state << endl;
// cout << getType() << "(" << myid << "): input " << num << " set " << state << endl;
for
(
auto
&&
it
:
ins
)
for
(
auto
&&
it
:
ins
)
{
{
if
(
it
.
num
==
num
)
if
(
it
.
num
==
num
)
...
...
extensions/ModbusSlave/MBSlave.cc
View file @
ca13e446
...
@@ -823,7 +823,6 @@ namespace uniset
...
@@ -823,7 +823,6 @@ namespace uniset
}
}
#endif
#endif
// ВНИМАНИЕ! Эта функция вызывается из основного eventLoop
// ВНИМАНИЕ! Эта функция вызывается из основного eventLoop
// поэтому она должна быть максимально быстрой и безопасной
// поэтому она должна быть максимально быстрой и безопасной
// иначе накроется весь обмен
// иначе накроется весь обмен
...
...
include/DBServer.h
View file @
ca13e446
...
@@ -71,7 +71,6 @@ namespace uniset
...
@@ -71,7 +71,6 @@ namespace uniset
std
::
shared_ptr
<
LogServer
>
logserv
;
std
::
shared_ptr
<
LogServer
>
logserv
;
std
::
string
logserv_host
=
{
""
};
std
::
string
logserv_host
=
{
""
};
int
logserv_port
=
{
0
};
int
logserv_port
=
{
0
};
const
std
::
string
prefix
=
{
"db"
};
const
std
::
string
prefix
=
{
"db"
};
private
:
private
:
...
...
include/UInterface.h
View file @
ca13e446
...
@@ -316,6 +316,9 @@ namespace uniset
...
@@ -316,6 +316,9 @@ namespace uniset
CacheOfResolve
rcache
;
CacheOfResolve
rcache
;
std
::
shared_ptr
<
uniset
::
ObjectIndex
>
oind
;
std
::
shared_ptr
<
uniset
::
ObjectIndex
>
oind
;
std
::
shared_ptr
<
uniset
::
Configuration
>
uconf
;
std
::
shared_ptr
<
uniset
::
Configuration
>
uconf
;
#ifndef DISABLE_REST_API
mutable
UHttp
::
UHttpClient
resolver
;
#endif
};
};
// -------------------------------------------------------------------------
// -------------------------------------------------------------------------
}
// end of uniset namespace
}
// end of uniset namespace
...
...
src/Core/MessageType.cc
View file @
ca13e446
...
@@ -145,7 +145,7 @@ namespace uniset
...
@@ -145,7 +145,7 @@ namespace uniset
type
=
Message
::
SysCommand
;
type
=
Message
::
SysCommand
;
this
->
priority
=
priority
;
this
->
priority
=
priority
;
this
->
consumer
=
consumer
;
this
->
consumer
=
consumer
;
memset
(
data
,
0
,
sizeof
(
data
));
memset
(
data
,
0
,
sizeof
(
data
));
}
}
SystemMessage
::
SystemMessage
(
const
VoidMessage
*
msg
)
noexcept
:
SystemMessage
::
SystemMessage
(
const
VoidMessage
*
msg
)
noexcept
:
...
@@ -233,6 +233,7 @@ namespace uniset
...
@@ -233,6 +233,7 @@ namespace uniset
assert
(
vmsg
->
type
==
Message
::
TextMessage
);
assert
(
vmsg
->
type
==
Message
::
TextMessage
);
auto
m
=
static_cast
<
const
TextMessage
*>
(
vmsg
);
auto
m
=
static_cast
<
const
TextMessage
*>
(
vmsg
);
if
(
m
)
if
(
m
)
{
{
type
=
m
->
type
;
type
=
m
->
type
;
...
...
src/Core/UniSetActivator.cc
View file @
ca13e446
...
@@ -199,6 +199,7 @@ namespace uniset
...
@@ -199,6 +199,7 @@ namespace uniset
return
;
return
;
active
=
false
;
active
=
false
;
if
(
termControl
)
if
(
termControl
)
{
{
set_signals
(
false
);
set_signals
(
false
);
...
...
src/Core/UniSetManager.cc
View file @
ca13e446
...
@@ -37,7 +37,7 @@ using namespace uniset;
...
@@ -37,7 +37,7 @@ using namespace uniset;
using
namespace
std
;
using
namespace
std
;
// ------------------------------------------------------------------------------------------
// ------------------------------------------------------------------------------------------
// объект-функция для посылки сообщения менеджеру
// объект-функция для посылки сообщения менеджеру
class
MPush
:
public
unary_function
<
const
std
::
shared_ptr
<
uniset
::
UniSetManager
>&
,
bool
>
class
MPush
:
public
unary_function
<
const
std
::
shared_ptr
<
uniset
::
UniSetManager
>&
,
bool
>
{
{
public
:
public
:
explicit
MPush
(
const
uniset
::
TransportMessage
&
msg
)
:
msg
(
msg
)
{}
explicit
MPush
(
const
uniset
::
TransportMessage
&
msg
)
:
msg
(
msg
)
{}
...
@@ -63,7 +63,7 @@ class MPush: public unary_function< const std::shared_ptr<uniset::UniSetManager>
...
@@ -63,7 +63,7 @@ class MPush: public unary_function< const std::shared_ptr<uniset::UniSetManager>
};
};
// объект-функция для посылки сообщения объекту
// объект-функция для посылки сообщения объекту
class
OPush
:
public
unary_function
<
const
std
::
shared_ptr
<
uniset
::
UniSetObject
>&
,
bool
>
class
OPush
:
public
unary_function
<
const
std
::
shared_ptr
<
uniset
::
UniSetObject
>&
,
bool
>
{
{
public
:
public
:
explicit
OPush
(
const
uniset
::
TransportMessage
&
msg
)
:
msg
(
msg
)
{}
explicit
OPush
(
const
uniset
::
TransportMessage
&
msg
)
:
msg
(
msg
)
{}
...
@@ -464,7 +464,7 @@ const std::shared_ptr<UniSetObject> UniSetManager::findObject( const string& nam
...
@@ -464,7 +464,7 @@ const std::shared_ptr<UniSetObject> UniSetManager::findObject( const string& nam
{
{
uniset_rwmutex_rlock
lock
(
olistMutex
);
uniset_rwmutex_rlock
lock
(
olistMutex
);
for
(
auto
&&
o
:
olist
)
for
(
auto
&&
o
:
olist
)
{
{
if
(
o
->
getName
()
==
name
)
if
(
o
->
getName
()
==
name
)
return
o
;
return
o
;
...
@@ -477,7 +477,7 @@ const std::shared_ptr<UniSetManager> UniSetManager::findManager( const string& n
...
@@ -477,7 +477,7 @@ const std::shared_ptr<UniSetManager> UniSetManager::findManager( const string& n
{
{
uniset_rwmutex_rlock
lock
(
mlistMutex
);
uniset_rwmutex_rlock
lock
(
mlistMutex
);
for
(
auto
&&
m
:
mlist
)
for
(
auto
&&
m
:
mlist
)
{
{
if
(
m
->
getName
()
==
name
)
if
(
m
->
getName
()
==
name
)
return
m
;
return
m
;
...
...
src/Core/UniSetObject.cc
View file @
ca13e446
src/Core/UniSetTypes.cc
View file @
ca13e446
tests/test_unixml.cc
View file @
ca13e446
...
@@ -97,6 +97,7 @@ TEST_CASE("UniXML::iterator", "[unixml][iterator][basic]" )
...
@@ -97,6 +97,7 @@ TEST_CASE("UniXML::iterator", "[unixml][iterator][basic]" )
--
it
;
--
it
;
CHECK
(
it
.
getName
()
==
"UserData"
);
CHECK
(
it
.
getName
()
==
"UserData"
);
UniXML
::
iterator
it_bad
=
uxml
.
begin
();
UniXML
::
iterator
it_bad
=
uxml
.
begin
();
REQUIRE_FALSE
(
it_bad
.
findName
(
"UnknownNode"
,
"NOTFOUND"
)
);
REQUIRE_FALSE
(
it_bad
.
findName
(
"UnknownNode"
,
"NOTFOUND"
)
);
REQUIRE_FALSE
(
!
it_bad
);
REQUIRE_FALSE
(
!
it_bad
);
...
...
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