本文整理汇总了C++中TransactionEntry::service方法的典型用法代码示例。如果您正苦于以下问题:C++ TransactionEntry::service方法的具体用法?C++ TransactionEntry::service怎么用?C++ TransactionEntry::service使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类TransactionEntry
的用法示例。
在下文中一共展示了TransactionEntry::service方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: AssignmentCompleteHandler
void Control::AssignmentCompleteHandler(const L3AssignmentComplete *confirm, TCHFACCHLogicalChannel *TCH)
{
// The assignment complete handler is used to
// tie together split transactions across a TCH assignment
// in non-VEA call setup.
assert(TCH);
assert(confirm);
LOG(DEBUG) << *confirm;
// Check the transaction table to know what to do next.
TransactionEntry transaction;
if (!gTransactionTable.find(TCH->transactionID(),transaction)) {
LOG(WARN) << "Assignment Complete with no transaction record for ID " << TCH->transactionID();
throw UnexpectedMessage();
}
LOG(INFO) << "service="<<transaction.service().type();
// These "controller" functions don't return until the call is cleared.
switch (transaction.service().type()) {
case L3CMServiceType::MobileOriginatedCall:
MOCController(transaction,TCH);
break;
case L3CMServiceType::MobileTerminatedCall:
MTCController(transaction,TCH);
break;
default:
LOG(WARN) << "unsupported service " << transaction.service();
throw UnsupportedMessage(transaction.ID());
}
// If we got here, the call is cleared.
}
示例2: PagingResponseHandler
//.........这里部分代码省略.........
if(gFuzzingControl.mobileIdentity()==mobileID){
COUT("Catch a Failed Response");
gFuzzingControl.state(FuzzingFailed);
gFuzzingControl.signal();
DCCH->send(RELEASE);
return;
}
}
if(gFuzzingControl.state()==GetFuzzingResponse&&gFuzzingControl.PD()==GSM::L3MobilityManagementPD&&gFuzzingControl.MTI()==L3MMMessage::LocationUpdatingAccept){
if(gFuzzingControl.mobileIdentity()==mobileID){
COUT("Response Correctly in LocationUpdatingAccept Fuzzing");
gFuzzingControl.state(NonFuzzing);
gFuzzingControl.signal();
DCCH->send(RELEASE);
return;
}
}
if(gFuzzingControl.state()==GetFuzzingResponse&&gFuzzingControl.PD()==GSM::L3MobilityManagementPD&&gFuzzingControl.MTI()==L3MMMessage::MMInformation){
if(gFuzzingControl.mobileIdentity()==mobileID){
COUT("Response Correctly in Fuzzying MMInformation");
gFuzzingControl.state(NonFuzzing);
gFuzzingControl.signal();
DCCH->send(RELEASE);
return;
}
}
if(gFuzzingControl.state()==TestCCFail&&gFuzzingControl.PD()==GSM::L3CallControlPD&&gFuzzingControl.MTI()==L3CCMessage::Setup){
if(gFuzzingControl.mobileIdentity()==mobileID){
COUT("Response Correctly in Fuzzying CC Setup Information");
gFuzzingControl.state(GetPagingResponse);
gFuzzingControl.signal();
DCCH->send(RELEASE);
return;
}
}
if(gFuzzingControl.state()==TestSMSFail){
if(gFuzzingControl.mobileIdentity()==mobileID){
COUT("Response Correctly After Fuzzying SMS");
gFuzzingControl.state(GetPagingResponse);
gFuzzingControl.signal();
DCCH->send(RELEASE);
return;
}
}
if(gFuzzingControl.state()==SMSFuzzing){
if(gFuzzingControl.mobileIdentity()==mobileID){
COUT("Get Paging Response in Fuzzying SMS");
bool success=deliverFuzzingSMS(gFuzzingControl.mFuzzingData, DCCH);
if(!success) {COUT("Fuzzing SMS send failed!");gFuzzingControl.state(SMSFailed);}
else {COUT("Fuzzing SMS send success!");gFuzzingControl.state(SMSReponse);}
gFuzzingControl.signal();
return;
}
}
// Find the transction table entry that was created when the phone was paged.
// We have to look up by mobile ID since the paging entry may have been
// erased before this handler was called. That's too bad.
// HACK -- We also flush stray transactions until we find what we
// are looking for.
TransactionEntry transaction;
while (true) {
if (!gTransactionTable.find(mobileID,transaction)) {
LOG(WARN) << "Paging Reponse with no transaction record for " << mobileID;
// Cause 0x41 means "call already cleared".
DCCH->send(L3ChannelRelease(0x41));
return;
}
// We are looking for a mobile-terminated transaction.
// The transaction controller will take it from here.
switch (transaction.service().type()) {
case L3CMServiceType::MobileTerminatedCall:
MTCStarter(transaction, DCCH);
return;
case L3CMServiceType::TestCall:
TestCall(transaction, DCCH);
return;
case L3CMServiceType::MobileTerminatedShortMessage:
MTSMSController(transaction, DCCH);
return;
//Shirley!!!!!!!!!!!!!!!!!!!!!!
case L3CMServiceType::MobileTerminatedShortMessage2:
MTSMSController2(transaction, DCCH);
return;
default:
// Flush stray MOC entries.
// There should not be any, but...
LOG(WARN) << "flushing stray " << transaction.service().type() << " transaction entry";
gTransactionTable.remove(transaction.ID());
continue;
}
}
// The transaction may or may not be cleared,
// depending on the assignment type.
}
示例3: PagingResponseHandler
void Control::PagingResponseHandler(const L3PagingResponse* resp, LogicalChannel* DCCH)
{
assert(resp);
assert(DCCH);
LOG(INFO) << *resp;
// If we got a TMSI, find the IMSI.
L3MobileIdentity mobileID = resp->mobileIdentity();
if (mobileID.type()==TMSIType) {
const char *IMSI = gTMSITable.IMSI(mobileID.TMSI());
if (IMSI) mobileID = L3MobileIdentity(IMSI);
else {
// Don't try too hard to resolve.
// The handset is supposed to respond with the same ID type as in the request.
LOG(NOTICE) << "Paging Reponse with non-valid TMSI";
// Cause 0x60 "Invalid mandatory information"
DCCH->send(L3ChannelRelease(0x60));
return;
}
}
// Delete the Mobile ID from the paging list to free up CCCH bandwidth.
// ... if it was not deleted by a timer already ...
gBTS.pager().removeID(mobileID);
// Find the transction table entry that was created when the phone was paged.
// We have to look up by mobile ID since the paging entry may have been
// erased before this handler was called. That's too bad.
// HACK -- We also flush stray transactions until we find what we
// are looking for.
TransactionEntry transaction;
while (true) {
if (!gTransactionTable.find(mobileID,transaction)) {
LOG(WARN) << "Paging Reponse with no transaction record for " << mobileID;
// Cause 0x41 means "call already cleared".
DCCH->send(L3ChannelRelease(0x41));
return;
}
// We are looking for a mobile-terminated transaction.
// The transaction controller will take it from here.
switch (transaction.service().type()) {
case L3CMServiceType::MobileTerminatedCall:
MTCStarter(transaction, DCCH, mobileID);
return;
case L3CMServiceType::TestCall:
TestCall(transaction, DCCH);
return;
case L3CMServiceType::MobileTerminatedShortMessage:
MTSMSController(transaction, DCCH);
return;
default:
// Flush stray MOC entries.
// There should not be any, but...
LOG(WARN) << "flushing stray " << transaction.service().type() << " transaction entry";
gTransactionTable.remove(transaction.ID());
continue;
}
}
// The transaction may or may not be cleared,
// depending on the assignment type.
}