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
a7e93e3f
Commit
a7e93e3f
authored
Aug 16, 2017
by
Pavel Vainerman
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
убрал обнаруженный в h-файле "using std::string" исправил
соответствующие ошибки.
parent
de1ea9fc
Show whitespace changes
Inline
Side-by-side
Showing
16 changed files
with
32 additions
and
31 deletions
+32
-31
DBServer_MySQL.cc
extensions/DBServer-MySQL/DBServer_MySQL.cc
+1
-1
DBServer_MySQL.h
extensions/DBServer-MySQL/DBServer_MySQL.h
+1
-1
DBServer_PostgreSQL.h
extensions/DBServer-PostgreSQL/DBServer_PostgreSQL.h
+1
-1
DBServer_SQLite.h
extensions/DBServer-SQLite/DBServer_SQLite.h
+1
-1
LProcessor.h
extensions/LogicProcessor/LProcessor.h
+1
-1
MBSlave.cc
extensions/ModbusSlave/MBSlave.cc
+1
-1
MBSlave.h
extensions/ModbusSlave/MBSlave.h
+1
-1
Debug.h
include/Debug.h
+0
-1
IONotifyController.h
include/IONotifyController.h
+2
-2
LT_Object.h
include/LT_Object.h
+2
-0
UHelpers.h
include/UHelpers.h
+7
-7
Debug.cc
src/Log/Debug.cc
+5
-5
ObjectIndex.cc
src/ObjectRepository/ObjectIndex.cc
+3
-3
LT_Object.cc
src/Timers/LT_Object.cc
+4
-4
UConnector.h
wrappers/core/UConnector.h
+1
-1
UModbus.h
wrappers/core/UModbus.h
+1
-1
No files found.
extensions/DBServer-MySQL/DBServer_MySQL.cc
View file @
a7e93e3f
...
...
@@ -121,7 +121,7 @@ void DBServer_MySQL::confirmInfo( const uniset::ConfirmMessage* cem )
}
}
//--------------------------------------------------------------------------------------------
bool
DBServer_MySQL
::
writeToBase
(
const
string
&
query
)
bool
DBServer_MySQL
::
writeToBase
(
const
st
d
::
st
ring
&
query
)
{
dbinfo
<<
myname
<<
"(writeToBase): "
<<
query
<<
endl
;
...
...
extensions/DBServer-MySQL/DBServer_MySQL.h
View file @
a7e93e3f
...
...
@@ -169,7 +169,7 @@ namespace uniset
virtual
void
sensorInfo
(
const
uniset
::
SensorMessage
*
sm
)
override
;
virtual
void
confirmInfo
(
const
uniset
::
ConfirmMessage
*
cmsg
)
override
;
bool
writeToBase
(
const
string
&
query
);
bool
writeToBase
(
const
st
d
::
st
ring
&
query
);
void
createTables
(
MySQLInterface
*
db
);
inline
std
::
string
tblName
(
int
key
)
...
...
extensions/DBServer-PostgreSQL/DBServer_PostgreSQL.h
View file @
a7e93e3f
...
...
@@ -87,7 +87,7 @@ namespace uniset
virtual
void
confirmInfo
(
const
uniset
::
ConfirmMessage
*
cmsg
)
override
;
virtual
void
sigterm
(
int
signo
)
override
;
bool
writeToBase
(
const
string
&
query
);
bool
writeToBase
(
const
st
d
::
st
ring
&
query
);
void
createTables
(
std
::
shared_ptr
<
PostgreSQLInterface
>&
db
);
inline
std
::
string
tblName
(
int
key
)
...
...
extensions/DBServer-SQLite/DBServer_SQLite.h
View file @
a7e93e3f
...
...
@@ -169,7 +169,7 @@ namespace uniset
virtual
void
sensorInfo
(
const
uniset
::
SensorMessage
*
sm
)
override
;
virtual
void
confirmInfo
(
const
uniset
::
ConfirmMessage
*
cmsg
)
override
;
bool
writeToBase
(
const
string
&
query
);
bool
writeToBase
(
const
st
d
::
st
ring
&
query
);
void
createTables
(
SQLiteInterface
*
db
);
inline
std
::
string
tblName
(
int
key
)
...
...
extensions/LogicProcessor/LProcessor.h
View file @
a7e93e3f
...
...
@@ -136,7 +136,7 @@ namespace uniset
protected
:
virtual
void
build
(
const
string
&
lfile
);
virtual
void
build
(
const
st
d
::
st
ring
&
lfile
);
virtual
void
step
();
...
...
extensions/ModbusSlave/MBSlave.cc
View file @
a7e93e3f
...
...
@@ -2122,7 +2122,7 @@ namespace uniset
return
myhelp
;
}
// -------------------------------------------------------------------------
Poco
::
JSON
::
Object
::
Ptr
MBSlave
::
httpRequest
(
const
string
&
req
,
const
Poco
::
URI
::
QueryParameters
&
p
)
Poco
::
JSON
::
Object
::
Ptr
MBSlave
::
httpRequest
(
const
st
d
::
st
ring
&
req
,
const
Poco
::
URI
::
QueryParameters
&
p
)
{
if
(
req
==
"regs"
)
return
request_regs
(
req
,
p
);
...
...
extensions/ModbusSlave/MBSlave.h
View file @
a7e93e3f
...
...
@@ -416,7 +416,7 @@ namespace uniset
#ifndef DISABLE_REST_API
// http API
virtual
Poco
::
JSON
::
Object
::
Ptr
httpHelp
(
const
Poco
::
URI
::
QueryParameters
&
p
)
override
;
virtual
Poco
::
JSON
::
Object
::
Ptr
httpRequest
(
const
string
&
req
,
const
Poco
::
URI
::
QueryParameters
&
p
)
override
;
virtual
Poco
::
JSON
::
Object
::
Ptr
httpRequest
(
const
st
d
::
st
ring
&
req
,
const
Poco
::
URI
::
QueryParameters
&
p
)
override
;
#endif
protected
:
...
...
include/Debug.h
View file @
a7e93e3f
...
...
@@ -29,7 +29,6 @@
// #define _(n) n
//#endif
using
std
::
string
;
/** Ideally this should have been a namespace, but since we try to be
compilable on older C++ compilators too, we use a struct instead.
...
...
include/IONotifyController.h
View file @
a7e93e3f
...
...
@@ -167,7 +167,7 @@ namespace uniset
#ifndef DISABLE_REST_API
// http API
virtual
Poco
::
JSON
::
Object
::
Ptr
httpHelp
(
const
Poco
::
URI
::
QueryParameters
&
p
)
override
;
virtual
Poco
::
JSON
::
Object
::
Ptr
httpRequest
(
const
string
&
req
,
const
Poco
::
URI
::
QueryParameters
&
p
)
override
;
virtual
Poco
::
JSON
::
Object
::
Ptr
httpRequest
(
const
st
d
::
st
ring
&
req
,
const
Poco
::
URI
::
QueryParameters
&
p
)
override
;
#endif
// --------------------------------------------
...
...
@@ -329,7 +329,7 @@ namespace uniset
#ifndef DISABLE_REST_API
// http api
Poco
::
JSON
::
Object
::
Ptr
request_consumers
(
const
std
::
string
&
req
,
const
Poco
::
URI
::
QueryParameters
&
p
);
Poco
::
JSON
::
Object
::
Ptr
request_lost
(
const
string
&
req
,
const
Poco
::
URI
::
QueryParameters
&
p
);
Poco
::
JSON
::
Object
::
Ptr
request_lost
(
const
st
d
::
st
ring
&
req
,
const
Poco
::
URI
::
QueryParameters
&
p
);
Poco
::
JSON
::
Object
::
Ptr
getConsumers
(
uniset
::
ObjectId
sid
,
ConsumerListInfo
&
clist
,
bool
ifNotEmpty
=
true
);
#endif
...
...
include/LT_Object.h
View file @
a7e93e3f
...
...
@@ -199,6 +199,8 @@ namespace uniset
/*! замок для блокирования совместного доступа к cписку таймеров */
mutable
uniset
::
uniset_rwmutex
lstMutex
;
PassiveTimer
tmLast
;
Debug
::
type
loglevel
=
{
Debug
::
LEVEL3
};
};
// -------------------------------------------------------------------------
}
// end of uniset namespace
...
...
include/UHelpers.h
View file @
a7e93e3f
...
...
@@ -38,19 +38,19 @@ namespace uniset
uniset
::
ObjectId
id
=
conf
->
getObjectID
(
idname
);
if
(
id
==
uniset
::
DefaultObjectId
)
throw
uniset
::
SystemError
(
"(make_object<"
+
string
(
typeid
(
T
).
name
())
+
">): Not found ID for '"
+
idname
+
"'"
);
throw
uniset
::
SystemError
(
"(make_object<"
+
st
d
::
st
ring
(
typeid
(
T
).
name
())
+
">): Not found ID for '"
+
idname
+
"'"
);
auto
xml
=
conf
->
getConfXML
();
std
::
string
s
(
(
secname
.
empty
()
?
idname
:
secname
)
);
xmlNode
*
cnode
=
conf
->
findNode
(
xml
->
getFirstNode
(),
s
,
idname
);
if
(
cnode
==
0
)
throw
uniset
::
SystemError
(
"(make_object<"
+
string
(
typeid
(
T
).
name
())
+
">): Not found xmlnode <"
+
s
+
" name='"
+
idname
+
"' ... >"
);
throw
uniset
::
SystemError
(
"(make_object<"
+
st
d
::
st
ring
(
typeid
(
T
).
name
())
+
">): Not found xmlnode <"
+
s
+
" name='"
+
idname
+
"' ... >"
);
std
::
shared_ptr
<
T
>
obj
=
std
::
make_shared
<
T
>
(
id
,
cnode
,
std
::
forward
<
_Args
>
(
__args
)...);
if
(
obj
==
nullptr
)
throw
uniset
::
SystemError
(
"(make_object<T> == nullptr"
+
string
(
typeid
(
T
).
name
()));
throw
uniset
::
SystemError
(
"(make_object<T> == nullptr"
+
st
d
::
st
ring
(
typeid
(
T
).
name
()));
return
obj
;
}
...
...
@@ -65,13 +65,13 @@ namespace uniset
xmlNode
*
cnode
=
conf
->
findNode
(
root
,
secname
,
""
);
if
(
cnode
==
0
)
throw
uniset
::
SystemError
(
"(make_object_x<"
+
string
(
typeid
(
T
).
name
())
+
">): Not found xmlnode <"
+
secname
+
" ... >"
);
throw
uniset
::
SystemError
(
"(make_object_x<"
+
st
d
::
st
ring
(
typeid
(
T
).
name
())
+
">): Not found xmlnode <"
+
secname
+
" ... >"
);
string
idname
=
conf
->
getProp
(
cnode
,
"name"
);
st
d
::
st
ring
idname
=
conf
->
getProp
(
cnode
,
"name"
);
uniset
::
ObjectId
id
=
conf
->
getObjectID
(
idname
);
if
(
id
==
uniset
::
DefaultObjectId
)
throw
uniset
::
SystemError
(
"(make_object_x<"
+
string
(
typeid
(
T
).
name
())
+
">): Not found ID for '"
+
idname
+
"'"
);
throw
uniset
::
SystemError
(
"(make_object_x<"
+
st
d
::
st
ring
(
typeid
(
T
).
name
())
+
">): Not found ID for '"
+
idname
+
"'"
);
return
std
::
make_shared
<
T
>
(
id
,
cnode
,
std
::
forward
<
_Args
>
(
__args
)...);
...
...
@@ -114,7 +114,7 @@ namespace uniset
}
catch
(
const
uniset
::
Exception
&
ex
)
{
m
->
log
()
->
crit
()
<<
m
->
getName
()
<<
"("
<<
__FUNCTION__
<<
"): "
<<
"(create "
<<
string
(
typeid
(
T
).
name
())
<<
"): "
<<
ex
<<
std
::
endl
;
m
->
log
()
->
crit
()
<<
m
->
getName
()
<<
"("
<<
__FUNCTION__
<<
"): "
<<
"(create "
<<
st
d
::
st
ring
(
typeid
(
T
).
name
())
<<
"): "
<<
ex
<<
std
::
endl
;
throw
;
}
}
...
...
src/Log/Debug.cc
View file @
a7e93e3f
...
...
@@ -64,16 +64,16 @@ Debug::type const Debug::ANY = Debug::type(
Debug
::
EXCEPTION
);
Debug
::
type
Debug
::
value
(
string
const
&
val
)
Debug
::
type
Debug
::
value
(
std
::
string
const
&
val
)
{
type
l
=
Debug
::
NONE
;
string
v
(
val
);
st
d
::
st
ring
v
(
val
);
while
(
!
v
.
empty
())
{
string
::
size_type
st
=
v
.
find
(
','
);
st
d
::
st
ring
::
size_type
st
=
v
.
find
(
','
);
//string tmp(lowercase(v.substr(0, st)));
string
tmp
(
v
.
substr
(
0
,
st
));
st
d
::
st
ring
tmp
(
v
.
substr
(
0
,
st
));
if
(
tmp
.
empty
())
...
...
@@ -98,7 +98,7 @@ Debug::type Debug::value(string const& val)
break
;
}
if
(
st
==
string
::
npos
)
break
;
if
(
st
==
st
d
::
st
ring
::
npos
)
break
;
v
.
erase
(
0
,
st
+
1
);
}
...
...
src/ObjectRepository/ObjectIndex.cc
View file @
a7e93e3f
...
...
@@ -29,7 +29,7 @@ using namespace uniset;
//const std::string ObjectIndex::sepNode = ":";
// -----------------------------------------------------------------------------------------
string
ObjectIndex
::
getNameById
(
const
ObjectId
id
)
const
noexcept
st
d
::
st
ring
ObjectIndex
::
getNameById
(
const
ObjectId
id
)
const
noexcept
{
return
getMapName
(
id
);
}
...
...
@@ -46,11 +46,11 @@ ObjectId ObjectIndex::getNodeId(const std::__cxx11::string& name) const noexcept
// -----------------------------------------------------------------------------------------
std
::
string
ObjectIndex
::
getBaseName
(
const
std
::
string
&
fname
)
noexcept
{
string
::
size_type
pos
=
fname
.
rfind
(
'/'
);
st
d
::
st
ring
::
size_type
pos
=
fname
.
rfind
(
'/'
);
try
{
if
(
pos
!=
string
::
npos
)
if
(
pos
!=
st
d
::
st
ring
::
npos
)
return
fname
.
substr
(
pos
+
1
);
}
catch
(...)
{}
...
...
src/Timers/LT_Object.cc
View file @
a7e93e3f
...
...
@@ -189,8 +189,8 @@ timeout_t LT_Object::askTimer( uniset::TimerId timerid, timeout_t timeMS, clock_
{
li
->
curTick
=
ticks
;
li
->
tmr
.
setTiming
(
timeMS
);
uinfo
<<
"(LT_askTimer): заказ на таймер
(
["
<<
timerid
<<
"]"
<<
getTimerName
(
timerid
)
<<
"
)
"
<<
timeMS
<<
" [мс] уже есть..."
<<
endl
;
uinfo
<<
"(LT_askTimer): заказ на таймер
["
<<
timerid
<<
"]"
<<
getTimerName
(
timerid
)
<<
" "
<<
timeMS
<<
" [мс] уже есть..."
<<
endl
;
return
sleepTime
;
}
}
...
...
@@ -200,8 +200,8 @@ timeout_t LT_Object::askTimer( uniset::TimerId timerid, timeout_t timeMS, clock_
tlst
.
emplace_back
(
timerid
,
timeMS
,
ticks
,
p
);
}
// unlock
uinfo
<<
"(LT_askTimer): поступил заказ на таймер
(
["
<<
timerid
<<
"]"
<<
getTimerName
(
timerid
)
<<
"
)
"
<<
timeMS
<<
" [мс]
\n
"
;
uinfo
<<
"(LT_askTimer): поступил заказ на таймер
["
<<
timerid
<<
"]"
<<
getTimerName
(
timerid
)
<<
" "
<<
timeMS
<<
" [мс]
\n
"
;
}
else
// отказ (при timeMS == 0)
{
...
...
wrappers/core/UConnector.h
View file @
a7e93e3f
...
...
@@ -34,7 +34,7 @@ class UConnector
inline
std
::
string
getUIType
()
{
return
string
(
"uniset"
);
return
st
d
::
st
ring
(
"uniset"
);
}
std
::
string
getConfFileName
();
...
...
wrappers/core/UModbus.h
View file @
a7e93e3f
...
...
@@ -93,7 +93,7 @@ class UModbus
// DebugStream dlog;
uniset
::
ModbusTCPMaster
*
mb
;
int
port
;
string
ip
;
st
d
::
st
ring
ip
;
int
tout_msec
;
};
//---------------------------------------------------------------------------
...
...
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