summaryrefslogtreecommitdiff
path: root/maximus/sci/src
diff options
context:
space:
mode:
Diffstat (limited to 'maximus/sci/src')
-rw-r--r--maximus/sci/src/SciMsg.cpp7
-rw-r--r--maximus/sci/src/SciServerTest.cpp29
2 files changed, 31 insertions, 5 deletions
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
//