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
1e4af3a1
Commit
1e4af3a1
authored
Aug 03, 2009
by
Vitaly Lipatov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
use const for char **argv
parent
fee92b77
Hide whitespace changes
Inline
Side-by-side
Showing
34 changed files
with
86 additions
and
86 deletions
+86
-86
admin.cc
Utilities/Admin/admin.cc
+2
-2
main.cc
Utilities/DBServer-MySQL/main.cc
+1
-1
main.cc
Utilities/InfoServer/main.cc
+1
-1
main.cc
Utilities/NullController/main.cc
+1
-1
smonitor.cc
Utilities/SMonit/smonitor.cc
+1
-1
main.cc
Utilities/SViewer-text/main.cc
+1
-1
ctl-cpp-main.xsl
Utilities/codegen/ctl-cpp-main.xsl
+2
-2
IOControl.cc
extensions/IOControl/IOControl.cc
+3
-3
IOControl.h
extensions/IOControl/IOControl.h
+2
-2
iocontrol.cc
extensions/IOControl/iocontrol.cc
+1
-1
logicproc.cc
extensions/LogicProcessor/logicproc.cc
+1
-1
plogicproc.cc
extensions/LogicProcessor/plogicproc.cc
+1
-1
MBMaster.cc
extensions/MBTCPMaster/MBMaster.cc
+3
-3
MBMaster.h
extensions/MBTCPMaster/MBMaster.h
+2
-2
main.cc
extensions/MBTCPMaster/main.cc
+3
-3
MBSlave.cc
extensions/ModbusSlave/MBSlave.cc
+2
-2
MBSlave.h
extensions/ModbusSlave/MBSlave.h
+2
-2
mbslave.cc
extensions/ModbusSlave/mbslave.cc
+1
-1
RTUExchange.cc
extensions/RTUExchange/RTUExchange.cc
+2
-2
RTUExchange.h
extensions/RTUExchange/RTUExchange.h
+2
-2
mtrconv.cc
extensions/RTUExchange/mtrconv.cc
+1
-1
rtuexchange.cc
extensions/RTUExchange/rtuexchange.cc
+3
-3
vtconv.cc
extensions/RTUExchange/vtconv.cc
+1
-1
main.cc
extensions/SMViewer/main.cc
+1
-1
SharedMemory.cc
extensions/SharedMemory/SharedMemory.cc
+3
-3
SharedMemory.h
extensions/SharedMemory/SharedMemory.h
+3
-3
smemory.cc
extensions/SharedMemory/smemory.cc
+3
-3
udpexchange.cc
extensions/UDPExchange/udpexchange.cc
+1
-1
Configuration.h
include/Configuration.h
+7
-7
ORepHelpers.h
include/ORepHelpers.h
+3
-3
UniSetTypes.h
include/UniSetTypes.h
+2
-2
ORepHelpers.cc
src/ObjectRepository/ORepHelpers.cc
+2
-2
ObjectRepositoryFactory.cc
src/ObjectRepository/ObjectRepositoryFactory.cc
+8
-8
Configuration.cc
src/Various/Configuration.cc
+14
-14
No files found.
Utilities/Admin/admin.cc
View file @
1e4af3a1
...
@@ -151,7 +151,7 @@ static void usage()
...
@@ -151,7 +151,7 @@ static void usage()
TransportMessage .
TransportMessage .
*/
*/
// --------------------------------------------------------------------------------------
// --------------------------------------------------------------------------------------
int
main
(
int
argc
,
c
har
*
argv
[]
)
int
main
(
int
argc
,
c
onst
char
**
argv
)
{
{
try
try
{
{
...
@@ -159,7 +159,7 @@ int main(int argc, char* argv[])
...
@@ -159,7 +159,7 @@ int main(int argc, char* argv[])
char
opt
=
0
;
char
opt
=
0
;
while
(
(
opt
=
getopt_long
(
argc
,
argv
,
"hc:beomsfur:l:a:n:d:i:v:t:x:j:g:k:w:p:y:"
,
longopts
,
&
optindex
))
!=
-
1
)
while
(
(
opt
=
getopt_long
(
argc
,
(
char
*
const
*
)
argv
,
"hc:beomsfur:l:a:n:d:i:v:t:x:j:g:k:w:p:y:"
,
longopts
,
&
optindex
))
!=
-
1
)
{
{
switch
(
opt
)
//
switch
(
opt
)
//
{
{
...
...
Utilities/DBServer-MySQL/main.cc
View file @
1e4af3a1
...
@@ -13,7 +13,7 @@ static void short_usage()
...
@@ -13,7 +13,7 @@ static void short_usage()
cout
<<
"Usage: uniset-dbserver [--name ObjectId] [--confile configure.xml]
\n
"
;
cout
<<
"Usage: uniset-dbserver [--name ObjectId] [--confile configure.xml]
\n
"
;
}
}
// --------------------------------------------------------------------------
// --------------------------------------------------------------------------
int
main
(
int
argc
,
char
**
argv
)
int
main
(
int
argc
,
const
char
**
argv
)
{
{
try
try
{
{
...
...
Utilities/InfoServer/main.cc
View file @
1e4af3a1
...
@@ -15,7 +15,7 @@ static void short_usage()
...
@@ -15,7 +15,7 @@ static void short_usage()
<<
" [--confile configure.xml]
\n
"
;
<<
" [--confile configure.xml]
\n
"
;
}
}
// --------------------------------------------------------------------------
// --------------------------------------------------------------------------
int
main
(
int
argc
,
char
**
argv
)
int
main
(
int
argc
,
const
char
**
argv
)
{
{
try
try
{
{
...
...
Utilities/NullController/main.cc
View file @
1e4af3a1
...
@@ -22,7 +22,7 @@ static void short_usage()
...
@@ -22,7 +22,7 @@ static void short_usage()
<<
" --dbDumping [0,1] - dump-
\n
"
;
<<
" --dbDumping [0,1] - dump-
\n
"
;
}
}
// --------------------------------------------------------------------------
// --------------------------------------------------------------------------
int
main
(
int
argc
,
char
**
argv
)
int
main
(
int
argc
,
const
char
**
argv
)
{
{
try
try
{
{
...
...
Utilities/SMonit/smonitor.cc
View file @
1e4af3a1
...
@@ -9,7 +9,7 @@
...
@@ -9,7 +9,7 @@
using
namespace
UniSetTypes
;
using
namespace
UniSetTypes
;
using
namespace
std
;
using
namespace
std
;
// -----------------------------------------------------------------------------
// -----------------------------------------------------------------------------
int
main
(
int
argc
,
char
**
argv
)
int
main
(
int
argc
,
c
onst
c
har
**
argv
)
{
{
try
try
{
{
...
...
Utilities/SViewer-text/main.cc
View file @
1e4af3a1
...
@@ -12,7 +12,7 @@ static void short_usage()
...
@@ -12,7 +12,7 @@ static void short_usage()
cout
<<
"Usage: uniset-sviewer-text [--fullname] [--polltime msec] [--confile uniset-confile]
\n
"
;
cout
<<
"Usage: uniset-sviewer-text [--fullname] [--polltime msec] [--confile uniset-confile]
\n
"
;
}
}
// --------------------------------------------------------------------------
// --------------------------------------------------------------------------
int
main
(
int
argc
,
char
**
argv
)
int
main
(
int
argc
,
c
onst
c
har
**
argv
)
{
{
try
try
{
{
...
...
Utilities/codegen/ctl-cpp-main.xsl
View file @
1e4af3a1
...
@@ -38,7 +38,7 @@
...
@@ -38,7 +38,7 @@
using namespace std;
using namespace std;
using namespace UniSetTypes;
using namespace UniSetTypes;
// -----------------------------------------------------------------------------
// -----------------------------------------------------------------------------
int main( int argc, c
har* argv[]
)
int main( int argc, c
onst char** argv
)
{
{
if( argc>1
&&
strcmp(argv[1],"--help")==0 )
if( argc>1
&&
strcmp(argv[1],"--help")==0 )
{
{
...
@@ -51,7 +51,7 @@ int main( int argc, char* argv[] )
...
@@ -51,7 +51,7 @@ int main( int argc, char* argv[] )
try
try
{
{
string confile = UniSetTypes::getArgParam( "--confile", argc, argv, "configure.xml" );
string confile = UniSetTypes::getArgParam( "--confile", argc, argv, "configure.xml" );
conf = new Configuration(argc, argv,confile);
conf = new Configuration(argc, argv,
confile);
string logfilename = conf->getArgParam("--logfile","
<xsl:value-of
select=
"$CLASSNAME"
/>
.log");
string logfilename = conf->getArgParam("--logfile","
<xsl:value-of
select=
"$CLASSNAME"
/>
.log");
...
...
extensions/IOControl/IOControl.cc
View file @
1e4af3a1
...
@@ -873,7 +873,7 @@ void IOControl::check_testlamp()
...
@@ -873,7 +873,7 @@ void IOControl::check_testlamp()
}
}
// -----------------------------------------------------------------------------
// -----------------------------------------------------------------------------
IOControl
*
IOControl
::
init_iocontrol
(
int
argc
,
c
har
*
argv
[],
IOControl
*
IOControl
::
init_iocontrol
(
int
argc
,
c
onst
char
**
argv
,
UniSetTypes
::
ObjectId
icID
,
SharedMemory
*
ic
)
UniSetTypes
::
ObjectId
icID
,
SharedMemory
*
ic
)
{
{
string
name
=
conf
->
getArgParam
(
"--io-name"
,
"IOControl1"
);
string
name
=
conf
->
getArgParam
(
"--io-name"
,
"IOControl1"
);
...
@@ -883,7 +883,7 @@ IOControl* IOControl::init_iocontrol( int argc, char* argv[],
...
@@ -883,7 +883,7 @@ IOControl* IOControl::init_iocontrol( int argc, char* argv[],
return
0
;
return
0
;
}
}
ObjectId
ID
=
conf
->
getObjectID
(
name
);
ObjectId
ID
=
conf
->
getObjectID
(
name
);
if
(
ID
==
UniSetTypes
::
DefaultObjectId
)
if
(
ID
==
UniSetTypes
::
DefaultObjectId
)
{
{
cerr
<<
"(iocontrol): '"
<<
name
cerr
<<
"(iocontrol): '"
<<
name
...
@@ -901,7 +901,7 @@ IOControl* IOControl::init_iocontrol( int argc, char* argv[],
...
@@ -901,7 +901,7 @@ IOControl* IOControl::init_iocontrol( int argc, char* argv[],
return
new
IOControl
(
ID
,
icID
,
ic
,
numcards
);
return
new
IOControl
(
ID
,
icID
,
ic
,
numcards
);
}
}
// -----------------------------------------------------------------------------
// -----------------------------------------------------------------------------
void
IOControl
::
help_print
(
int
argc
,
c
har
*
argv
[]
)
void
IOControl
::
help_print
(
int
argc
,
c
onst
char
**
argv
)
{
{
cout
<<
"--io-confnode name - xml-"
<<
endl
;
cout
<<
"--io-confnode name - xml-"
<<
endl
;
cout
<<
"--io-name name - ID . IOController1."
<<
endl
;
cout
<<
"--io-name name - ID . IOController1."
<<
endl
;
...
...
extensions/IOControl/IOControl.h
View file @
1e4af3a1
...
@@ -67,10 +67,10 @@ class IOControl:
...
@@ -67,10 +67,10 @@ class IOControl:
virtual
~
IOControl
();
virtual
~
IOControl
();
/*! */
/*! */
static
IOControl
*
init_iocontrol
(
int
argc
,
c
har
*
argv
[],
static
IOControl
*
init_iocontrol
(
int
argc
,
c
onst
char
**
argv
,
UniSetTypes
::
ObjectId
icID
,
SharedMemory
*
ic
=
0
);
UniSetTypes
::
ObjectId
icID
,
SharedMemory
*
ic
=
0
);
/*! help- */
/*! help- */
static
void
help_print
(
int
argc
,
c
har
*
argv
[]
);
static
void
help_print
(
int
argc
,
c
onst
char
**
argv
);
// inline std::string getName(){ return myname; }
// inline std::string getName(){ return myname; }
...
...
extensions/IOControl/iocontrol.cc
View file @
1e4af3a1
...
@@ -11,7 +11,7 @@ using namespace UniSetTypes;
...
@@ -11,7 +11,7 @@ using namespace UniSetTypes;
using
namespace
std
;
using
namespace
std
;
using
namespace
UniSetExtensions
;
using
namespace
UniSetExtensions
;
// --------------------------------------------------------------------------
// --------------------------------------------------------------------------
int
main
(
int
argc
,
char
**
argv
)
int
main
(
int
argc
,
c
onst
c
har
**
argv
)
{
{
if
(
argc
>
1
&&
strcmp
(
argv
[
1
],
"--help"
)
==
0
)
if
(
argc
>
1
&&
strcmp
(
argv
[
1
],
"--help"
)
==
0
)
{
{
...
...
extensions/LogicProcessor/logicproc.cc
View file @
1e4af3a1
...
@@ -7,7 +7,7 @@ using namespace std;
...
@@ -7,7 +7,7 @@ using namespace std;
using
namespace
UniSetTypes
;
using
namespace
UniSetTypes
;
using
namespace
UniSetExtensions
;
using
namespace
UniSetExtensions
;
// -----------------------------------------------------------------------------
// -----------------------------------------------------------------------------
int
main
(
int
argc
,
char
**
argv
)
int
main
(
int
argc
,
c
onst
c
har
**
argv
)
{
{
try
try
{
{
...
...
extensions/LogicProcessor/plogicproc.cc
View file @
1e4af3a1
...
@@ -9,7 +9,7 @@ using namespace std;
...
@@ -9,7 +9,7 @@ using namespace std;
using
namespace
UniSetTypes
;
using
namespace
UniSetTypes
;
using
namespace
UniSetExtensions
;
using
namespace
UniSetExtensions
;
// -----------------------------------------------------------------------------
// -----------------------------------------------------------------------------
int
main
(
int
argc
,
char
**
argv
)
int
main
(
int
argc
,
c
onst
c
har
**
argv
)
{
{
try
try
{
{
...
...
extensions/MBTCPMaster/MBMaster.cc
View file @
1e4af3a1
...
@@ -795,11 +795,11 @@ void MBMaster::initIterators()
...
@@ -795,11 +795,11 @@ void MBMaster::initIterators()
shm
->
initAIterator
(
aitHeartBeat
);
shm
->
initAIterator
(
aitHeartBeat
);
}
}
// -----------------------------------------------------------------------------
// -----------------------------------------------------------------------------
void
MBMaster
::
help_print
(
int
argc
,
c
har
*
argv
[]
)
void
MBMaster
::
help_print
(
int
argc
,
c
onst
char
**
argv
)
{
{
cout
<<
"Default: prefix='mbtcp'"
<<
endl
;
cout
<<
"Default: prefix='mbtcp'"
<<
endl
;
cout
<<
"--prefix-polltime msec - . 200 ."
<<
endl
;
cout
<<
"--prefix-polltime msec - . 200 ."
<<
endl
;
cout
<<
"--prefix-heartbeat-id - heartbeat-."
<<
endl
;
cout
<<
"--prefix-heartbeat-id - heartbeat-."
<<
endl
;
cout
<<
"--prefix-heartbeat-max - heartbeat-ޣ . 10."
<<
endl
;
cout
<<
"--prefix-heartbeat-max - heartbeat-ޣ . 10."
<<
endl
;
cout
<<
"--prefix-ready-timeout - SM , . (-1 - '')"
<<
endl
;
cout
<<
"--prefix-ready-timeout - SM , . (-1 - '')"
<<
endl
;
cout
<<
"--prefix-force - SM, , "
<<
endl
;
cout
<<
"--prefix-force - SM, , "
<<
endl
;
...
@@ -813,7 +813,7 @@ void MBMaster::help_print( int argc, char* argv[] )
...
@@ -813,7 +813,7 @@ void MBMaster::help_print( int argc, char* argv[] )
cout
<<
"--prefix-recv-timeout - ."
<<
endl
;
cout
<<
"--prefix-recv-timeout - ."
<<
endl
;
}
}
// -----------------------------------------------------------------------------
// -----------------------------------------------------------------------------
MBMaster
*
MBMaster
::
init_mbmaster
(
int
argc
,
c
har
*
argv
[]
,
UniSetTypes
::
ObjectId
shmID
,
SharedMemory
*
ic
,
MBMaster
*
MBMaster
::
init_mbmaster
(
int
argc
,
c
onst
char
**
argv
,
UniSetTypes
::
ObjectId
shmID
,
SharedMemory
*
ic
,
std
::
string
prefix
)
std
::
string
prefix
)
{
{
string
name
=
conf
->
getArgParam
(
"--"
+
prefix
+
"-name"
,
"MBTCPMaster1"
);
string
name
=
conf
->
getArgParam
(
"--"
+
prefix
+
"-name"
,
"MBTCPMaster1"
);
...
...
extensions/MBTCPMaster/MBMaster.h
View file @
1e4af3a1
...
@@ -24,11 +24,11 @@ class MBMaster:
...
@@ -24,11 +24,11 @@ class MBMaster:
virtual
~
MBMaster
();
virtual
~
MBMaster
();
/*! */
/*! */
static
MBMaster
*
init_mbmaster
(
int
argc
,
c
har
*
argv
[]
,
UniSetTypes
::
ObjectId
shmID
,
SharedMemory
*
ic
=
0
,
static
MBMaster
*
init_mbmaster
(
int
argc
,
c
onst
char
**
argv
,
UniSetTypes
::
ObjectId
shmID
,
SharedMemory
*
ic
=
0
,
std
::
string
prefix
=
"mbtcp"
);
std
::
string
prefix
=
"mbtcp"
);
/*! help- */
/*! help- */
static
void
help_print
(
int
argc
,
c
har
*
argv
[]
);
static
void
help_print
(
int
argc
,
c
onst
char
**
argv
);
static
const
int
NoSafetyState
=-
1
;
static
const
int
NoSafetyState
=-
1
;
...
...
extensions/MBTCPMaster/main.cc
View file @
1e4af3a1
...
@@ -11,7 +11,7 @@ using namespace std;
...
@@ -11,7 +11,7 @@ using namespace std;
using
namespace
UniSetTypes
;
using
namespace
UniSetTypes
;
using
namespace
UniSetExtensions
;
using
namespace
UniSetExtensions
;
// -----------------------------------------------------------------------------
// -----------------------------------------------------------------------------
int
main
(
int
argc
,
char
**
argv
)
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"
))
)
{
{
...
@@ -19,13 +19,13 @@ int main( int argc,char** argv )
...
@@ -19,13 +19,13 @@ int main( int argc,char** argv )
cout
<<
"--confile filename - configuration file. Default: configure.xml"
<<
endl
;
cout
<<
"--confile filename - configuration file. Default: configure.xml"
<<
endl
;
cout
<<
"--mbtcp-logfile filename - logfilename. Default: mbtcpmaster.log"
<<
endl
;
cout
<<
"--mbtcp-logfile filename - logfilename. Default: mbtcpmaster.log"
<<
endl
;
cout
<<
endl
;
cout
<<
endl
;
MBMaster
::
help_print
(
argc
,
argv
);
MBMaster
::
help_print
(
argc
,
argv
);
return
0
;
return
0
;
}
}
try
try
{
{
string
confile
=
UniSetTypes
::
getArgParam
(
"--confile"
,
argc
,
argv
,
"configure.xml"
);
string
confile
=
UniSetTypes
::
getArgParam
(
"--confile"
,
argc
,
argv
,
"configure.xml"
);
conf
=
new
Configuration
(
argc
,
argv
,
confile
);
conf
=
new
Configuration
(
argc
,
argv
,
confile
);
string
logfilename
(
conf
->
getArgParam
(
"--mbtcp-logfile"
));
string
logfilename
(
conf
->
getArgParam
(
"--mbtcp-logfile"
));
...
...
extensions/ModbusSlave/MBSlave.cc
View file @
1e4af3a1
...
@@ -748,7 +748,7 @@ void MBSlave::initIterators()
...
@@ -748,7 +748,7 @@ void MBSlave::initIterators()
shm
->
initAIterator
(
aitAskCount
);
shm
->
initAIterator
(
aitAskCount
);
}
}
// -----------------------------------------------------------------------------
// -----------------------------------------------------------------------------
void
MBSlave
::
help_print
(
int
argc
,
c
har
*
argv
[]
)
void
MBSlave
::
help_print
(
int
argc
,
c
onst
char
**
argv
)
{
{
cout
<<
"Default: prefix='mbtcp'"
<<
endl
;
cout
<<
"Default: prefix='mbtcp'"
<<
endl
;
cout
<<
"--prefix-heartbeat-id - heartbeat-."
<<
endl
;
cout
<<
"--prefix-heartbeat-id - heartbeat-."
<<
endl
;
...
@@ -771,7 +771,7 @@ void MBSlave::help_print( int argc, char* argv[] )
...
@@ -771,7 +771,7 @@ void MBSlave::help_print( int argc, char* argv[] )
cout
<<
"--prefix-inet-port num - this modbus server port. Default: 502"
<<
endl
;
cout
<<
"--prefix-inet-port num - this modbus server port. Default: 502"
<<
endl
;
}
}
// -----------------------------------------------------------------------------
// -----------------------------------------------------------------------------
MBSlave
*
MBSlave
::
init_mbslave
(
int
argc
,
c
har
*
argv
[]
,
UniSetTypes
::
ObjectId
icID
,
SharedMemory
*
ic
,
MBSlave
*
MBSlave
::
init_mbslave
(
int
argc
,
c
onst
char
**
argv
,
UniSetTypes
::
ObjectId
icID
,
SharedMemory
*
ic
,
string
prefix
)
string
prefix
)
{
{
string
name
=
conf
->
getArgParam
(
"--"
+
prefix
+
"-name"
,
"MBSlave1"
);
string
name
=
conf
->
getArgParam
(
"--"
+
prefix
+
"-name"
,
"MBSlave1"
);
...
...
extensions/ModbusSlave/MBSlave.h
View file @
1e4af3a1
...
@@ -26,12 +26,12 @@ class MBSlave:
...
@@ -26,12 +26,12 @@ class MBSlave:
virtual
~
MBSlave
();
virtual
~
MBSlave
();
/*! */
/*! */
static
MBSlave
*
init_mbslave
(
int
argc
,
c
har
*
argv
[],
static
MBSlave
*
init_mbslave
(
int
argc
,
c
onst
char
**
argv
,
UniSetTypes
::
ObjectId
shmID
,
SharedMemory
*
ic
=
0
,
UniSetTypes
::
ObjectId
shmID
,
SharedMemory
*
ic
=
0
,
std
::
string
prefix
=
"mbs"
);
std
::
string
prefix
=
"mbs"
);
/*! help- */
/*! help- */
static
void
help_print
(
int
argc
,
c
har
*
argv
[]
);
static
void
help_print
(
int
argc
,
c
onst
char
**
argv
);
static
const
int
NoSafetyState
=-
1
;
static
const
int
NoSafetyState
=-
1
;
...
...
extensions/ModbusSlave/mbslave.cc
View file @
1e4af3a1
...
@@ -15,7 +15,7 @@ using namespace UniSetTypes;
...
@@ -15,7 +15,7 @@ using namespace UniSetTypes;
using
namespace
UniSetExtensions
;
using
namespace
UniSetExtensions
;
using
namespace
std
;
using
namespace
std
;
// --------------------------------------------------------------------------
// --------------------------------------------------------------------------
int
main
(
int
argc
,
char
**
argv
)
int
main
(
int
argc
,
c
onst
c
har
**
argv
)
{
{
if
(
argc
>
1
&&
(
!
strcmp
(
argv
[
1
],
"--help"
)
||
!
strcmp
(
argv
[
1
],
"-h"
))
)
if
(
argc
>
1
&&
(
!
strcmp
(
argv
[
1
],
"--help"
)
||
!
strcmp
(
argv
[
1
],
"-h"
))
)
...
...
extensions/RTUExchange/RTUExchange.cc
View file @
1e4af3a1
...
@@ -1406,7 +1406,7 @@ void RTUExchange::initIterators()
...
@@ -1406,7 +1406,7 @@ void RTUExchange::initIterators()
}
}
// -----------------------------------------------------------------------------
// -----------------------------------------------------------------------------
void
RTUExchange
::
help_print
(
int
argc
,
c
har
*
argv
[]
)
void
RTUExchange
::
help_print
(
int
argc
,
c
onst
char
**
argv
)
{
{
cout
<<
"--rs-polltime msec - . 200 ."
<<
endl
;
cout
<<
"--rs-polltime msec - . 200 ."
<<
endl
;
cout
<<
"--rs-heartbeat-id - heartbeat-."
<<
endl
;
cout
<<
"--rs-heartbeat-id - heartbeat-."
<<
endl
;
...
@@ -1422,7 +1422,7 @@ void RTUExchange::help_print( int argc, char* argv[] )
...
@@ -1422,7 +1422,7 @@ void RTUExchange::help_print( int argc, char* argv[] )
cout
<<
"--rs-recv-timeout - ."
<<
endl
;
cout
<<
"--rs-recv-timeout - ."
<<
endl
;
}
}
// -----------------------------------------------------------------------------
// -----------------------------------------------------------------------------
RTUExchange
*
RTUExchange
::
init_rtuexchange
(
int
argc
,
c
har
*
argv
[]
,
UniSetTypes
::
ObjectId
icID
,
SharedMemory
*
ic
)
RTUExchange
*
RTUExchange
::
init_rtuexchange
(
int
argc
,
c
onst
char
**
argv
,
UniSetTypes
::
ObjectId
icID
,
SharedMemory
*
ic
)
{
{
string
name
=
conf
->
getArgParam
(
"--rs-name"
,
"RTUExchange1"
);
string
name
=
conf
->
getArgParam
(
"--rs-name"
,
"RTUExchange1"
);
if
(
name
.
empty
()
)
if
(
name
.
empty
()
)
...
...
extensions/RTUExchange/RTUExchange.h
View file @
1e4af3a1
...
@@ -29,11 +29,11 @@ class RTUExchange:
...
@@ -29,11 +29,11 @@ class RTUExchange:
virtual
~
RTUExchange
();
virtual
~
RTUExchange
();
/*! */
/*! */
static
RTUExchange
*
init_rtuexchange
(
int
argc
,
c
har
*
argv
[],
static
RTUExchange
*
init_rtuexchange
(
int
argc
,
c
onst
char
**
argv
,
UniSetTypes
::
ObjectId
shmID
,
SharedMemory
*
ic
=
0
);
UniSetTypes
::
ObjectId
shmID
,
SharedMemory
*
ic
=
0
);
/*! help- */
/*! help- */
static
void
help_print
(
int
argc
,
c
har
*
argv
[]
);
static
void
help_print
(
int
argc
,
c
onst
char
**
argv
);
static
const
int
NoSafetyState
=-
1
;
static
const
int
NoSafetyState
=-
1
;
...
...
extensions/RTUExchange/mtrconv.cc
View file @
1e4af3a1
...
@@ -14,7 +14,7 @@ static void print_help()
...
@@ -14,7 +14,7 @@ static void print_help()
printf
(
"Usage: mtrconv TYPE[T1...T12] hex1 hex2
\n
"
);
printf
(
"Usage: mtrconv TYPE[T1...T12] hex1 hex2
\n
"
);
}
}
// --------------------------------------------------------------------------
// --------------------------------------------------------------------------
int
main
(
int
argc
,
char
**
argv
)
int
main
(
int
argc
,
c
onst
c
har
**
argv
)
{
{
ModbusRTU
::
ModbusData
dt
[
3
];
ModbusRTU
::
ModbusData
dt
[
3
];
ModbusRTU
::
ModbusData
*
data
=
dt
;
ModbusRTU
::
ModbusData
*
data
=
dt
;
...
...
extensions/RTUExchange/rtuexchange.cc
View file @
1e4af3a1
...
@@ -9,7 +9,7 @@ using namespace std;
...
@@ -9,7 +9,7 @@ using namespace std;
using
namespace
UniSetTypes
;
using
namespace
UniSetTypes
;
using
namespace
UniSetExtensions
;
using
namespace
UniSetExtensions
;
// -----------------------------------------------------------------------------
// -----------------------------------------------------------------------------
int
main
(
int
argc
,
char
**
argv
)
int
main
(
int
argc
,
const
char
**
argv
)
{
{
try
try
{
{
...
@@ -19,11 +19,11 @@ int main( int argc,char** argv )
...
@@ -19,11 +19,11 @@ int main( int argc,char** argv )
cout
<<
"--confile filename - configuration file. Default: configure.xml"
<<
endl
;
cout
<<
"--confile filename - configuration file. Default: configure.xml"
<<
endl
;
cout
<<
"--rs-logfile filename - logfilename. Default: rtuexchange.log"
<<
endl
;
cout
<<
"--rs-logfile filename - logfilename. Default: rtuexchange.log"
<<
endl
;
cout
<<
endl
;
cout
<<
endl
;
RTUExchange
::
help_print
(
argc
,
argv
);
RTUExchange
::
help_print
(
argc
,
argv
);
return
0
;
return
0
;
}
}
string
confile
=
UniSetTypes
::
getArgParam
(
"--confile"
,
argc
,
argv
,
"configure.xml"
);
string
confile
=
UniSetTypes
::
getArgParam
(
"--confile"
,
argc
,
argv
,
"configure.xml"
);
conf
=
new
Configuration
(
argc
,
argv
,
confile
);
conf
=
new
Configuration
(
argc
,
argv
,
confile
);
string
logfilename
(
conf
->
getArgParam
(
"--rs-logfile"
));
string
logfilename
(
conf
->
getArgParam
(
"--rs-logfile"
));
...
...
extensions/RTUExchange/vtconv.cc
View file @
1e4af3a1
...
@@ -14,7 +14,7 @@ static void print_help()
...
@@ -14,7 +14,7 @@ static void print_help()
printf
(
"Usage: vtconv TYPE[F2|F4] hex1 hex2 [hex3 hex4]
\n
"
);
printf
(
"Usage: vtconv TYPE[F2|F4] hex1 hex2 [hex3 hex4]
\n
"
);
}
}
// --------------------------------------------------------------------------
// --------------------------------------------------------------------------
int
main
(
int
argc
,
char
**
argv
)
int
main
(
int
argc
,
c
onst
c
har
**
argv
)
{
{
VTypes
::
F2
f2
;
VTypes
::
F2
f2
;
...
...
extensions/SMViewer/main.cc
View file @
1e4af3a1
...
@@ -7,7 +7,7 @@ using namespace UniSetTypes;
...
@@ -7,7 +7,7 @@ using namespace UniSetTypes;
using
namespace
UniSetExtensions
;
using
namespace
UniSetExtensions
;
using
namespace
std
;
using
namespace
std
;
// -----------------------------------------------------------------------------
// -----------------------------------------------------------------------------
int
main
(
int
argc
,
char
**
argv
)
int
main
(
int
argc
,
c
onst
c
har
**
argv
)
{
{
try
try
{
{
...
...
extensions/SharedMemory/SharedMemory.cc
View file @
1e4af3a1
...
@@ -435,9 +435,9 @@ void SharedMemory::fastSaveValue(const IOController_i::SensorInfo& si, CORBA::Lo
...
@@ -435,9 +435,9 @@ void SharedMemory::fastSaveValue(const IOController_i::SensorInfo& si, CORBA::Lo
IONotifyController_LT
::
fastSaveValue
(
si
,
value
,
type
,
sup_id
);
IONotifyController_LT
::
fastSaveValue
(
si
,
value
,
type
,
sup_id
);
}
}
// ------------------------------------------------------------------------------------------
// ------------------------------------------------------------------------------------------
SharedMemory
*
SharedMemory
::
init_smemory
(
int
argc
,
c
har
*
argv
[]
)
SharedMemory
*
SharedMemory
::
init_smemory
(
int
argc
,
c
onst
char
**
argv
)
{
{
string
dfile
=
conf
->
getArgParam
(
"--datfile"
,
conf
->
getConfFileName
());
string
dfile
=
conf
->
getArgParam
(
"--datfile"
,
conf
->
getConfFileName
());
if
(
dfile
[
0
]
!=
'.'
&&
dfile
[
0
]
!=
'/'
)
if
(
dfile
[
0
]
!=
'.'
&&
dfile
[
0
]
!=
'/'
)
dfile
=
conf
->
getConfDir
()
+
dfile
;
dfile
=
conf
->
getConfDir
()
+
dfile
;
...
@@ -455,7 +455,7 @@ SharedMemory* SharedMemory::init_smemory( int argc, char* argv[] )
...
@@ -455,7 +455,7 @@ SharedMemory* SharedMemory::init_smemory( int argc, char* argv[] )
return
new
SharedMemory
(
ID
,
dfile
);
return
new
SharedMemory
(
ID
,
dfile
);
}
}
// -----------------------------------------------------------------------------
// -----------------------------------------------------------------------------
void
SharedMemory
::
help_print
(
int
argc
,
c
har
*
argv
[]
)
void
SharedMemory
::
help_print
(
int
argc
,
c
onst
char
**
argv
)
{
{
cout
<<
"--smemory-id - SharedMemeory ID"
<<
endl
;
cout
<<
"--smemory-id - SharedMemeory ID"
<<
endl
;
cout
<<
"--logfile fname - fname. smemory.log"
<<
endl
;
cout
<<
"--logfile fname - fname. smemory.log"
<<
endl
;
...
...
extensions/SharedMemory/SharedMemory.h
View file @
1e4af3a1
...
@@ -27,9 +27,9 @@ class SharedMemory:
...
@@ -27,9 +27,9 @@ class SharedMemory:
virtual
~
SharedMemory
();
virtual
~
SharedMemory
();
/*! */
/*! */
static
SharedMemory
*
init_smemory
(
int
argc
,
c
har
*
argv
[]
);
static
SharedMemory
*
init_smemory
(
int
argc
,
c
onst
char
**
argv
);
/*! help- */
/*! help- */
static
void
help_print
(
int
argc
,
c
har
*
argv
[]
);
static
void
help_print
(
int
argc
,
c
onst
char
**
argv
);
virtual
void
saveValue
(
const
IOController_i
::
SensorInfo
&
si
,
CORBA
::
Long
value
,
virtual
void
saveValue
(
const
IOController_i
::
SensorInfo
&
si
,
CORBA
::
Long
value
,
...
@@ -62,7 +62,7 @@ class SharedMemory:
...
@@ -62,7 +62,7 @@ class SharedMemory:
AIOStateList
::
iterator
ait
;
AIOStateList
::
iterator
ait
;
DIOStateList
::
iterator
dit
;
DIOStateList
::
iterator
dit
;
void
add
(
long
val
,
in
t
size
)
void
add
(
long
val
,
size_
t
size
)
{
{
buf
.
push_back
(
val
);
buf
.
push_back
(
val
);
if
(
buf
.
size
()
>=
size
)
if
(
buf
.
size
()
>=
size
)
...
...
extensions/SharedMemory/smemory.cc
View file @
1e4af3a1
...
@@ -11,12 +11,12 @@ using namespace std;
...
@@ -11,12 +11,12 @@ using namespace std;
using
namespace
UniSetTypes
;
using
namespace
UniSetTypes
;
using
namespace
UniSetExtensions
;
using
namespace
UniSetExtensions
;
// --------------------------------------------------------------------------
// --------------------------------------------------------------------------
int
main
(
int
argc
,
char
**
argv
)
int
main
(
int
argc
,
c
onst
c
har
**
argv
)
{
{
if
(
argc
>
1
&&
strcmp
(
argv
[
1
],
"--help"
)
==
0
)
if
(
argc
>
1
&&
strcmp
(
argv
[
1
],
"--help"
)
==
0
)
{
{
cout
<<
"--confile - . . configure.xml"
<<
endl
;
cout
<<
"--confile - . . configure.xml"
<<
endl
;
SharedMemory
::
help_print
(
argc
,
argv
);
SharedMemory
::
help_print
(
argc
,
argv
);
return
0
;
return
0
;
}
}
...
@@ -31,7 +31,7 @@ int main(int argc, char **argv)
...
@@ -31,7 +31,7 @@ int main(int argc, char **argv)
unideb
.
logFile
(
logname
.
c_str
()
);
unideb
.
logFile
(
logname
.
c_str
()
);
dlog
.
logFile
(
logname
.
c_str
()
);
dlog
.
logFile
(
logname
.
c_str
()
);
SharedMemory
*
shm
=
SharedMemory
::
init_smemory
(
argc
,
argv
);
SharedMemory
*
shm
=
SharedMemory
::
init_smemory
(
argc
,
argv
);
if
(
!
shm
)
if
(
!
shm
)
return
1
;
return
1
;
...
...
extensions/UDPExchange/udpexchange.cc
View file @
1e4af3a1
...
@@ -9,7 +9,7 @@ using namespace std;
...
@@ -9,7 +9,7 @@ using namespace std;
using
namespace
UniSetTypes
;
using
namespace
UniSetTypes
;
using
namespace
UniSetExtensions
;
using
namespace
UniSetExtensions
;
// -----------------------------------------------------------------------------
// -----------------------------------------------------------------------------
int
main
(
int
argc
,
char
**
argv
)
int
main
(
int
argc
,
const
char
**
argv
)
{
{
try
try
{
{
...
...
include/Configuration.h
View file @
1e4af3a1
...
@@ -58,13 +58,13 @@ namespace UniSetTypes
...
@@ -58,13 +58,13 @@ namespace UniSetTypes
virtual
~
Configuration
();
virtual
~
Configuration
();
/*! xml- ( ) */
/*! xml- ( ) */
Configuration
(
int
argc
,
char
**
argv
,
const
std
::
string
xmlfile
=
""
);
Configuration
(
int
argc
,
c
onst
c
har
**
argv
,
const
std
::
string
xmlfile
=
""
);
/*! xml- */
/*! xml- */
Configuration
(
int
argc
,
char
**
argv
,
ObjectIndex
*
oind
,
const
std
::
string
xmlfile
=
""
);
Configuration
(
int
argc
,
c
onst
c
har
**
argv
,
ObjectIndex
*
oind
,
const
std
::
string
xmlfile
=
""
);
/*! , */
/*! , */
Configuration
(
int
argc
,
c
har
**
argv
,
Configuration
(
int
argc
,
c
onst
char
**
argv
,
const
std
::
string
fileConf
,
UniSetTypes
::
ObjectInfo
*
objectsMap
);
const
std
::
string
fileConf
,
UniSetTypes
::
ObjectInfo
*
objectsMap
);
/// ԣ path
/// ԣ path
...
@@ -82,7 +82,7 @@ namespace UniSetTypes
...
@@ -82,7 +82,7 @@ namespace UniSetTypes
std
::
string
getRootDir
();
/*!< , */
std
::
string
getRootDir
();
/*!< , */
inline
int
getArgc
(){
return
_argc
;
}
inline
int
getArgc
(){
return
_argc
;
}
inline
c
har
**
getArgv
()
const
{
return
_argv
;
}
inline
c
onst
char
**
getArgv
()
const
{
return
_argv
;
}
inline
ObjectId
getTimerService
()
const
{
return
localTimerService
;
}
/*!< TimerServic- */
inline
ObjectId
getTimerService
()
const
{
return
localTimerService
;
}
/*!< TimerServic- */
inline
ObjectId
getDBServer
()
const
{
return
localDBServer
;
}
/*!< DBServer- */
inline
ObjectId
getDBServer
()
const
{
return
localDBServer
;
}
/*!< DBServer- */
inline
ObjectId
getInfoServer
()
const
{
return
localInfoServer
;
}
/*!< InfoServer- */
inline
ObjectId
getInfoServer
()
const
{
return
localInfoServer
;
}
/*!< InfoServer- */
...
@@ -158,7 +158,7 @@ namespace UniSetTypes
...
@@ -158,7 +158,7 @@ namespace UniSetTypes
protected
:
protected
:
Configuration
();
Configuration
();
virtual
void
initConfiguration
(
int
argc
,
char
**
argv
);
virtual
void
initConfiguration
(
int
argc
,
c
onst
c
har
**
argv
);
void
createNodesList
();
void
createNodesList
();
virtual
void
initNode
(
UniSetTypes
::
NodeInfo
&
ninfo
,
UniXML_iterator
&
it
);
virtual
void
initNode
(
UniSetTypes
::
NodeInfo
&
ninfo
,
UniXML_iterator
&
it
);
...
@@ -177,7 +177,7 @@ namespace UniSetTypes
...
@@ -177,7 +177,7 @@ namespace UniSetTypes
UniXML
unixml
;
UniXML
unixml
;
int
_argc
;
int
_argc
;
char
**
_argv
;
c
onst
c
har
**
_argv
;
CORBA
::
ORB_var
orb
;
CORBA
::
ORB_var
orb
;
CORBA
::
PolicyList
policyList
;
CORBA
::
PolicyList
policyList
;
...
@@ -230,7 +230,7 @@ namespace UniSetTypes
...
@@ -230,7 +230,7 @@ namespace UniSetTypes
// UniSetTypes::conf.
// UniSetTypes::conf.
// ( --confile --id-from-config )
// ( --confile --id-from-config )
void
uniset_init
(
int
argc
,
c
har
*
argv
[]
,
const
std
::
string
xmlfile
=
"configure.xml"
);
void
uniset_init
(
int
argc
,
c
onst
char
**
argv
,
const
std
::
string
xmlfile
=
"configure.xml"
);
}
// end of UniSetTypes namespace
}
// end of UniSetTypes namespace
...
...
include/ORepHelpers.h
View file @
1e4af3a1
...
@@ -43,11 +43,11 @@ namespace ORepHelpers
...
@@ -43,11 +43,11 @@ namespace ORepHelpers
const
std
::
string
&
nsName
,
int
timeOutSec
=
2
);
const
std
::
string
&
nsName
,
int
timeOutSec
=
2
);
//!
//!
CosNaming
::
NamingContext_ptr
getContext
(
const
std
::
string
&
cname
,
int
argc
,
CosNaming
::
NamingContext_ptr
getContext
(
const
std
::
string
&
cname
,
int
argc
,
c
har
*
*
argv
,
const
std
::
string
&
nsName
)
c
onst
char
**
argv
,
const
std
::
string
&
nsName
)
throw
(
UniSetTypes
::
ORepFailed
);
throw
(
UniSetTypes
::
ORepFailed
);
CosNaming
::
NamingContext_ptr
getContext
(
CORBA
::
ORB_ptr
orb
,
const
std
::
string
&
cname
,
CosNaming
::
NamingContext_ptr
getContext
(
CORBA
::
ORB_ptr
orb
,
const
std
::
string
&
cname
,
const
std
::
string
&
nsName
)
const
std
::
string
&
nsName
)
throw
(
UniSetTypes
::
ORepFailed
);
throw
(
UniSetTypes
::
ORepFailed
);
...
...
include/UniSetTypes.h
View file @
1e4af3a1
...
@@ -146,7 +146,7 @@ namespace UniSetTypes
...
@@ -146,7 +146,7 @@ namespace UniSetTypes
\param defval - , ,
\param defval - , ,
*/
*/
inline
std
::
string
getArgParam
(
const
std
::
string
name
,
inline
std
::
string
getArgParam
(
const
std
::
string
name
,
int
_argc
,
c
har
**
_argv
,
int
_argc
,
c
onst
char
**
_argv
,
const
std
::
string
defval
=
""
)
const
std
::
string
defval
=
""
)
{
{
for
(
int
i
=
1
;
i
<
(
_argc
-
1
)
;
i
++
)
for
(
int
i
=
1
;
i
<
(
_argc
-
1
)
;
i
++
)
...
@@ -162,7 +162,7 @@ namespace UniSetTypes
...
@@ -162,7 +162,7 @@ namespace UniSetTypes
\return -1, .
\return -1, .
, .
, .
*/
*/
inline
int
findArgParam
(
const
std
::
string
name
,
int
_argc
,
char
**
_argv
)
inline
int
findArgParam
(
const
std
::
string
name
,
int
_argc
,
c
onst
c
har
**
_argv
)
{
{
for
(
int
i
=
1
;
i
<
_argc
;
i
++
)
for
(
int
i
=
1
;
i
<
_argc
;
i
++
)
{
{
...
...
src/ObjectRepository/ORepHelpers.cc
View file @
1e4af3a1
...
@@ -44,9 +44,9 @@ namespace ORepHelpers
...
@@ -44,9 +44,9 @@ namespace ORepHelpers
* \param cname - , .
* \param cname - , .
* \param argc, argv - ORB
* \param argc, argv - ORB
*/
*/
CosNaming
::
NamingContext_ptr
getContext
(
const
string
&
cname
,
int
argc
,
c
har
*
*
argv
,
const
string
&
nsName
)
throw
(
ORepFailed
)
CosNaming
::
NamingContext_ptr
getContext
(
const
string
&
cname
,
int
argc
,
c
onst
char
**
argv
,
const
string
&
nsName
)
throw
(
ORepFailed
)
{
{
CORBA
::
ORB_var
orb
=
CORBA
::
ORB_init
(
argc
,
argv
);
CORBA
::
ORB_var
orb
=
CORBA
::
ORB_init
(
argc
,
(
char
**
)
argv
);
unideb
[
Debug
::
REPOSITORY
]
<<
"OREPHELP: orb init ok"
<<
endl
;
unideb
[
Debug
::
REPOSITORY
]
<<
"OREPHELP: orb init ok"
<<
endl
;
return
getContext
(
orb
,
cname
,
nsName
);
return
getContext
(
orb
,
cname
,
nsName
);
}
}
...
...
src/ObjectRepository/ObjectRepositoryFactory.cc
View file @
1e4af3a1
...
@@ -74,8 +74,8 @@ bool ObjectRepositoryFactory::createSection( const char* name, const char* in_se
...
@@ -74,8 +74,8 @@ bool ObjectRepositoryFactory::createSection( const char* name, const char* in_se
}
}
int
argc
(
uconf
->
getArgc
());
int
argc
(
uconf
->
getArgc
());
char
**
argv
(
uconf
->
getArgv
());
c
onst
c
har
**
argv
(
uconf
->
getArgv
());
CosNaming
::
NamingContext_var
ctx
=
ORepHelpers
::
getContext
(
in_section
,
argc
,
argv
,
uconf
->
getNSName
()
);
CosNaming
::
NamingContext_var
ctx
=
ORepHelpers
::
getContext
(
in_section
,
argc
,
argv
,
uconf
->
getNSName
()
);
return
createContext
(
name
,
ctx
.
in
()
);
return
createContext
(
name
,
ctx
.
in
()
);
}
}
...
@@ -217,14 +217,14 @@ bool ObjectRepositoryFactory::removeSection(const string& fullName, bool recursi
...
@@ -217,14 +217,14 @@ bool ObjectRepositoryFactory::removeSection(const string& fullName, bool recursi
{
{
// string name = getName(fullName.c_str(),'/');
// string name = getName(fullName.c_str(),'/');
// string sec = getSectionName(fullName.c_str(),'/');
// string sec = getSectionName(fullName.c_str(),'/');
// CosNaming::NamingContext_var ctx = getContext(sec, argc, argv);
// CosNaming::NamingContext_var ctx = getContext(sec, argc, argv);
unsigned
int
how_many
=
1000
;
unsigned
int
how_many
=
1000
;
CosNaming
::
NamingContext_var
ctx
;
CosNaming
::
NamingContext_var
ctx
;
try
try
{
{
int
argc
(
uconf
->
getArgc
());
int
argc
(
uconf
->
getArgc
());
char
**
argv
(
uconf
->
getArgv
());
c
onst
c
har
**
argv
(
uconf
->
getArgv
());
ctx
=
ORepHelpers
::
getContext
(
fullName
,
argc
,
argv
,
nsName
);
ctx
=
ORepHelpers
::
getContext
(
fullName
,
argc
,
argv
,
nsName
);
}
}
catch
(
ORepFailed
)
catch
(
ORepFailed
)
{
{
...
@@ -285,9 +285,9 @@ bool ObjectRepositoryFactory::removeSection(const string& fullName, bool recursi
...
@@ -285,9 +285,9 @@ bool ObjectRepositoryFactory::removeSection(const string& fullName, bool recursi
try
try
{
{
int
argc
(
uconf
->
getArgc
());
int
argc
(
uconf
->
getArgc
());
char
**
argv
(
uconf
->
getArgv
());
c
onst
c
har
**
argv
(
uconf
->
getArgv
());
CosNaming
::
Name_var
ctxName
=
omniURI
::
stringToName
(
name
.
c_str
());
CosNaming
::
Name_var
ctxName
=
omniURI
::
stringToName
(
name
.
c_str
());
CosNaming
::
NamingContext_var
in_ctx
=
ORepHelpers
::
getContext
(
in_sec
,
argc
,
argv
,
nsName
);
CosNaming
::
NamingContext_var
in_ctx
=
ORepHelpers
::
getContext
(
in_sec
,
argc
,
argv
,
nsName
);
ctx
->
destroy
();
ctx
->
destroy
();
in_ctx
->
unbind
(
ctxName
);
in_ctx
->
unbind
(
ctxName
);
}
}
...
@@ -327,7 +327,7 @@ bool ObjectRepositoryFactory::renameSection( const string& newFName, const strin
...
@@ -327,7 +327,7 @@ bool ObjectRepositoryFactory::renameSection( const string& newFName, const strin
// unideb[Debug::REPOSITORY] << "ORepFactory: "<< in_sec << endl;
// unideb[Debug::REPOSITORY] << "ORepFactory: "<< in_sec << endl;
// unideb[Debug::REPOSITORY] << "ORepFactory: " << oldFName << " " << newFName << endl;
// unideb[Debug::REPOSITORY] << "ORepFactory: " << oldFName << " " << newFName << endl;
int
argc
(
uconf
->
getArgc
());
int
argc
(
uconf
->
getArgc
());
char
**
argv
(
uconf
->
getArgv
());
c
onst
c
har
**
argv
(
uconf
->
getArgv
());
CosNaming
::
NamingContext_var
in_ctx
=
ORepHelpers
::
getContext
(
in_sec
,
argc
,
argv
,
nsName
);
CosNaming
::
NamingContext_var
in_ctx
=
ORepHelpers
::
getContext
(
in_sec
,
argc
,
argv
,
nsName
);
CosNaming
::
NamingContext_var
ctx
=
ORepHelpers
::
getContext
(
oldFName
,
argc
,
argv
,
nsName
);
CosNaming
::
NamingContext_var
ctx
=
ORepHelpers
::
getContext
(
oldFName
,
argc
,
argv
,
nsName
);
...
...
src/Various/Configuration.cc
View file @
1e4af3a1
...
@@ -123,11 +123,11 @@ Configuration::~Configuration()
...
@@ -123,11 +123,11 @@ Configuration::~Configuration()
}
}
// ---------------------------------------------------------------------------------
// ---------------------------------------------------------------------------------
Configuration
::
Configuration
(
int
argc
,
char
**
argv
,
const
string
xmlfile
)
:
Configuration
::
Configuration
(
int
argc
,
c
onst
c
har
**
argv
,
const
string
xmlfile
)
:
mi
(
NULL
),
mi
(
NULL
),
oind
(
NULL
),
oind
(
NULL
),
_argc
(
argc
),
_argc
(
argc
),
_argv
(
argv
),
_argv
(
argv
),
NSName
(
"NameService"
),
NSName
(
"NameService"
),
repeatCount
(
2
),
repeatTimeout
(
100
),
repeatCount
(
2
),
repeatTimeout
(
100
),
localTimerService
(
UniSetTypes
::
DefaultObjectId
),
localTimerService
(
UniSetTypes
::
DefaultObjectId
),
...
@@ -141,12 +141,12 @@ Configuration::Configuration( int argc, char** argv, const string xmlfile ):
...
@@ -141,12 +141,12 @@ Configuration::Configuration( int argc, char** argv, const string xmlfile ):
initConfiguration
(
argc
,
argv
);
initConfiguration
(
argc
,
argv
);
}
}
// ---------------------------------------------------------------------------------
// ---------------------------------------------------------------------------------
Configuration
::
Configuration
(
int
argc
,
c
har
**
argv
,
ObjectIndex
*
_oind
,
Configuration
::
Configuration
(
int
argc
,
c
onst
char
**
argv
,
ObjectIndex
*
_oind
,
const
string
fileConf
)
:
const
string
fileConf
)
:
mi
(
NULL
),
mi
(
NULL
),
oind
(
NULL
),
oind
(
NULL
),
_argc
(
argc
),
_argc
(
argc
),
_argv
(
argv
),
_argv
(
argv
),
NSName
(
"NameService"
),
NSName
(
"NameService"
),
repeatCount
(
2
),
repeatTimeout
(
100
),
repeatCount
(
2
),
repeatTimeout
(
100
),
localTimerService
(
UniSetTypes
::
DefaultObjectId
),
localTimerService
(
UniSetTypes
::
DefaultObjectId
),
...
@@ -161,12 +161,12 @@ Configuration::Configuration( int argc, char** argv, ObjectIndex* _oind,
...
@@ -161,12 +161,12 @@ Configuration::Configuration( int argc, char** argv, ObjectIndex* _oind,
initConfiguration
(
argc
,
argv
);
initConfiguration
(
argc
,
argv
);
}
}
// ---------------------------------------------------------------------------------
// ---------------------------------------------------------------------------------
Configuration
::
Configuration
(
int
argc
,
c
har
**
argv
,
const
string
fileConf
,
Configuration
::
Configuration
(
int
argc
,
c
onst
char
**
argv
,
const
string
fileConf
,
UniSetTypes
::
ObjectInfo
*
omap
)
:
UniSetTypes
::
ObjectInfo
*
omap
)
:
mi
(
NULL
),
mi
(
NULL
),
oind
(
NULL
),
oind
(
NULL
),
_argc
(
argc
),
_argc
(
argc
),
_argv
(
argv
),
_argv
(
argv
),
NSName
(
"NameService"
),
NSName
(
"NameService"
),
repeatCount
(
2
),
repeatTimeout
(
100
),
repeatCount
(
2
),
repeatTimeout
(
100
),
localTimerService
(
UniSetTypes
::
DefaultObjectId
),
localTimerService
(
UniSetTypes
::
DefaultObjectId
),
...
@@ -181,7 +181,7 @@ Configuration::Configuration( int argc, char** argv, const string fileConf,
...
@@ -181,7 +181,7 @@ Configuration::Configuration( int argc, char** argv, const string fileConf,
initConfiguration
(
argc
,
argv
);
initConfiguration
(
argc
,
argv
);
}
}
// ---------------------------------------------------------------------------------
// ---------------------------------------------------------------------------------
void
Configuration
::
initConfiguration
(
int
argc
,
char
**
argv
)
void
Configuration
::
initConfiguration
(
int
argc
,
c
onst
c
har
**
argv
)
{
{
// PassiveTimer pt(UniSetTimer::WaitUpTime);
// PassiveTimer pt(UniSetTimer::WaitUpTime);
if
(
unideb
.
debugging
(
Debug
::
SYSTEM
)
)
if
(
unideb
.
debugging
(
Debug
::
SYSTEM
)
)
...
@@ -305,7 +305,7 @@ void Configuration::initConfiguration( int argc, char** argv )
...
@@ -305,7 +305,7 @@ void Configuration::initConfiguration( int argc, char** argv )
// +N --> -ORBIniRef NodeName=
// +N --> -ORBIniRef NodeName=
// +2 --> -ORBIniRef NameService=
// +2 --> -ORBIniRef NameService=
_argc
=
argc
+
2
*
lnodes
.
size
()
+
2
;
_argc
=
argc
+
2
*
lnodes
.
size
()
+
2
;
_argv
=
new
char
*
[
_argc
];
_argv
=
new
c
onst
c
har
*
[
_argc
];
int
i
=
0
;
int
i
=
0
;
//
//
...
@@ -358,7 +358,7 @@ void Configuration::initConfiguration( int argc, char** argv )
...
@@ -358,7 +358,7 @@ void Configuration::initConfiguration( int argc, char** argv )
// ------------- CORBA INIT -------------
// ------------- CORBA INIT -------------
// orb init
// orb init
orb
=
CORBA
::
ORB_init
(
_argc
,
_argv
);
orb
=
CORBA
::
ORB_init
(
_argc
,
(
char
**
)
_argv
);
// create policy
// create policy
CORBA
::
Object_var
obj
=
orb
->
resolve_initial_references
(
"RootPOA"
);
CORBA
::
Object_var
obj
=
orb
->
resolve_initial_references
(
"RootPOA"
);
PortableServer
::
POA_var
root_poa
=
PortableServer
::
POA
::
_narrow
(
obj
);
PortableServer
::
POA_var
root_poa
=
PortableServer
::
POA
::
_narrow
(
obj
);
...
@@ -402,7 +402,7 @@ void Configuration::initConfiguration( int argc, char** argv )
...
@@ -402,7 +402,7 @@ void Configuration::initConfiguration( int argc, char** argv )
// -------------------------------------------------------------------------
// -------------------------------------------------------------------------
string
Configuration
::
getArgParam
(
const
string
name
,
const
string
defval
)
string
Configuration
::
getArgParam
(
const
string
name
,
const
string
defval
)
{
{
return
UniSetTypes
::
getArgParam
(
name
,
_argc
,
_argv
,
defval
);
return
UniSetTypes
::
getArgParam
(
name
,
_argc
,
_argv
,
defval
);
}
}
// -------------------------------------------------------------------------
// -------------------------------------------------------------------------
// ????????????? ????????... (??? ???????????)
// ????????????? ????????... (??? ???????????)
...
@@ -959,7 +959,7 @@ xmlNode* Configuration::getXMLServicesSection()
...
@@ -959,7 +959,7 @@ xmlNode* Configuration::getXMLServicesSection()
return
xmlServicesSec
;
return
xmlServicesSec
;
}
}
// -------------------------------------------------------------------------
// -------------------------------------------------------------------------
void
uniset_init
(
int
argc
,
c
har
*
argv
[]
,
const
std
::
string
xmlfile
)
void
uniset_init
(
int
argc
,
c
onst
char
**
argv
,
const
std
::
string
xmlfile
)
{
{
string
confile
=
UniSetTypes
::
getArgParam
(
"--confile"
,
argc
,
argv
,
xmlfile
);
string
confile
=
UniSetTypes
::
getArgParam
(
"--confile"
,
argc
,
argv
,
xmlfile
);
UniSetTypes
::
conf
=
new
Configuration
(
argc
,
argv
,
confile
);
UniSetTypes
::
conf
=
new
Configuration
(
argc
,
argv
,
confile
);
...
...
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