Commit d5bbdb7c authored by Pavel Vainerman's avatar Pavel Vainerman

(smemory-plus): добавил вывод логов -add-XXX

parent 261820f1
......@@ -174,6 +174,7 @@
<item id="6006" name="UDPExchange"/>
<item id="6007" name="UDPExchange2"/>
<item id="6008" name="UNetExchange"/>
<item id="6009" name="MBMaster2"/>
</objects>
</ObjectsMap>
<messages idfromfile="1" name="messages">
......
......@@ -81,6 +81,9 @@ int main( int argc, const char **argv )
p << "io";
if( i > 0 ) p << i;
if( dlog.debugging(Debug::INFO) )
dlog[Debug::INFO] << "(smemory-plus): add IOControl(" << p.str() << ")" << endl;
IOControl* ic = IOControl::init_iocontrol(argc,argv,shm->getId(),shm,p.str());
if( ic == NULL )
return 1;
......@@ -105,6 +108,9 @@ int main( int argc, const char **argv )
stringstream p;
p << "rtu";
if( i > 0 ) p << i;
if( dlog.debugging(Debug::INFO) )
dlog[Debug::INFO] << "(smemory-plus): add RTUExchange(" << p.str() << ")" << endl;
RTUExchange* rtu = RTUExchange::init_rtuexchange(argc,argv,shm->getId(),shm,p.str());
if( rtu == NULL )
......@@ -126,6 +132,9 @@ int main( int argc, const char **argv )
stringstream p;
p << "mbs";
if( i > 0 ) p << i;
if( dlog.debugging(Debug::INFO) )
dlog[Debug::INFO] << "(smemory-plus): add MBSlave(" << p.str() << ")" << endl;
MBSlave* mbs = MBSlave::init_mbslave(argc,argv,shm->getId(),shm,p.str());
if( mbs == NULL )
......@@ -139,7 +148,7 @@ int main( int argc, const char **argv )
for( int i=0; i<MaxAddNum; i++ )
{
stringstream s;
s << "--add-mbtcp";
s << "--add-mbmaster";
if( i>0 ) s << i;
bool add_mbmaster = findArgParam(s.str(),argc,argv) != -1;
......@@ -150,6 +159,9 @@ int main( int argc, const char **argv )
p << "mbtcp";
if( i > 0 ) p << i;
if( dlog.debugging(Debug::INFO) )
dlog[Debug::INFO] << "(smemory-plus): add MBTCPMaster(" << p.str() << ")" << endl;
MBTCPMaster* mbm1 = MBTCPMaster::init_mbmaster(argc,argv,shm->getId(),shm,p.str());
if( mbm1 == NULL )
return 1;
......@@ -165,6 +177,9 @@ int main( int argc, const char **argv )
if( unet == NULL )
return 1;
if( dlog.debugging(Debug::INFO) )
dlog[Debug::INFO] << "(smemory-plus): add UNetExchnage.." << endl;
act.addObject(static_cast<class UniSetObject*>(unet));
}
// ---------------------------------------
......
......@@ -4,7 +4,7 @@ ulimit -Sc 10000000
START=uniset-start.sh
${START} -f ./uniset-smemory-plus --smemory-id SharedMemory --confile test.xml \
--unideb-add-levels info,crit,warn,level9,system,level3,level2,level1 \
--dlog-add-levels any \
--io-name IOControl \
--io-polltime 100 \
--io-s-filter-field io \
......@@ -22,6 +22,15 @@ ${START} -f ./uniset-smemory-plus --smemory-id SharedMemory --confile test.xml
--mbtcp-gateway-port 2048 \
--mbtcp-recv-timeout 200 \
--mbtcp-force-out 1 \
--add-mbmaster2 \
--mbtcp2-name MBMaster2 \
--mbtcp2-confnode MBMaster1 \
--mbtcp2-filter-field rs \
--mbtcp2-filter-value 1 \
--mbtcp2-gateway-iaddr localhost \
--mbtcp2-gateway-port 2049 \
--mbtcp2-recv-timeout 200 \
--mbtcp2-force-out 1 \
# --add-rtu \
# --rs-dev /dev/cbsideA1 \
# --rs-id RTUExchange \
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment