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
Hide whitespace changes
Inline
Side-by-side
Showing
11 changed files
with
23 additions
and
20 deletions
+23
-20
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
+8
-7
UniSetActivator.cc
src/Core/UniSetActivator.cc
+1
-0
UniSetManager.cc
src/Core/UniSetManager.cc
+4
-4
UniSetObject.cc
src/Core/UniSetObject.cc
+5
-5
UniSetTypes.cc
src/Core/UniSetTypes.cc
+1
-1
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
void
TOR
::
setIn
(
size_t
num
,
long
value
)
{
// cout << getType() << "(" << myid << "): input " << num << " set " << state << endl;
for
(
auto
&&
it
:
ins
)
{
if
(
it
.
num
==
num
)
...
...
extensions/ModbusSlave/MBSlave.cc
View file @
ca13e446
...
...
@@ -823,7 +823,6 @@ namespace uniset
}
#endif
// ВНИМАНИЕ! Эта функция вызывается из основного eventLoop
// поэтому она должна быть максимально быстрой и безопасной
// иначе накроется весь обмен
...
...
include/DBServer.h
View file @
ca13e446
...
...
@@ -71,7 +71,6 @@ namespace uniset
std
::
shared_ptr
<
LogServer
>
logserv
;
std
::
string
logserv_host
=
{
""
};
int
logserv_port
=
{
0
};
const
std
::
string
prefix
=
{
"db"
};
private
:
...
...
include/UInterface.h
View file @
ca13e446
...
...
@@ -316,6 +316,9 @@ namespace uniset
CacheOfResolve
rcache
;
std
::
shared_ptr
<
uniset
::
ObjectIndex
>
oind
;
std
::
shared_ptr
<
uniset
::
Configuration
>
uconf
;
#ifndef DISABLE_REST_API
mutable
UHttp
::
UHttpClient
resolver
;
#endif
};
// -------------------------------------------------------------------------
}
// end of uniset namespace
...
...
src/Core/MessageType.cc
View file @
ca13e446
...
...
@@ -145,7 +145,7 @@ namespace uniset
type
=
Message
::
SysCommand
;
this
->
priority
=
priority
;
this
->
consumer
=
consumer
;
memset
(
data
,
0
,
sizeof
(
data
));
memset
(
data
,
0
,
sizeof
(
data
));
}
SystemMessage
::
SystemMessage
(
const
VoidMessage
*
msg
)
noexcept
:
...
...
@@ -228,11 +228,12 @@ namespace uniset
}
//--------------------------------------------------------------------------------------------
TextMessage
::
TextMessage
(
const
VoidMessage
*
vmsg
)
noexcept
:
VoidMessage
(
1
)
// dummy constructor
:
VoidMessage
(
1
)
// dummy constructor
{
assert
(
vmsg
->
type
==
Message
::
TextMessage
);
auto
m
=
static_cast
<
const
TextMessage
*>
(
vmsg
);
if
(
m
)
{
type
=
m
->
type
;
...
...
@@ -252,11 +253,11 @@ namespace uniset
}
TextMessage
::
TextMessage
(
const
char
*
msg
,
int
_mtype
,
const
uniset
::
Timespec
&
tm
,
const
::
uniset
::
ProducerInfo
&
pi
,
Priority
prior
,
ObjectId
cons
)
noexcept
int
_mtype
,
const
uniset
::
Timespec
&
tm
,
const
::
uniset
::
ProducerInfo
&
pi
,
Priority
prior
,
ObjectId
cons
)
noexcept
{
type
=
Message
::
TextMessage
;
this
->
node
=
pi
.
node
;
...
...
src/Core/UniSetActivator.cc
View file @
ca13e446
...
...
@@ -199,6 +199,7 @@ namespace uniset
return
;
active
=
false
;
if
(
termControl
)
{
set_signals
(
false
);
...
...
src/Core/UniSetManager.cc
View file @
ca13e446
...
...
@@ -37,7 +37,7 @@ using namespace uniset;
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
:
explicit
MPush
(
const
uniset
::
TransportMessage
&
msg
)
:
msg
(
msg
)
{}
...
...
@@ -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
:
explicit
OPush
(
const
uniset
::
TransportMessage
&
msg
)
:
msg
(
msg
)
{}
...
...
@@ -464,7 +464,7 @@ const std::shared_ptr<UniSetObject> UniSetManager::findObject( const string& nam
{
uniset_rwmutex_rlock
lock
(
olistMutex
);
for
(
auto
&&
o
:
olist
)
for
(
auto
&&
o
:
olist
)
{
if
(
o
->
getName
()
==
name
)
return
o
;
...
...
@@ -477,7 +477,7 @@ const std::shared_ptr<UniSetManager> UniSetManager::findManager( const string& n
{
uniset_rwmutex_rlock
lock
(
mlistMutex
);
for
(
auto
&&
m
:
mlist
)
for
(
auto
&&
m
:
mlist
)
{
if
(
m
->
getName
()
==
name
)
return
m
;
...
...
src/Core/UniSetObject.cc
View file @
ca13e446
...
...
@@ -401,11 +401,11 @@ namespace uniset
}
// ------------------------------------------------------------------------------------------
void
UniSetObject
::
pushMessage
(
const
char
*
msg
,
::
CORBA
::
Long
mtype
,
const
::
uniset
::
Timespec
&
tm
,
const
::
uniset
::
ProducerInfo
&
pi
,
::
CORBA
::
Long
priority
,
::
CORBA
::
Long
consumer
)
::
CORBA
::
Long
mtype
,
const
::
uniset
::
Timespec
&
tm
,
const
::
uniset
::
ProducerInfo
&
pi
,
::
CORBA
::
Long
priority
,
::
CORBA
::
Long
consumer
)
{
uniset
::
TextMessage
tmsg
(
msg
,
mtype
,
tm
,
pi
,
(
uniset
::
Message
::
Priority
)
priority
,
consumer
);
auto
vm
=
tmsg
.
toLocalVoidMessage
();
...
...
src/Core/UniSetTypes.cc
View file @
ca13e446
...
...
@@ -61,7 +61,7 @@ float uniset::fcalibrate( float raw, float rawMin, float rawMax,
}
// -----------------------------------------------------------------------------
double
uniset
::
dcalibrate
(
double
raw
,
double
rawMin
,
double
rawMax
,
double
calMin
,
double
calMax
,
bool
limit
)
double
calMin
,
double
calMax
,
bool
limit
)
{
if
(
rawMax
==
rawMin
)
return
0
;
// деление на 0!!!
...
...
tests/test_unixml.cc
View file @
ca13e446
...
...
@@ -97,6 +97,7 @@ TEST_CASE("UniXML::iterator", "[unixml][iterator][basic]" )
--
it
;
CHECK
(
it
.
getName
()
==
"UserData"
);
UniXML
::
iterator
it_bad
=
uxml
.
begin
();
REQUIRE_FALSE
(
it_bad
.
findName
(
"UnknownNode"
,
"NOTFOUND"
)
);
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