summaryrefslogtreecommitdiff
path: root/maximus/sci/src
diff options
context:
space:
mode:
authorburet2007-06-14 16:46:30 +0000
committerburet2007-06-14 16:46:30 +0000
commitb7af2390c20e3753d14b4ab7ebbfab299863fead (patch)
treebffcce5dddf95921abb1663fb70bb5a6339b57b9 /maximus/sci/src
parent0e4eb70b917acf319bd6b049e1c5469d36a83d56 (diff)
- Station status
- Process next evt - SystemSciMsgTest git-svn-id: svn+ssh://pessac/svn/cesar/trunk@299 017c9cb6-072f-447c-8318-d5b54f68fe89
Diffstat (limited to 'maximus/sci/src')
-rw-r--r--maximus/sci/src/SciMsg.cpp60
-rw-r--r--maximus/sci/src/SciServer.cpp36
2 files changed, 48 insertions, 48 deletions
diff --git a/maximus/sci/src/SciMsg.cpp b/maximus/sci/src/SciMsg.cpp
index 9ead2b5bf7..7134d21b77 100644
--- a/maximus/sci/src/SciMsg.cpp
+++ b/maximus/sci/src/SciMsg.cpp
@@ -57,7 +57,7 @@ mSpecializedSciMsgHeaderSize(0),
mSpecializedSciMsgDataLength(0),
mpSpecializedSciMsgData(NULL)
{
- clog << "SciMsg()" << endl;
+ //clog << "SciMsg()" << endl;
initAttributes();
}
@@ -65,7 +65,7 @@ mpSpecializedSciMsgData(NULL)
void SciMsg::initAttributes ( )
{
- clog << "SciMsg::initAttributes" << endl;
+ //clog << "SciMsg::initAttributes" << endl;
mpSciMsgHeader = new Sci_Msg_Header;
if (NULL != mpSciMsgHeader)
@@ -90,7 +90,7 @@ void SciMsg::initAttributes ( )
SciMsg::SciMsg ( const SciMsg & sci_msg )
{
- clog << "SciMsg(SciMsg&)" << endl;
+ //clog << "SciMsg(SciMsg&)" << endl;
initAttributes();
@@ -112,7 +112,7 @@ SciMsg::SciMsg ( const SciMsg & sci_msg )
SciMsg::SciMsg ( const SciMsg * p_sci_msg )
{
- clog << "SciMsg(SciMsg*)" << endl;
+ //clog << "SciMsg(SciMsg*)" << endl;
initAttributes();
@@ -141,7 +141,7 @@ SciMsg::SciMsg ( const SciMsg * p_sci_msg )
SciMsg::~SciMsg ( )
{
- clog << "~SciMsg" << endl;
+ //clog << "~SciMsg" << endl;
if (NULL != mpSciMsgHeader)
{
@@ -179,7 +179,7 @@ SciMsg::~SciMsg ( )
//
bool SciMsg::checkCompatibility ( ) const
{
- clog << "SciMsg::checkCompatibility" << endl;
+ //clog << "SciMsg::checkCompatibility" << endl;
return (getDefinedSciMsgVersion() == getSciMsgHeader()->version);
}
@@ -189,7 +189,7 @@ bool SciMsg::checkCompatibility ( ) const
//
bool SciMsg::checkValidity ( ) const
{
- clog << "SciMsg::checkValidity" << endl;
+ //clog << "SciMsg::checkValidity" << endl;
bool bCheck = false;
if ( (getDefinedSciMsgMagicId() == getSciMsgHeader()->magic_id)
@@ -208,7 +208,7 @@ bool SciMsg::checkValidity ( ) const
//
bool SciMsg::identifySpecializedSciMsgData ( )
{
- clog << "SciMsg::identifySpecializedSciMsgData" << endl;
+ //clog << "SciMsg::identifySpecializedSciMsgData" << endl;
bool bIdentifyData = false;
if (NULL != getSciMsgData())
@@ -403,7 +403,7 @@ void SciMsg::displaySciMsgFlag ( ) const
//
bool SciMsg::removeData ( const unsigned long data_length_to_remove, unsigned long & data_length, unsigned char ** pp_data )
{
- clog << "SciMsg::removeData" << endl;
+ //clog << "SciMsg::removeData" << endl;
bool bRemoveData = false;
if ( (data_length >= data_length_to_remove) // check that there are enough data to remove the required data length
@@ -469,13 +469,13 @@ Sci_Msg_Type SciMsg::getSciMsgType ( ) const
bool SciMsg::setSciMsgType ( const Sci_Msg_Type type )
{
- clog << "SciMsg::setSciMsgType" << endl;
+ //clog << "SciMsg::setSciMsgType" << endl;
bool bSet = true;
mSciMsgType = type;
- clog << "\tSCI msg type = ";
- displaySciMsgType();
- clog << endl;
+ //clog << "\tSCI msg type = ";
+ //displaySciMsgType();
+ //clog << endl;
return bSet;
}
@@ -489,11 +489,11 @@ Sci_Msg_Station_Id SciMsg::getSciMsgStationId ( ) const
bool SciMsg::setSciMsgStationId ( const Sci_Msg_Station_Id station_id )
{
- clog << "SciMsg::setSciMsgStationId" << endl;
+ //clog << "SciMsg::setSciMsgStationId" << endl;
bool bSet = true;
mSciMsgStationId = station_id;
- clog << "\tSCI msg station id = " << getSciMsgStationId() << endl;
+ //clog << "\tSCI msg station id = " << getSciMsgStationId() << endl;
return bSet;
}
@@ -507,7 +507,7 @@ Sci_Msg_Id SciMsg::getSciMsgId ( ) const
bool SciMsg::incrementSciMsgId ( )
{
- clog << "SciMsg::incrementSciMsgId" << endl;
+ //clog << "SciMsg::incrementSciMsgId" << endl;
if ( SCI_MSG_ID_STATION > (mSciMsgId+1) )
{
@@ -517,7 +517,7 @@ bool SciMsg::incrementSciMsgId ( )
{
mSciMsgId = 0x0001;
}
- clog << "\tSCI msg id = 0x" << setfill('0') << setw(4) << uppercase << hex << getSciMsgId() << endl;
+ //clog << "\tSCI msg id = 0x" << setfill('0') << setw(4) << uppercase << hex << getSciMsgId() << endl;
return true;
}
@@ -531,13 +531,13 @@ Sci_Msg_Flag SciMsg::getSciMsgFlag ( ) const
bool SciMsg::setSciMsgFlag ( const Sci_Msg_Flag flag )
{
- clog << "SciMsg::setSciMsgFlag" << endl;
+ //clog << "SciMsg::setSciMsgFlag" << endl;
bool bSet = true;
mSciMsgFlag = flag;
- clog << "\tSCI msg flag = ";
- displaySciMsgFlag();
- clog << endl;
+ //clog << "\tSCI msg flag = ";
+ //displaySciMsgFlag();
+ //clog << endl;
return bSet;
}
@@ -551,7 +551,7 @@ Sci_Msg_Header * SciMsg::getSciMsgHeader ( ) const
bool SciMsg::setSciMsgHeader ( const Sci_Msg_Header * p_sci_msg_header )
{
- clog << "SciMsg::setSciMsgHeader" << endl;
+ //clog << "SciMsg::setSciMsgHeader" << endl;
bool bSetHeader = false;
if (NULL != p_sci_msg_header)
@@ -592,12 +592,12 @@ unsigned long SciMsg::getSciMsgDataLength ( ) const
bool SciMsg::setSciMsgDataLength ( const unsigned long data_length )
{
- clog << "SciMsg::setSciMsgDataLength" << endl;
+ //clog << "SciMsg::setSciMsgDataLength" << endl;
if ( SCI_MSG_MAX_SIZE >= data_length )
{
mSciMsgDataLength = data_length;
- clog << "\tSCI msg data length = " << dec << mSciMsgDataLength << " bytes" << endl;
+ //clog << "\tSCI msg data length = " << dec << mSciMsgDataLength << " bytes" << endl;
}
else
{
@@ -616,7 +616,7 @@ unsigned char * SciMsg::getSciMsgData ( ) const
bool SciMsg::setSciMsgData ( const unsigned char * p_data )
{
- clog << "SciMsg::setSciMsgData" << endl;
+ //clog << "SciMsg::setSciMsgData" << endl;
bool bSetData = false;
if (NULL != p_data)
@@ -666,10 +666,10 @@ unsigned long SciMsg::getSpecializedSciMsgHeaderSize ( ) const
bool SciMsg::setSpecializedSciMsgHeaderSize ( const unsigned long header_size )
{
- clog << "SciMsg::setSpecializedSciMsgHeaderSize" << endl;
+ //clog << "SciMsg::setSpecializedSciMsgHeaderSize" << endl;
mSpecializedSciMsgHeaderSize = header_size;
- clog << dec << "\tspecialized SCI msg header size = " << dec << mSpecializedSciMsgHeaderSize << " bytes" << endl;
+ //clog << dec << "\tspecialized SCI msg header size = " << dec << mSpecializedSciMsgHeaderSize << " bytes" << endl;
return true;
}
@@ -683,10 +683,10 @@ unsigned long SciMsg::getSpecializedSciMsgDataLength ( ) const
bool SciMsg::setSpecializedSciMsgDataLength ( const unsigned long data_length )
{
- clog << "SciMsg::setSpecializedSciMsgDataLength" << endl;
+ //clog << "SciMsg::setSpecializedSciMsgDataLength" << endl;
mSpecializedSciMsgDataLength = data_length;
- clog << dec << "\tspecialized SCI msg data length = " << dec << mSpecializedSciMsgDataLength << " bytes" << endl;
+ //clog << dec << "\tspecialized SCI msg data length = " << dec << mSpecializedSciMsgDataLength << " bytes" << endl;
return true;
}
@@ -700,7 +700,7 @@ unsigned char * SciMsg::getSpecializedSciMsgData ( ) const
bool SciMsg::setSpecializedSciMsgData ( const unsigned char * p_data )
{
- clog << "SciMsg::setSpecializedSciMsgData" << endl;
+ //clog << "SciMsg::setSpecializedSciMsgData" << endl;
bool bSetData = false;
mpSpecializedSciMsgData = new unsigned char [getSpecializedSciMsgDataLength()];
diff --git a/maximus/sci/src/SciServer.cpp b/maximus/sci/src/SciServer.cpp
index f221edfb97..1d1cd51fd3 100644
--- a/maximus/sci/src/SciServer.cpp
+++ b/maximus/sci/src/SciServer.cpp
@@ -150,16 +150,16 @@ bool SciServer::sendSciMsg ( const SciMsg * sci_msg_to_send ) const
{
// Display SCI msg to send
//
- sci_msg_to_send->displaySciMsgHeader();
- clog << "\tSCI msg data = ";
- sci_msg_to_send->displaySciMsgData();
- clog << endl;
- sci_msg_to_send->displaySpecializedSciMsgHeader();
- clog << "\tspecialized SCI msg data = ";
- sci_msg_to_send->displaySpecializedSciMsgData();
- clog << endl;
+ //sci_msg_to_send->displaySciMsgHeader();
+ //clog << "\tSCI msg data = ";
+ //sci_msg_to_send->displaySciMsgData();
+ //clog << endl;
+ //sci_msg_to_send->displaySpecializedSciMsgHeader();
+ //clog << "\tspecialized SCI msg data = ";
+ //sci_msg_to_send->displaySpecializedSciMsgData();
+ //clog << endl;
- return bSend; // TO REMOVE
+ return true; // TO REMOVE
// Retrieve destination station
//
@@ -312,7 +312,7 @@ bool SciServer::receiveMsg ( const Sci_Msg_Header * header,
void SciServer::displaySpecializedSciMsgArray ( ) const
{
- clog << "SciServer::displaySpecializedSciMsgArray" << endl;
+ //clog << "SciServer::displaySpecializedSciMsgArray" << endl;
clog << "\tspecialized SCI msg array = " << endl;
for (unsigned int i=0; i<getArraySize(); i++)
@@ -436,7 +436,7 @@ void * SciServer::serverThread ( void * arg )
bool SciServer::createSciMsg ( const Sci_Msg_Type type, SciMsg ** received_sci_msg ) const
{
- clog << "SciServer::createSciMsg" << endl;
+ //clog << "SciServer::createSciMsg" << endl;
bool bCreateMsg = false;
// Create a specialized SCI message according to the header type
@@ -478,7 +478,7 @@ bool SciServer::fillSciMsg ( const Sci_Msg_Header * p_msg_header,
const unsigned char * p_received_data,
SciMsg ** created_sci_msg ) const
{
- clog << "SciServer::fillSciMsg" << endl;
+ //clog << "SciServer::fillSciMsg" << endl;
bool bFillMsg = false;
// Fill SCI message contents
@@ -524,7 +524,7 @@ bool SciServer::fillSciMsg ( const Sci_Msg_Header * p_msg_header,
bool SciServer::processSciMsg ( SciMsg * received_sci_msg ) const
{
- clog << "SciServer::processSciMsg" << endl;
+ //clog << "SciServer::processSciMsg" << endl;
bool bProcessMsg = false;
if (NULL != received_sci_msg)
@@ -593,7 +593,7 @@ Sci_Server_Status SciServer::getStatus ( ) const
bool SciServer::setStatus ( const Sci_Server_Status new_status ) throw (Error)
{
- clog << "SciServer::setStatus" << endl;
+ //clog << "SciServer::setStatus" << endl;
bool bSetStatus = false;
if((new_status < 0) || (new_status >= MAXIMUS_SCI_SERVER_STATUS_NB))
@@ -603,9 +603,9 @@ bool SciServer::setStatus ( const Sci_Server_Status new_status ) throw (Error)
else
{
mStatus = new_status;
- clog << "\tstatus = ";
- displayStatus();
- clog << endl;
+ //clog << "\tstatus = ";
+ //displayStatus();
+ //clog << endl;
bSetStatus = true;
}
@@ -621,7 +621,7 @@ StationsList * SciServer::getStationsList ( ) const
bool SciServer::setStationsList ( StationsList * stations_list )
{
- clog << "SciServer::setStationsList" << endl;
+ //clog << "SciServer::setStationsList" << endl;
bool bSetList = false;
if (NULL != stations_list)