This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
void CircuitManager::GetStatus(const CircuitStatusMsg *pMsg) const | |
{ | |
for (int i= 0; i < MAX_CIRCUITS; i++) | |
{ | |
pMsg->circuitInfo[i].circuitId = m_pCircuit[i]->GetId(); | |
pMsg->circuitInfo[i].circuitType = m_pCircuit[i]->GetType(); | |
pMsg->circuitInfo[i].circuitStatus = m_pCircuit[i]->GetStatus(); | |
pMsg->circuitInfo[i].circuitCallId = m_pCircuit[i]->GetCallId(); | |
pMsg->circuitInfo[i].circuitState = m_pCircuit[i]->GetState(); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
void CircuitManager::GetStatus(const CircuitStatusMsg *pMsg) const | |
{ | |
for (int i= 0; i < MAX_CIRCUITS; i++) | |
{ | |
m_pCircuit[i]->UpdateStatus(pMsg->circuitInfo[i]); | |
} | |
} | |
void Circuit::UpdateStatus(CircuitInfo &circuitInfo) const | |
{ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class DSP | |
{ | |
public: | |
Queue *GetWriteBufferQueue(); | |
Queue *GetReadBufferQueue(); | |
void SetStatusRegister(int mask); | |
void SetCongestionLevel(); | |
void SetWriteBufferQueue(Buffer *pQueue); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class DSP | |
{ | |
public: | |
void WriteBuffer(Buffer *pBuf); | |
Buffer *ReadBuffer(); | |
}; | |
Status MessageHandler::SendMessage(Buffer *) | |
{ | |
int dspId = pBuffer->GetDSP(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class DigitTrunk | |
{ | |
Status m_status; | |
Timeslot m_timeslot[MAX_TIMESLOT_PER_TRUNK]; | |
int m_signalingTimeslot; | |
int m_signalingStatus; | |
. . . | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class DigitTrunk | |
{ | |
Status m_status; | |
Timeslot m_timeslot[MAX_TIMESLOTS_PER_TRUNK]; | |
class SignalingHandler | |
{ | |
int m_signalingTimeslot; | |
int m_signalingStatus; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Each Signal Processor Card contains 32 DSPs. | |
// This is represented by a two dimensional | |
// array of DSP objects. The first dimension | |
// is the Signal Processor Card Id and the second | |
// dimension is the DSP id on the card | |
DSP m_dsp[MAX_SIGNAL_PROCESSOR_CARDS][MAX_DSPS_PER_CARD]; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// The two dimensional array is replaced. We identify | |
// SignalProcesingCard as an object. This | |
// object contains 32 DSPs | |
class SignalProcessingCard | |
{ | |
DSP m_dsp[MAX_DSPS_PER_CARD]; | |
public: | |
. . . | |
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
. . . | |
for (card=0; card < MAX_SIGNAL_PROCESSING_CARDS; card++) | |
{ | |
for (dsp=0; dsp < MAX_DSPS_PER_CARD; dsp++) | |
{ | |
m_signalProcessingCard[card].GetDSP(dsp)->Initialize(); | |
} | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
. . . | |
for (card=0; card < MAX_SIGNAL_PROCESSING_CARDS; card++) | |
{ | |
m_signalProcessingCard[card].Initialize(); | |
} | |
void SignalProcessingCard::Initialize() | |
{ | |
for (dsp=0; dsp < MAX_DSPS_PER_CARD; dsp++) | |
{ |
OlderNewer