From 04fd6ec52ac81bd626c244170c8849270debce87 Mon Sep 17 00:00:00 2001 From: buret Date: Wed, 6 Jun 2007 09:54:00 +0000 Subject: Development of dispatch clock SCI msg git-svn-id: svn+ssh://pessac/svn/cesar/trunk@240 017c9cb6-072f-447c-8318-d5b54f68fe89 --- maximus/sci/src/SciMsg.cpp | 7 ++++--- maximus/sci/src/SciServerTest.cpp | 29 +++++++++++++++++++++++++++-- 2 files changed, 31 insertions(+), 5 deletions(-) (limited to 'maximus/sci/src') diff --git a/maximus/sci/src/SciMsg.cpp b/maximus/sci/src/SciMsg.cpp index 7da94a0f7f..379a570b7c 100644 --- a/maximus/sci/src/SciMsg.cpp +++ b/maximus/sci/src/SciMsg.cpp @@ -222,9 +222,9 @@ void SciMsg::displaySciMsgHeader ( ) const clog << "\tSCI msg header = " << endl; clog << hex; clog << "\t\tmagic_id = 0x" << setfill('0') << setw(8) << uppercase << getSciMsgHeader()->magic_id << endl; - clog << "\t\tlength = 0x" << setfill('0') << setw(2) << uppercase << getSciMsgHeader()->length << endl; - clog << "\t\ttype = 0x" << setfill('0') << setw(2) << uppercase << getSciMsgHeader()->type << endl; - clog << "\t\tversion = 0x" << setfill('0') << setw(4) << uppercase << getSciMsgHeader()->version << endl; + clog << "\t\tlength = " << dec << getSciMsgHeader()->length << endl; + clog << "\t\ttype = " << dec << getSciMsgHeader()->type << endl; + clog << "\t\tversion = 0x" << hex << setfill('0') << setw(4) << uppercase << getSciMsgHeader()->version << endl; clog << "\t\tmsg_id = 0x" << setfill('0') << setw(4) << uppercase << getSciMsgHeader()->msg_id << endl; clog << "\t\tstation_id = 0x" << setfill('0') << setw(4) << uppercase << getSciMsgHeader()->station_id << endl; clog << "\t\tnetclock_high = 0x" << setfill('0') << setw(8) << uppercase << getSciMsgHeader()->netclock_high << endl; @@ -333,6 +333,7 @@ bool SciMsg::setSciMsgType ( const Sci_Msg_Type type ) clog << "SciMsg::setSciMsgType" << endl; mSciMsgType = type; + clog << "\ttype = " << mSciMsgType << endl; return true; } diff --git a/maximus/sci/src/SciServerTest.cpp b/maximus/sci/src/SciServerTest.cpp index a1e438c1d8..31213f18b7 100644 --- a/maximus/sci/src/SciServerTest.cpp +++ b/maximus/sci/src/SciServerTest.cpp @@ -20,8 +20,14 @@ void SciServerTest::setUp (void) clog << "\tSciServerTest -> SciServer()" << endl; mpSciServer = new SciServer (); - clog << "\tSciServerTest -> FunctionCallManager(SciServer)" << endl; + clog << "\tSciServerTest -> FunctionCallManager(SciServer*)" << endl; mpFunctionCallManager = new FunctionCallManager(mpSciServer); + clog << "\tSciServerTest -> SystemManager(SciServer*)" << endl; + mpSystemManager = new SystemManager(mpSciServer); + clog << "\tSciServerTest -> PhyProcessor(SciServer*)" << endl; + mpPhyProcessor = new PhyProcessor(mpSciServer); + clog << "\tSciServerTest -> NetworkClockProcessor(...)" << endl; + mpNetworkClockProcessor = new NetworkClockProcessor(mpSciServer, mpSystemManager, mpFunctionCallManager, mpPhyProcessor); } @@ -29,6 +35,25 @@ void SciServerTest::tearDown (void) { clog << "SciServerTest::tearDown" << endl; + + if (NULL != mpNetworkClockProcessor) + { + clog << "\tSciServerTest -> ~NetworkClockProcessor" << endl; + delete mpNetworkClockProcessor; + mpNetworkClockProcessor = NULL; + } + if (NULL != mpPhyProcessor) + { + clog << "\tSciServerTest -> ~PhyProcessor" << endl; + delete mpPhyProcessor; + mpPhyProcessor = NULL; + } + if (NULL != mpSystemManager) + { + clog << "\tSciServerTest -> ~SystemManager" << endl; + delete mpSystemManager; + mpSystemManager = NULL; + } if (NULL != mpFunctionCallManager) { clog << "\tSciServerTest -> ~FunctionCallManager" << endl; @@ -141,7 +166,7 @@ void SciServerTest::registerClockSciMsgTest (void) // clog << "\tSciServerTest -> SciServer::registerSpecializedSciMsg" << endl; CPPUNIT_ASSERT_MESSAGE ( CPPUNIT_NS::Message("registerSpecializedSciMsg failed"), - mpSciServer->registerSpecializedSciMsg(SCI_MSG_TYPE_NETWORK_CLOCK, new ClockSciMsg()) ); + mpSciServer->registerSpecializedSciMsg(SCI_MSG_TYPE_NETWORK_CLOCK, new ClockSciMsg(mpNetworkClockProcessor)) ); // Check results // -- cgit v1.2.3