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
0863a5f9
Commit
0863a5f9
authored
Dec 12, 2016
by
Pavel Vainerman
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Перенёс испрвления из другой рабочей ветки.
parent
92f74164
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
11 changed files
with
93 additions
and
11 deletions
+93
-11
ctl-cpp-common.xsl
Utilities/codegen/ctl-cpp-common.xsl
+4
-4
UObject_SK.h
extensions/include/UObject_SK.h
+0
-0
Makefile.am
extensions/lib/Makefile.am
+5
-0
UObject_SK.cc
extensions/lib/UObject_SK.cc
+0
-0
UHttpRequestHandler.h
include/UHttpRequestHandler.h
+1
-1
UInterface_wrap.cxx
python/lib/pyUniSet/UInterface_wrap.cxx
+54
-0
pyUniSet.py
python/lib/pyUniSet/pyUniSet.py
+2
-0
UHttpRequestHandler.cc
src/Communications/Http/UHttpRequestHandler.cc
+7
-2
UHttpServer.cc
src/Communications/Http/UHttpServer.cc
+6
-2
LogServer.cc
src/Log/LogServer.cc
+13
-2
uniset2.files
uniset2.files
+1
-0
No files found.
Utilities/codegen/ctl-cpp-common.xsl
View file @
0863a5f9
...
...
@@ -1259,9 +1259,9 @@ end_private(false)
if( smTestID == DefaultObjectId )
smTestID = getSMTestID();
activateTimeout = conf->getArgPInt("--" + argprefix + "activate-timeout",
4
0000);
activateTimeout = conf->getArgPInt("--" + argprefix + "activate-timeout",
9
0000);
int msec = conf->getArgPInt("--" + argprefix + "startup-timeout",
3
0000);
int msec = conf->getArgPInt("--" + argprefix + "startup-timeout",
5
0000);
ptStartUpTimeout.setTiming(msec);
// =====================
<
variables
>
=====================
...
...
@@ -1730,9 +1730,9 @@ askPause(uniset_conf()->getPIntProp(cnode,"askPause",2000))
vmonit(smReadyTimeout);
vmonit(activateTimeout);
activateTimeout = conf->getArgPInt("--" + argprefix + "activate-timeout",
4
0000);
activateTimeout = conf->getArgPInt("--" + argprefix + "activate-timeout",
9
0000);
int msec = conf->getArgPInt("--" + argprefix + "startup-timeout",
3
0000);
int msec = conf->getArgPInt("--" + argprefix + "startup-timeout",
6
0000);
ptStartUpTimeout.setTiming(msec);
}
...
...
extensions/include/UObject_SK.h
View file @
0863a5f9
This diff is collapsed.
Click to expand it.
extensions/lib/Makefile.am
View file @
0863a5f9
...
...
@@ -8,4 +8,9 @@ libUniSet2Extensions_la_LIBADD = $(SIGC_LIBS) $(POCO_LIBS) $(top_builddir)/lib
libUniSet2Extensions_la_SOURCES
=
Extensions.cc SMInterface.cc Calibration.cc SingleProcess.cc
\
IOBase.cc DigitalFilter.cc PID.cc MTR.cc VTypes.cc UObject_SK.cc
UObject_SK.cc
:
$(top_builddir)/Utilities/codegen/*.xsl
$(SHEL)
$(top_builddir)
/Utilities/codegen/uniset2-codegen
-l
$(top_builddir)
/Utilities/codegen
-n
UObject
--no-main
$(top_builddir)
/Utilities/codegen/tests/uobject.src.xml
mv
-f
UObject_SK.h ../include/
include
$(top_builddir)/include.mk
extensions/lib/UObject_SK.cc
View file @
0863a5f9
This diff is collapsed.
Click to expand it.
include/UHttpRequestHandler.h
View file @
0863a5f9
...
...
@@ -75,7 +75,7 @@ namespace uniset
namespace
UHttp
{
// текущая версия API
const
std
::
string
UHTTP_API_VERSION
=
"v0
"
;
const
std
::
string
UHTTP_API_VERSION
=
"v01
"
;
/*! интерфейс для объекта выдающего json-данные */
class
IHttpRequest
...
...
python/lib/pyUniSet/UInterface_wrap.cxx
View file @
0863a5f9
...
...
@@ -4430,6 +4430,58 @@ fail:
}
SWIGINTERN
PyObject
*
_wrap_ShortIOInfo_supplier_node_set
(
PyObject
*
SWIGUNUSEDPARM
(
self
),
PyObject
*
args
)
{
PyObject
*
resultobj
=
0
;
UTypes
::
ShortIOInfo
*
arg1
=
(
UTypes
::
ShortIOInfo
*
)
0
;
long
arg2
;
void
*
argp1
=
0
;
int
res1
=
0
;
long
val2
;
int
ecode2
=
0
;
PyObject
*
obj0
=
0
;
PyObject
*
obj1
=
0
;
if
(
!
PyArg_ParseTuple
(
args
,(
char
*
)
"OO:ShortIOInfo_supplier_node_set"
,
&
obj0
,
&
obj1
))
SWIG_fail
;
res1
=
SWIG_ConvertPtr
(
obj0
,
&
argp1
,
SWIGTYPE_p_UTypes__ShortIOInfo
,
0
|
0
);
if
(
!
SWIG_IsOK
(
res1
))
{
SWIG_exception_fail
(
SWIG_ArgError
(
res1
),
"in method '"
"ShortIOInfo_supplier_node_set"
"', argument "
"1"" of type '"
"UTypes::ShortIOInfo *""'"
);
}
arg1
=
reinterpret_cast
<
UTypes
::
ShortIOInfo
*
>
(
argp1
);
ecode2
=
SWIG_AsVal_long
(
obj1
,
&
val2
);
if
(
!
SWIG_IsOK
(
ecode2
))
{
SWIG_exception_fail
(
SWIG_ArgError
(
ecode2
),
"in method '"
"ShortIOInfo_supplier_node_set"
"', argument "
"2"" of type '"
"long""'"
);
}
arg2
=
static_cast
<
long
>
(
val2
);
if
(
arg1
)
(
arg1
)
->
supplier_node
=
arg2
;
resultobj
=
SWIG_Py_Void
();
return
resultobj
;
fail
:
return
NULL
;
}
SWIGINTERN
PyObject
*
_wrap_ShortIOInfo_supplier_node_get
(
PyObject
*
SWIGUNUSEDPARM
(
self
),
PyObject
*
args
)
{
PyObject
*
resultobj
=
0
;
UTypes
::
ShortIOInfo
*
arg1
=
(
UTypes
::
ShortIOInfo
*
)
0
;
void
*
argp1
=
0
;
int
res1
=
0
;
PyObject
*
obj0
=
0
;
long
result
;
if
(
!
PyArg_ParseTuple
(
args
,(
char
*
)
"O:ShortIOInfo_supplier_node_get"
,
&
obj0
))
SWIG_fail
;
res1
=
SWIG_ConvertPtr
(
obj0
,
&
argp1
,
SWIGTYPE_p_UTypes__ShortIOInfo
,
0
|
0
);
if
(
!
SWIG_IsOK
(
res1
))
{
SWIG_exception_fail
(
SWIG_ArgError
(
res1
),
"in method '"
"ShortIOInfo_supplier_node_get"
"', argument "
"1"" of type '"
"UTypes::ShortIOInfo *""'"
);
}
arg1
=
reinterpret_cast
<
UTypes
::
ShortIOInfo
*
>
(
argp1
);
result
=
(
long
)
((
arg1
)
->
supplier_node
);
resultobj
=
SWIG_From_long
(
static_cast
<
long
>
(
result
));
return
resultobj
;
fail
:
return
NULL
;
}
SWIGINTERN
PyObject
*
_wrap_new_ShortIOInfo
(
PyObject
*
SWIGUNUSEDPARM
(
self
),
PyObject
*
args
)
{
PyObject
*
resultobj
=
0
;
UTypes
::
ShortIOInfo
*
result
=
0
;
...
...
@@ -5403,6 +5455,8 @@ static PyMethodDef SwigMethods[] = {
{
(
char
*
)
"ShortIOInfo_tv_nsec_get"
,
_wrap_ShortIOInfo_tv_nsec_get
,
METH_VARARGS
,
NULL
},
{
(
char
*
)
"ShortIOInfo_supplier_set"
,
_wrap_ShortIOInfo_supplier_set
,
METH_VARARGS
,
NULL
},
{
(
char
*
)
"ShortIOInfo_supplier_get"
,
_wrap_ShortIOInfo_supplier_get
,
METH_VARARGS
,
NULL
},
{
(
char
*
)
"ShortIOInfo_supplier_node_set"
,
_wrap_ShortIOInfo_supplier_node_set
,
METH_VARARGS
,
NULL
},
{
(
char
*
)
"ShortIOInfo_supplier_node_get"
,
_wrap_ShortIOInfo_supplier_node_get
,
METH_VARARGS
,
NULL
},
{
(
char
*
)
"new_ShortIOInfo"
,
_wrap_new_ShortIOInfo
,
METH_VARARGS
,
NULL
},
{
(
char
*
)
"delete_ShortIOInfo"
,
_wrap_delete_ShortIOInfo
,
METH_VARARGS
,
NULL
},
{
(
char
*
)
"ShortIOInfo_swigregister"
,
ShortIOInfo_swigregister
,
METH_VARARGS
,
NULL
},
...
...
python/lib/pyUniSet/pyUniSet.py
View file @
0863a5f9
...
...
@@ -168,6 +168,8 @@ class ShortIOInfo:
__swig_getmethods__
[
"tv_nsec"
]
=
_pyUniSet
.
ShortIOInfo_tv_nsec_get
__swig_setmethods__
[
"supplier"
]
=
_pyUniSet
.
ShortIOInfo_supplier_set
__swig_getmethods__
[
"supplier"
]
=
_pyUniSet
.
ShortIOInfo_supplier_get
__swig_setmethods__
[
"supplier_node"
]
=
_pyUniSet
.
ShortIOInfo_supplier_node_set
__swig_getmethods__
[
"supplier_node"
]
=
_pyUniSet
.
ShortIOInfo_supplier_node_get
def
__init__
(
self
):
this
=
_pyUniSet
.
new_ShortIOInfo
()
...
...
src/Communications/Http/UHttpRequestHandler.cc
View file @
0863a5f9
...
...
@@ -22,8 +22,11 @@
// -------------------------------------------------------------------------
using
namespace
std
;
using
namespace
Poco
::
Net
;
using
namespace
uniset
;
using
namespace
UHttp
;
// -------------------------------------------------------------------------
namespace
uniset
{
using
namespace
UHttp
;
// -------------------------------------------------------------------------
UHttpRequestHandler
::
UHttpRequestHandler
(
std
::
shared_ptr
<
IHttpRequestRegistry
>
_registry
)
:
registry
(
_registry
)
...
...
@@ -166,4 +169,6 @@ Poco::JSON::Object::Ptr IHttpRequest::httpRequest( const string& req, const Poco
throw
uniset
::
SystemError
(
err
.
str
());
}
// -------------------------------------------------------------------------
}
// end of namespace uniset
// -------------------------------------------------------------------------
#endif
src/Communications/Http/UHttpServer.cc
View file @
0863a5f9
...
...
@@ -21,8 +21,10 @@
#include "Exceptions.h"
// -------------------------------------------------------------------------
using
namespace
Poco
::
Net
;
using
namespace
uniset
;
using
namespace
UHttp
;
// -------------------------------------------------------------------------
namespace
uniset
{
using
namespace
UHttp
;
// -------------------------------------------------------------------------
UHttpServer
::
UHttpServer
(
std
::
shared_ptr
<
IHttpRequestRegistry
>&
supplier
,
const
std
::
string
&
_host
,
int
_port
)
:
...
...
@@ -76,4 +78,6 @@ std::shared_ptr<DebugStream> UHttpServer::log()
return
mylog
;
}
// -------------------------------------------------------------------------
}
// end of namespace uniset
// -------------------------------------------------------------------------
#endif // #ifndef DISABLE_REST_API
src/Log/LogServer.cc
View file @
0863a5f9
...
...
@@ -203,7 +203,7 @@ namespace uniset
if
(
mylog
.
is_crit
()
)
mylog
.
crit
()
<<
err
.
str
()
<<
endl
;
throw
SystemError
(
err
.
str
()
);
throw
uniset
::
SystemError
(
err
.
str
()
);
}
try
...
...
@@ -219,7 +219,18 @@ namespace uniset
if
(
mylog
.
is_crit
()
)
mylog
.
crit
()
<<
err
.
str
()
<<
endl
;
throw
SystemError
(
err
.
str
()
);
throw
uniset
::
SystemError
(
err
.
str
()
);
}
catch
(
std
::
exception
&
ex
)
{
ostringstream
err
;
err
<<
myname
<<
"(evprepare): "
<<
ex
.
what
();
if
(
mylog
.
is_crit
()
)
mylog
.
crit
()
<<
err
.
str
()
<<
endl
;
throw
uniset
::
SystemError
(
err
.
str
()
);
}
sock
->
setBlocking
(
false
);
...
...
uniset2.files
View file @
0863a5f9
...
...
@@ -386,6 +386,7 @@ src/Communications/TCP/UTCPStream.cc
src/Communications/TCP/UTCPSocket.cc
src/Communications/TCP/USocket.cc
src/Communications/Http/UHttpRequestHandler.cc
src/Communications/Http/UHttpServer.cc
src/Communications/ComPort.cc
src/Communications/ComPort485F.cc
src/Communications/Makefile.am
...
...
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