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
d4039801
Commit
d4039801
authored
Nov 29, 2010
by
Pavel Vainerman
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Сделал у uniset-smonitor новый формат задаваемого списка датчиков
(как у admin) --sid s1@node1,id2@node2,..
parent
12cfee59
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
18 additions
and
35 deletions
+18
-35
smonitor.cc
Utilities/SMonit/smonitor.cc
+1
-1
libuniset.spec
conf/libuniset.spec
+6
-3
SMonitor.h
include/SMonitor.h
+2
-1
SMonitor.cc
src/Various/SMonitor.cc
+9
-30
No files found.
Utilities/SMonit/smonitor.cc
View file @
d4039801
...
@@ -13,7 +13,7 @@ int main( int argc, const char **argv )
...
@@ -13,7 +13,7 @@ int main( int argc, const char **argv )
{
{
if
(
argc
>
1
&&
(
!
strcmp
(
argv
[
1
],
"--help"
)
||
!
strcmp
(
argv
[
1
],
"-h"
)
)
)
if
(
argc
>
1
&&
(
!
strcmp
(
argv
[
1
],
"--help"
)
||
!
strcmp
(
argv
[
1
],
"-h"
)
)
)
{
{
cout
<<
"Usage: uniset-smonit [ args ] --sid id1
,id2,id2
,... "
cout
<<
"Usage: uniset-smonit [ args ] --sid id1
@node1,Sensor2@node2,id2,sensorname3
,... "
// << " --script scriptname \n"
// << " --script scriptname \n"
<<
" --confile configure.xml
\n
"
;
<<
" --confile configure.xml
\n
"
;
return
0
;
return
0
;
...
...
conf/libuniset.spec
View file @
d4039801
...
@@ -3,7 +3,7 @@
...
@@ -3,7 +3,7 @@
Name: libuniset
Name: libuniset
Version: 0.99
Version: 0.99
Release: eter2
1
Release: eter2
2
Summary: UniSet - library for building distributed industrial control systems
Summary: UniSet - library for building distributed industrial control systems
License: GPL
License: GPL
Group: Development/C++
Group: Development/C++
...
@@ -14,8 +14,8 @@ Packager: Pavel Vainerman <pv@altlinux.ru>
...
@@ -14,8 +14,8 @@ Packager: Pavel Vainerman <pv@altlinux.ru>
Source: /var/ftp/pvt/Etersoft/Ourside/unstable/sources/tarball/%name-%version.tar
Source: /var/ftp/pvt/Etersoft/Ourside/unstable/sources/tarball/%name-%version.tar
# manually removed: glibc-devel-static
# manually removed: glibc-devel-static
# Automatically added by buildreq on
Tue Jul 14 2009
# Automatically added by buildreq on
Fri Nov 26 2010
BuildRequires: glibc-devel
libMySQL-devel libcomedi-devel libcommoncpp2
-devel libomniORB-devel libsigc++2.0-devel python-modules xsltproc
BuildRequires: glibc-devel
-static libcomedi-devel libcommoncpp2-devel libmysqlclient
-devel libomniORB-devel libsigc++2.0-devel python-modules xsltproc
%set_verify_elf_method textrel=strict,rpath=strict,unresolved=strict
%set_verify_elf_method textrel=strict,rpath=strict,unresolved=strict
...
@@ -184,6 +184,9 @@ rm -f %buildroot%_libdir/*.la
...
@@ -184,6 +184,9 @@ rm -f %buildroot%_libdir/*.la
%exclude %_pkgconfigdir/libUniSet.pc
%exclude %_pkgconfigdir/libUniSet.pc
%changelog
%changelog
* Mon Nov 29 2010 Pavel Vainerman <pv@altlinux.ru> 0.99-eter22
- smonitor new format (id@node)
* Tue Nov 23 2010 Pavel Vainerman <pv@altlinux.ru> 0.99-eter20
* Tue Nov 23 2010 Pavel Vainerman <pv@altlinux.ru> 0.99-eter20
- new build
- new build
...
...
include/SMonitor.h
View file @
d4039801
...
@@ -26,7 +26,8 @@ class SMonitor:
...
@@ -26,7 +26,8 @@ class SMonitor:
SMonitor
();
SMonitor
();
private
:
private
:
UniSetTypes
::
IDList
lst
;
typedef
std
::
list
<
UniSetTypes
::
ParamSInfo
>
MyIDList
;
MyIDList
lst
;
std
::
string
script
;
std
::
string
script
;
};
};
...
...
src/Various/SMonitor.cc
View file @
d4039801
...
@@ -19,7 +19,8 @@ SMonitor::SMonitor(ObjectId id):
...
@@ -19,7 +19,8 @@ SMonitor::SMonitor(ObjectId id):
script
(
""
)
script
(
""
)
{
{
string
sid
(
conf
->
getArgParam
(
"--sid"
));
string
sid
(
conf
->
getArgParam
(
"--sid"
));
lst
=
UniSetTypes
::
explode
(
sid
);
lst
=
UniSetTypes
::
getSInfoList
(
sid
,
UniSetTypes
::
conf
);
if
(
lst
.
empty
()
)
if
(
lst
.
empty
()
)
throw
SystemError
(
"Не задан список датчиков (--sid)"
);
throw
SystemError
(
"Не задан список датчиков (--sid)"
);
...
@@ -89,13 +90,15 @@ void SMonitor::sysCommand( SystemMessage *sm )
...
@@ -89,13 +90,15 @@ void SMonitor::sysCommand( SystemMessage *sm )
{
{
case
SystemMessage
:
:
StartUp
:
case
SystemMessage
:
:
StartUp
:
{
{
std
::
list
<
ObjectId
>
l
=
lst
.
getList
();
for
(
MyIDList
::
iterator
it
=
lst
.
begin
();
it
!=
lst
.
end
();
it
++
)
for
(
std
::
list
<
ObjectId
>::
iterator
it
=
l
.
begin
();
it
!=
l
.
end
();
++
it
)
{
{
if
(
it
->
si
.
node
==
DefaultObjectId
)
it
->
si
.
node
=
conf
->
getLocalNode
();
try
try
{
{
if
(
(
*
it
)
!=
DefaultObjectId
)
if
(
it
->
si
.
id
!=
DefaultObjectId
)
ui
.
ask
Sensor
((
*
it
),
UniversalIO
::
UIONotify
);
ui
.
ask
RemoteSensor
(
it
->
si
.
id
,
UniversalIO
::
UIONotify
,
it
->
si
.
node
);
}
}
catch
(
Exception
&
ex
)
catch
(
Exception
&
ex
)
{
{
...
@@ -108,30 +111,6 @@ void SMonitor::sysCommand( SystemMessage *sm )
...
@@ -108,30 +111,6 @@ void SMonitor::sysCommand( SystemMessage *sm )
raise
(
SIGTERM
);
raise
(
SIGTERM
);
}
}
}
}
/*
try
{
UniSetTypes::IDSeq_var badlst = ui.askSensorsSeq(lst,UniversalIO::UIONotify);
int sz = badlst->length();
if( sz > 0 )
{
cerr << myname << "(askSensrosSeq): ******** НЕ УДАЛОСЬ ЗАКАЗАТЬ: ";
for( int i=0; i<sz; i++ )
cerr << badlst[i] << " ";
cerr << endl;
}
}
catch(Exception& ex)
{
cerr << myname << ":(askSensor): " << ex << endl;
raise(SIGTERM);
}
catch(...)
{
cerr << myname << ": НЕ СМОГ ЗАКАЗТЬ датчики "<< endl;
raise(SIGTERM);
}
*/
}
}
break
;
break
;
...
...
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