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
4134ce15
Commit
4134ce15
authored
Oct 24, 2010
by
Pavel Vainerman
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fixed minor bug in ORepHelpers::getShortName
parent
2edec4a3
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
21 additions
and
7 deletions
+21
-7
TODO
TODO
+5
-0
libuniset.spec
conf/libuniset.spec
+4
-1
ORepHelpers.cc
src/ObjectRepository/ORepHelpers.cc
+7
-6
conftest.cc
tests/conftest.cc
+5
-0
No files found.
TODO
View file @
4134ce15
...
...
@@ -19,6 +19,11 @@
- Везде где используется sstream и вызов str(), надо делать ss.rdbuf()->freeze(0);
(http://www.intuit.ru/department/pl/cpp/17/2.html)
- (IONotifyController): Разработать механизм заказа переодических уведомлений (msec), независимо от того, менялись ли датчики..
- (IONotifyController): Разработать механизм заказа группы датчиков сразу (и ответ тоже группой)
Вынести IOController_i::SensorInfo просто в UniSetTypes
(там же где ConsumerInfo и т.п.). И перевести uniset-codegen,
...
...
conf/libuniset.spec
View file @
4134ce15
...
...
@@ -3,7 +3,7 @@
Name: libuniset
Version: 0.99
Release: eter
9
Release: eter
11
Summary: UniSet - library for building distributed industrial control systems
License: GPL
Group: Development/C++
...
...
@@ -184,6 +184,9 @@ rm -f %buildroot%_libdir/*.la
%exclude %_pkgconfigdir/libUniSet.pc
%changelog
* Mon Oct 18 2010 Pavel Vainerman <pv@altlinux.ru> 0.99-eter9
- new build
* Wed Oct 13 2010 Ilya Shpigor <elly@altlinux.org> 0.99-eter8
- fix bug in ModbusTCPServer
- add gateway imitation to uniset-mbtcpserver-echo
...
...
src/ObjectRepository/ORepHelpers.cc
View file @
4134ce15
...
...
@@ -193,12 +193,13 @@ namespace ORepHelpers
*/
const
string
getShortName
(
const
string
&
fname
,
const
std
::
string
brk
)
{
// string::size_type pos = fullName.rfind(brk);
// if( pos == string::npos )
// return fullName;
//
// return fullName.substr( pos+1, fullName.length() );
/*
string::size_type pos = fname.rfind(brk);
if( pos == string::npos )
return fname;
return fname.substr( pos+1, fname.length() );
*/
string
::
size_type
pos1
=
fname
.
rfind
(
brk
);
string
::
size_type
pos2
=
fname
.
rfind
(
conf
->
oind
->
sepName
);
...
...
@@ -209,7 +210,7 @@ namespace ORepHelpers
return
fname
.
substr
(
0
,
pos2
);
if
(
pos2
==
string
::
npos
)
return
fname
.
substr
(
pos1
+
1
,
pos1
-
1
);
return
fname
.
substr
(
pos1
+
1
,
fname
.
length
()
);
return
fname
.
substr
(
pos1
+
1
,
pos2
-
pos1
-
1
);
}
...
...
tests/conftest.cc
View file @
4134ce15
...
...
@@ -2,6 +2,7 @@
#include <string>
#include "Debug.h"
#include "Configuration.h"
#include "ORepHelpers.h"
// --------------------------------------------------------------------------
using
namespace
std
;
using
namespace
UniSetTypes
;
...
...
@@ -22,6 +23,10 @@ int main(int argc, const char **argv)
string
t
(
conf
->
oind
->
getTextName
(
1
));
cout
<<
"**** check getTextName: "
<<
(
t
.
empty
()
?
"FAILED"
:
"OK"
)
<<
endl
;
string
ln
(
"/Projects/Sensors/VeryVeryLongNameSensor_ForTest_AS"
);
string
ln_t
(
"VeryVeryLongNameSensor_ForTest_AS"
);
cout
<<
"**** check getShortName: "
<<
(
ln_t
==
ORepHelpers
::
getShortName
(
ln
)
?
"OK"
:
"FAILED"
)
<<
endl
;
string
mn
(
conf
->
oind
->
getMapName
(
1
));
cout
<<
"**** check getMapName: "
<<
(
mn
.
empty
()
?
"FAILED"
:
"OK"
)
<<
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