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
180c78b0
Commit
180c78b0
authored
Sep 14, 2009
by
Pavel Vaynerman
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fixed bug in admin --saveValue
parent
9dff12fc
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
22 additions
and
23 deletions
+22
-23
admin.cc
Utilities/Admin/admin.cc
+18
-22
libuniset.spec
conf/libuniset.spec
+4
-1
No files found.
Utilities/Admin/admin.cc
View file @
180c78b0
...
@@ -824,10 +824,10 @@ int saveValue(string args, UniversalInterface &ui)
...
@@ -824,10 +824,10 @@ int saveValue(string args, UniversalInterface &ui)
{
{
if
(
isdigit
(
arg
[
0
]
)
)
if
(
isdigit
(
arg
[
0
]
)
)
{
{
if
(
sscanf
(
arg
.
c_str
(),
"%ld
:%ld=%ld"
,
&
sid
,
&
node
,
&
val
)
<
2
)
if
(
sscanf
(
arg
.
c_str
(),
"%ld
=%ld"
,
&
sid
,
&
val
)
<
2
)
{
{
cout
<<
i
<<
"
\t
------------------------"
<<
endl
;
cout
<<
i
<<
"
\t
------------------------"
<<
endl
;
cerr
<<
"
!!!!!!
!!! SensorId=Value #"
<<
i
<<
" '"
<<
arg
<<
"' !!!!!!
\n
"
<<
endl
;
cerr
<<
"
(digit):
!!! SensorId=Value #"
<<
i
<<
" '"
<<
arg
<<
"' !!!!!!
\n
"
<<
endl
;
err
=
1
;
err
=
1
;
continue
;
continue
;
}
}
...
@@ -835,16 +835,16 @@ int saveValue(string args, UniversalInterface &ui)
...
@@ -835,16 +835,16 @@ int saveValue(string args, UniversalInterface &ui)
else
else
{
{
int
ind
;
int
ind
;
string
name
,
strval
;
string
strval
;
ind
=
arg
.
find_first_of
(
"="
);
ind
=
arg
.
find_first_of
(
"="
);
name
=
conf
->
getSensorsSection
()
+
"/"
+
arg
.
substr
(
0
,
ind
);
string
name
(
arg
.
substr
(
0
,
ind
)
);
strval
=
arg
.
substr
(
ind
+
1
,
arg
.
length
()
);
strval
=
arg
.
substr
(
ind
+
1
,
arg
.
length
()
);
sid
=
conf
->
oind
->
getIdByName
(
name
);
sid
=
conf
->
getSensorID
(
name
);
if
(
sid
==
UniSetTypes
::
DefaultObjectId
||
(
sscanf
(
strval
.
c_str
(),
"%ld"
,
&
val
)
<
1
)
)
if
(
sid
==
UniSetTypes
::
DefaultObjectId
||
(
sscanf
(
strval
.
c_str
(),
"%ld"
,
&
val
)
<
1
)
)
{
{
cout
<<
i
<<
"
\t
------------------------"
<<
endl
;
cout
<<
i
<<
"
\t
------------------------"
<<
endl
;
cerr
<<
"
!!!!!!
!!! SensorName=Value #"
<<
i
<<
" '"
<<
arg
<<
"' !!!!!!
\n
"
<<
endl
;
cerr
<<
"
(name):
!!! SensorName=Value #"
<<
i
<<
" '"
<<
arg
<<
"' !!!!!!
\n
"
<<
endl
;
err
=
1
;
err
=
1
;
continue
;
continue
;
}
}
...
@@ -896,11 +896,11 @@ int saveState(string args, UniversalInterface &ui)
...
@@ -896,11 +896,11 @@ int saveState(string args, UniversalInterface &ui)
else
else
{
{
int
ind
;
int
ind
;
string
name
,
strval
;
string
strval
;
ind
=
arg
.
find_first_of
(
"="
);
ind
=
arg
.
find_first_of
(
"="
);
name
=
conf
->
getSensorsSection
()
+
"/"
+
arg
.
substr
(
0
,
ind
);
string
name
(
arg
.
substr
(
0
,
ind
)
);
strval
=
arg
.
substr
(
ind
+
1
,
arg
.
length
()
);
strval
=
arg
.
substr
(
ind
+
1
,
arg
.
length
()
);
sid
=
conf
->
oind
->
getIdByName
(
name
);
sid
=
conf
->
getSensorID
(
name
);
if
(
sid
==
UniSetTypes
::
DefaultObjectId
||
(
sscanf
(
strval
.
c_str
(),
"%ld"
,
&
inval
)
<
1
)
)
if
(
sid
==
UniSetTypes
::
DefaultObjectId
||
(
sscanf
(
strval
.
c_str
(),
"%ld"
,
&
inval
)
<
1
)
)
{
{
...
@@ -965,11 +965,11 @@ int setValue(string args, UniversalInterface &ui)
...
@@ -965,11 +965,11 @@ int setValue(string args, UniversalInterface &ui)
else
else
{
{
int
ind
;
int
ind
;
string
name
,
strval
;
string
strval
;
ind
=
arg
.
find_first_of
(
"="
);
ind
=
arg
.
find_first_of
(
"="
);
name
=
conf
->
getSensorsSection
()
+
"/"
+
arg
.
substr
(
0
,
ind
);
string
name
(
arg
.
substr
(
0
,
ind
)
);
strval
=
arg
.
substr
(
ind
+
1
,
arg
.
length
()
);
strval
=
arg
.
substr
(
ind
+
1
,
arg
.
length
()
);
sid
=
conf
->
oind
->
getIdByName
(
name
);
sid
=
conf
->
getSensorID
(
name
);
if
(
sid
==
UniSetTypes
::
DefaultObjectId
||
(
sscanf
(
strval
.
c_str
(),
"%ld"
,
&
val
)
<
1
)
)
if
(
sid
==
UniSetTypes
::
DefaultObjectId
||
(
sscanf
(
strval
.
c_str
(),
"%ld"
,
&
val
)
<
1
)
)
{
{
...
@@ -1025,15 +1025,15 @@ int setState(string args, UniversalInterface &ui)
...
@@ -1025,15 +1025,15 @@ int setState(string args, UniversalInterface &ui)
else
else
{
{
int
ind
;
int
ind
;
string
name
,
strval
;
string
strval
;
ind
=
arg
.
find_first_of
(
"="
);
ind
=
arg
.
find_first_of
(
"="
);
name
=
conf
->
getSensorsSection
()
+
"/"
+
arg
.
substr
(
0
,
ind
);
string
name
(
arg
.
substr
(
0
,
ind
)
);
strval
=
arg
.
substr
(
ind
+
1
,
arg
.
length
()
);
strval
=
arg
.
substr
(
ind
+
1
,
arg
.
length
()
);
sid
=
conf
->
oind
->
getIdByName
(
name
);
sid
=
conf
->
getSensorID
(
name
);
if
(
sid
==
UniSetTypes
::
DefaultObjectId
||
(
sscanf
(
strval
.
c_str
(),
"%ld"
,
&
inval
)
<
1
)
)
if
(
sid
==
UniSetTypes
::
DefaultObjectId
||
(
sscanf
(
strval
.
c_str
(),
"%ld"
,
&
inval
)
<
1
)
)
{
{
cout
<<
i
<<
"
\t
------------------------"
<<
endl
;
cout
<<
i
<<
"
\t
------------------------"
<<
endl
;
cerr
<<
"!!!!!!!!! SensorName=State #"
<<
i
<<
" '"
<<
arg
<<
"' !!!!!!
\n
"
<<
endl
;
cerr
<<
"!!!!!!!!! SensorName=State #"
<<
i
<<
" '"
<<
arg
<<
"' !!!!!!
\n
"
<<
endl
;
err
=
1
;
err
=
1
;
continue
;
continue
;
...
@@ -1097,9 +1097,7 @@ int getState(string args, UniversalInterface &ui)
...
@@ -1097,9 +1097,7 @@ int getState(string args, UniversalInterface &ui)
}
}
else
else
{
{
string
name
;
sid
=
conf
->
getSensorID
(
arg
);
name
=
conf
->
getSensorsSection
()
+
"/"
+
arg
;
sid
=
conf
->
oind
->
getIdByName
(
name
);
if
(
sid
==
UniSetTypes
::
DefaultObjectId
)
if
(
sid
==
UniSetTypes
::
DefaultObjectId
)
{
{
...
@@ -1161,9 +1159,7 @@ int getValue(string args, UniversalInterface &ui )
...
@@ -1161,9 +1159,7 @@ int getValue(string args, UniversalInterface &ui )
}
}
else
else
{
{
string
name
;
sid
=
conf
->
getSensorID
(
arg
);
name
=
conf
->
getSensorsSection
()
+
"/"
+
arg
;
sid
=
conf
->
oind
->
getIdByName
(
name
);
if
(
sid
==
UniSetTypes
::
DefaultObjectId
)
if
(
sid
==
UniSetTypes
::
DefaultObjectId
)
{
{
...
...
conf/libuniset.spec
View file @
180c78b0
...
@@ -3,7 +3,7 @@
...
@@ -3,7 +3,7 @@
Name: libuniset
Name: libuniset
Version: 0.96
Version: 0.96
Release: eter6
0
Release: eter6
1
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++
...
@@ -179,6 +179,9 @@ rm -f %buildroot%_libdir/*.la
...
@@ -179,6 +179,9 @@ rm -f %buildroot%_libdir/*.la
%exclude %_pkgconfigdir/libUniSet.pc
%exclude %_pkgconfigdir/libUniSet.pc
%changelog
%changelog
* Thu Sep 10 2009 Pavel Vainerman <pv@etersoft.ru> 0.96-eter60
- rebuild for eterbook
* Thu Sep 10 2009 Pavel Vainerman <pv@altlinux.ru> 0.96-eter59
* Thu Sep 10 2009 Pavel Vainerman <pv@altlinux.ru> 0.96-eter59
- UniNetwork debugging
- UniNetwork debugging
...
...
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