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
7ac260e4
Commit
7ac260e4
authored
Dec 26, 2011
by
Pavel Vainerman
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Сделал имя NameService уникальным для Configure
parent
2675d22f
Hide whitespace changes
Inline
Side-by-side
Showing
11 changed files
with
40 additions
and
20 deletions
+40
-20
admin.sh
Utilities/Admin/admin.sh
+1
-1
schema.xml
extensions/LogicProcessor/schema.xml
+1
-1
start_fg_plogic.sh
extensions/LogicProcessor/start_fg_plogic.sh
+1
-1
Configuration.h
include/Configuration.h
+1
-1
ObjectRepository.h
include/ObjectRepository.h
+1
-1
UniversalInterface.cc
src/Interfaces/UniversalInterface.cc
+17
-6
ObjectRepository.cc
src/ObjectRepository/ObjectRepository.cc
+5
-0
Configuration.cc
src/Various/Configuration.cc
+8
-2
Makefile.am
tests/Makefile.am
+2
-1
ui.cc
tests/ui.cc
+2
-4
uitest.sh
tests/uitest.sh
+1
-2
No files found.
Utilities/Admin/admin.sh
View file @
7ac260e4
#!/bin/sh
./uniset-start.sh
-f
"./uniset-admin --confile
test
.xml --
`
basename
$0
.sh
`
$1
$2
$3
$4
"
./uniset-start.sh
-f
"./uniset-admin --confile
conf21300
.xml --
`
basename
$0
.sh
`
$1
$2
$3
$4
"
exit
$?
extensions/LogicProcessor/schema.xml
View file @
7ac260e4
...
...
@@ -38,7 +38,7 @@
<item
type=
"int"
from=
"3"
to=
"4"
toInput=
"1"
/>
<item
type=
"int"
from=
"4"
to=
"5"
toInput=
"2"
/>
<item
type=
"int"
from=
"5"
to=
"6"
toInput=
"1"
/>
<item
type=
"out"
from=
"6"
to=
"
Output1_C
"
/>
<item
type=
"out"
from=
"6"
to=
"
TestMode_S
"
/>
</connections>
</Schema>
extensions/LogicProcessor/start_fg_plogic.sh
View file @
7ac260e4
#!/bin/sh
uniset-start.sh
-
g
./uniset-plogicproc
--schema
schema.xml
\
uniset-start.sh
-
f
./uniset-plogicproc
--schema
schema.xml
\
--smemory-id
SharedMemory
--name
LProcessor
\
--confile
test.xml
--unideb-add-levels
info,crit,warn,level9,system
include/Configuration.h
View file @
7ac260e4
...
...
@@ -200,7 +200,7 @@ namespace UniSetTypes
CORBA
::
ORB_var
orb
;
CORBA
::
PolicyList
policyList
;
const
std
::
string
NSName
;
/*!< имя сервиса именования на ланной машине (обычно "NameService") */
std
::
string
NSName
;
/*!< имя сервиса именования на ланной машине (обычно "NameService") */
unsigned
int
countOfNet
;
/*!< количество резервных каналов */
unsigned
int
repeatCount
;
/*!< количество попыток получить доступ к удаленному объекту
прежде чем будет выработано исключение TimeOut. */
...
...
include/ObjectRepository.h
View file @
7ac260e4
...
...
@@ -103,7 +103,7 @@
protected
:
ObjectRepository
();
const
std
::
string
nsName
;
std
::
string
nsName
;
UniSetTypes
::
Configuration
*
uconf
;
bool
list
(
const
std
::
string
&
section
,
UniSetTypes
::
ListObjectName
*
ls
,
unsigned
int
how_many
,
ObjectType
type
);
...
...
src/Interfaces/UniversalInterface.cc
View file @
7ac260e4
...
...
@@ -79,13 +79,16 @@ void UniversalInterface::init()
localctx
=
CosNaming
::
NamingContext
::
_nil
();
try
{
ostringstream
s
;
s
<<
uconf
<<
oind
->
getRealNodeName
(
uconf
->
getLocalNode
());
if
(
CORBA
::
is_nil
(
orb
)
)
{
CORBA
::
ORB_var
_orb
=
uconf
->
getORB
();
localctx
=
ORepHelpers
::
getRootNamingContext
(
_orb
,
oind
->
getRealNodeName
(
uconf
->
getLocalNode
()
)
);
localctx
=
ORepHelpers
::
getRootNamingContext
(
_orb
,
s
.
str
(
)
);
}
else
localctx
=
ORepHelpers
::
getRootNamingContext
(
orb
,
oind
->
getRealNodeName
(
uconf
->
getLocalNode
()
)
);
localctx
=
ORepHelpers
::
getRootNamingContext
(
orb
,
s
.
str
(
)
);
}
catch
(
Exception
&
ex
)
{
...
...
@@ -1714,12 +1717,14 @@ ObjectPtr UniversalInterface::resolve( ObjectId rid , ObjectId node, int timeout
}
}
if
(
node
!=
uconf
->
getLocalNode
()
)
{
cout
<<
"******** Resolve REMOTE NODE ***"
<<
endl
;
// Получаем доступ к NameService на данном узле
string
nodeName
(
oind
->
getRealNodeName
(
node
)
);
ostringstream
s
;
s
<<
uconf
<<
oind
->
getRealNodeName
(
node
);
string
nodeName
(
s
.
str
());
string
bname
(
nodeName
);
// сохраняем базовое название
for
(
unsigned
int
curNet
=
1
;
curNet
<=
uconf
->
getCountOfNet
();
curNet
++
)
{
...
...
@@ -1753,20 +1758,26 @@ ObjectPtr UniversalInterface::resolve( ObjectId rid , ObjectId node, int timeout
}
else
{
cout
<<
"******** Resolve LOCAL NODE ***"
<<
endl
;
if
(
CORBA
::
is_nil
(
localctx
)
)
{
ostringstream
s
;
s
<<
uconf
<<
oind
->
getRealNodeName
(
node
);
string
nodeName
(
s
.
str
());
if
(
CORBA
::
is_nil
(
orb
)
)
{
CORBA
::
ORB_var
_orb
=
uconf
->
getORB
();
localctx
=
ORepHelpers
::
getRootNamingContext
(
_orb
,
oind
->
getRealNodeName
(
uconf
->
getLocalNode
())
);
localctx
=
ORepHelpers
::
getRootNamingContext
(
_orb
,
nodeName
);
}
else
localctx
=
ORepHelpers
::
getRootNamingContext
(
orb
,
oind
->
getRealNodeName
(
uconf
->
getLocalNode
())
);
localctx
=
ORepHelpers
::
getRootNamingContext
(
orb
,
nodeName
);
}
else
ctx
=
localctx
;
}
ctx
=
localctx
;
cout
<<
"***resolve oname="
<<
oind
->
getNameById
(
rid
,
node
).
c_str
()
<<
endl
;
CosNaming
::
Name_var
oname
=
omniURI
::
stringToName
(
oind
->
getNameById
(
rid
,
node
).
c_str
()
);
for
(
unsigned
int
i
=
0
;
i
<
uconf
->
getRepeatCount
();
i
++
)
{
...
...
src/ObjectRepository/ObjectRepository.cc
View file @
7ac260e4
...
...
@@ -67,6 +67,11 @@ bool ObjectRepository::init()
try
{
CORBA
::
ORB_var
orb
=
uconf
->
getORB
();
{
ostringstream
s
;
s
<<
uconf
<<
"NameService"
;
nsName
=
s
.
str
();
}
localctx
=
ORepHelpers
::
getRootNamingContext
(
orb
,
nsName
);
if
(
CORBA
::
is_nil
(
localctx
)
)
localctx
=
0
;
...
...
src/Various/Configuration.cc
View file @
7ac260e4
...
...
@@ -200,6 +200,12 @@ void Configuration::initConfiguration( int argc, const char* const* argv )
rootDir
=
string
(
curdir
)
+
"/"
;
UniSetTypes
::
conf
=
this
;
{
ostringstream
s
;
s
<<
this
<<
"NameService"
;
NSName
=
s
.
str
();
}
try
{
...
...
@@ -329,7 +335,7 @@ void Configuration::initConfiguration( int argc, const char* const* argv )
string
name
(
oind
->
getRealNodeName
(
it
->
id
));
ostringstream
param
;
param
<<
name
<<
"=corbaname::"
<<
it
->
host
<<
":"
<<
it
->
port
;
param
<<
this
<<
name
<<
"=corbaname::"
<<
it
->
host
<<
":"
<<
it
->
port
;
new_argv
[
i
+
1
]
=
strdup
(
param
.
str
().
c_str
());
if
(
unideb
.
debugging
(
Debug
::
INFO
)
)
...
...
@@ -359,7 +365,7 @@ void Configuration::initConfiguration( int argc, const char* const* argv )
string
defPort
(
getPort
(
getProp
(
nsnode
,
"port"
)
)
);
// здесь вызывается getArgParam! проходящий по _argv
ostringstream
param
;
param
<<
"NameService=corbaname::"
<<
getProp
(
nsnode
,
"host"
)
<<
":"
<<
defPort
;
param
<<
this
<<
"NameService=corbaname::"
<<
getProp
(
nsnode
,
"host"
)
<<
":"
<<
defPort
;
new_argv
[
i
+
1
]
=
strdup
(
param
.
str
().
c_str
());
if
(
unideb
.
debugging
(
Debug
::
INFO
)
)
unideb
[
Debug
::
INFO
]
<<
"(Configuration): внесли параметр "
<<
param
.
str
()
<<
endl
;
...
...
tests/Makefile.am
View file @
7ac260e4
...
...
@@ -4,7 +4,8 @@
SUBDIRS
=
JrnTests
noinst_PROGRAMS
=
passivetimer unixml ui umutex conftest iterator_test sscanf_hex calibration
noinst_PROGRAMS
=
ui
#passivetimer unixml ui umutex conftest iterator_test sscanf_hex calibration
passivetimer_SOURCES
=
passivetimer.cc
passivetimer_LDADD
=
$(top_builddir)
/lib/libUniSet.la
...
...
tests/ui.cc
View file @
7ac260e4
...
...
@@ -9,17 +9,15 @@ int main( int argc, const char **argv )
{
try
{
//
UniSetTypes::Configuration* myconf = new UniSetTypes::Configuration(argc,argv,"test.xml");
UniSetTypes
::
Configuration
*
myconf
=
new
UniSetTypes
::
Configuration
(
argc
,
argv
,
"test.xml"
);
// UniversalInterface* ui = new UniversalInterface(myconf);
//cout << "************************ myconf=" << myconf << " conf=" << UniSetTypes::conf << endl;
UniSetTypes
::
Configuration
*
myconf2
=
new
UniSetTypes
::
Configuration
(
argc
,
argv
,
"conf21300.xml"
);
UniversalInterface
*
ui2
=
new
UniversalInterface
(
myconf2
);
cout
<<
"************************
myconf2="
<<
myconf2
<<
" conf="
<<
UniSetTypes
::
conf
<<
endl
;
cout
<<
"************************
"
<<
ui2
->
getValue
(
200033
)
<<
endl
;
// cout << "Conf1: get=" << ui1->getValue(12) << endl;
cout
<<
"Conf2: get="
<<
ui2
->
getValue
(
200033
)
<<
endl
;
#if 0
uniset_init(argc,argv,"test.xml");
UniversalInterface ui;
...
...
tests/uitest.sh
View file @
7ac260e4
...
...
@@ -4,6 +4,5 @@ SID=$1
[
-z
"
$SID
"
]
&&
SID
=
1
uniset-start.sh
-f
./ui
--confile
test.xml
--sid
$SID
-ORBtraceLevel
20
#--unideb-add-levels system,info,level9
uniset-start.sh
-f
./ui
--confile
test.xml
--sid
$SID
--unideb-add-levels
any
-ORBtraceLevel
20
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