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
d0be98d2
Commit
d0be98d2
authored
May 18, 2018
by
Pavel Vainerman
Browse files
Options
Browse Files
Download
Plain Diff
backported to p8 as 2.7-alt7.M80P.8 (with rpmbph script)
parents
7bda9575
2537309a
Hide whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
49 additions
and
7 deletions
+49
-7
ctl-cpp-common.xsl
Utilities/codegen/ctl-cpp-common.xsl
+21
-0
libuniset2.spec
conf/libuniset2.spec
+6
-2
IOControl.cc
extensions/IOControl/IOControl.cc
+1
-1
IOControl.h
extensions/IOControl/IOControl.h
+1
-1
LogDB.cc
extensions/LogDB/LogDB.cc
+2
-1
UObject_SK.h
extensions/include/UObject_SK.h
+8
-1
UObject_SK.cc
extensions/lib/UObject_SK.cc
+8
-1
UHttpRequestHandler.cc
src/Communications/Http/UHttpRequestHandler.cc
+1
-0
ModbusTCPSession.cc
src/Communications/Modbus/ModbusTCPSession.cc
+1
-0
No files found.
Utilities/codegen/ctl-cpp-common.xsl
View file @
d0be98d2
...
...
@@ -248,6 +248,13 @@
\param showLinkName - TRUE - выводить SensorName, FALSE - не выводить
*/
std::string strval( uniset::ObjectId id, bool showLinkName=true ) const;
/*! Вывод в строку названия датчика-сообщения: xxx(SensorName)
\param id - идентификатор датчика
\param showLinkName - TRUE - выводить SensorName, FALSE - не выводить
*/
std::string msgstr( uniset::ObjectId id, bool showLinkName=true ) const;
/*! Вывод состояния внутренних переменных */
inline std::string dumpVars(){ return vmon.pretty_str(); }
...
...
@@ -1561,6 +1568,20 @@ std::string <xsl:value-of select="$CLASSNAME"/>_SK::dumpIO()
return s.str();
}
// ----------------------------------------------------------------------------
std::string
<xsl:value-of
select=
"$CLASSNAME"
/>
_SK::msgstr( uniset::ObjectId id, bool showLinkName ) const
{
ostringstream s;
<xsl:for-each
select=
"//msgmap/item"
>
if( id ==
<xsl:value-of
select=
"@name"
/>
)
{
s
<<
"
<xsl:value-of
select=
"@name"
/>
";
if( showLinkName ) s
<<
"("
<<
ORepHelpers::getShortName( uniset_conf()->oind->getMapName(
<xsl:value-of
select=
"@name"
/>
))
<<
")";
return s.str();
}
</xsl:for-each>
return "";
}
// ----------------------------------------------------------------------------
std::string
<xsl:value-of
select=
"$CLASSNAME"
/>
_SK::str( uniset::ObjectId id, bool showLinkName ) const
{
ostringstream s;
...
...
conf/libuniset2.spec
View file @
d0be98d2
...
...
@@ -20,7 +20,7 @@
Name: libuniset2
Version: 2.7
Release: alt
6.M80P.7
Release: alt
7.M80P.8
Summary: UniSet - library for building distributed industrial control systems
License: LGPL
...
...
@@ -511,9 +511,13 @@ rm -f %buildroot%_libdir/*.la
# history of current unpublished changes
%changelog
*
Wed May 09 2018 Pavel Vainerman <pv@altlinux.ru> 2.7-alt6.M80P.7
*
Fri May 18 2018 Pavel Vainerman <pv@altlinux.ru> 2.7-alt7.M80P.8
- backport to ALTLinux p8 (by rpmbph script)
* Fri May 18 2018 Pavel Vainerman <pv@altlinux.ru> 2.7-alt8
- (codegen): added msgstr() function
- make style
* Tue May 08 2018 Pavel Vainerman <pv@altlinux.ru> 2.7-alt7
- (http): added support "CORS" (Access-Control-Allow-Origin)
- (logdb): added --logdb-httpserver-reply-addr host:port
...
...
extensions/IOControl/IOControl.cc
View file @
d0be98d2
...
...
@@ -892,7 +892,7 @@ namespace uniset
<<
". Must be aref=[0..3]"
<<
endl
;
return
false
;
}
inf
->
adelay
=
IOBase
::
initIntProp
(
it
,
"adelay"
,
prop_prefix
,
false
);
}
...
...
extensions/IOControl/IOControl.h
View file @
d0be98d2
...
...
@@ -276,7 +276,7 @@ namespace uniset
3 - analog ref = other (undefined)
*/
int
aref
;
int
adelay
;
/*! Задержка на чтение аналоговых входов с мультиплексированием ( в мкс ) */
/*! Измерительный диапазон
...
...
extensions/LogDB/LogDB.cc
View file @
d0be98d2
...
...
@@ -90,7 +90,8 @@ LogDB::LogDB( const string& name, int argc, const char* const* argv, const strin
else
{
// инициализируем сами, т.к. conf нету..
const
std
::
string
loglevels
=
uniset
::
getArg2Param
(
"--"
+
prefix
+
"log-add-levels"
,
argc
,
argv
,
it
.
getProp
(
"log"
),
""
);
const
std
::
string
loglevels
=
uniset
::
getArg2Param
(
"--"
+
prefix
+
"log-add-levels"
,
argc
,
argv
,
it
.
getProp
(
"log"
),
""
);
if
(
!
loglevels
.
empty
()
)
dblog
->
level
(
Debug
::
value
(
loglevels
));
}
...
...
extensions/include/UObject_SK.h
View file @
d0be98d2
...
...
@@ -8,7 +8,7 @@
ВСЕ ВАШИ ИЗМЕНЕНИЯ БУДУТ ПОТЕРЯНЫ.
*/
// --------------------------------------------------------------------------
// generate timestamp: 201
7-09-01
+03:00
// generate timestamp: 201
8-05-18
+03:00
// -----------------------------------------------------------------------------
#ifndef UObject_SK_H_
#define UObject_SK_H_
...
...
@@ -121,6 +121,13 @@ class UObject_SK:
*/
std
::
string
strval
(
uniset
::
ObjectId
id
,
bool
showLinkName
=
true
)
const
;
/*! Вывод в строку названия датчика-сообщения: xxx(SensorName)
\param id - идентификатор датчика
\param showLinkName - TRUE - выводить SensorName, FALSE - не выводить
*/
std
::
string
msgstr
(
uniset
::
ObjectId
id
,
bool
showLinkName
=
true
)
const
;
/*! Вывод состояния внутренних переменных */
inline
std
::
string
dumpVars
()
{
...
...
extensions/lib/UObject_SK.cc
View file @
d0be98d2
...
...
@@ -11,7 +11,7 @@
ВСЕ ВАШИ ИЗМЕНЕНИЯ БУДУТ ПОТЕРЯНЫ.
*/
// --------------------------------------------------------------------------
// generate timestamp: 201
7-09-01
+03:00
// generate timestamp: 201
8-05-18
+03:00
// -----------------------------------------------------------------------------
#include <memory>
#include <iomanip>
...
...
@@ -356,6 +356,13 @@ std::string UObject_SK::dumpIO()
return
s
.
str
();
}
// ----------------------------------------------------------------------------
std
::
string
UObject_SK
::
msgstr
(
uniset
::
ObjectId
id
,
bool
showLinkName
)
const
{
ostringstream
s
;
return
""
;
}
// ----------------------------------------------------------------------------
std
::
string
UObject_SK
::
str
(
uniset
::
ObjectId
id
,
bool
showLinkName
)
const
{
ostringstream
s
;
...
...
src/Communications/Http/UHttpRequestHandler.cc
View file @
d0be98d2
...
...
@@ -43,6 +43,7 @@ namespace uniset
resp
.
set
(
"Access-Control-Allow-Methods"
,
"GET"
);
resp
.
set
(
"Access-Control-Allow-Request-Method"
,
"*"
);
resp
.
set
(
"Access-Control-Allow-Origin"
,
httpCORS_allow
/* req.get("Origin") */
);
if
(
!
registry
)
{
resp
.
setStatus
(
HTTPResponse
::
HTTP_INTERNAL_SERVER_ERROR
);
...
...
src/Communications/Modbus/ModbusTCPSession.cc
View file @
d0be98d2
...
...
@@ -308,6 +308,7 @@ namespace uniset
if
(
res
<
0
)
{
int
errnum
=
errno
;
if
(
errnum
!=
EAGAIN
&&
dlog
->
is_warn
()
)
dlog
->
warn
()
<<
peername
<<
"(getNextData): read from socket error("
<<
errnum
<<
"): "
<<
strerror
(
errnum
)
<<
endl
;
...
...
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