本文整理汇总了C++中CAMBEData::getId方法的典型用法代码示例。如果您正苦于以下问题:C++ CAMBEData::getId方法的具体用法?C++ CAMBEData::getId怎么用?C++ CAMBEData::getId使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类CAMBEData
的用法示例。
在下文中一共展示了CAMBEData::getId方法的8个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1:
void CG2Handler::process(CAMBEData& data)
{
// Check to see if this is for StarNet
CStarNetHandler* handler = CStarNetHandler::findStarNet(data);
if (handler != NULL) {
handler->process(data);
return;
}
// No need to go any further
if (m_maxRoutes == 0U)
return;
unsigned int id = data.getId();
for (unsigned int i = 0U; i < m_maxRoutes; i++) {
CG2Handler* route = m_routes[i];
if (route != NULL) {
if (route->m_id == id) {
route->m_inactivityTimer.reset();
route->m_repeater->process(data, DIR_INCOMING, AS_G2);
if (data.isEnd()) {
delete route;
m_routes[i] = NULL;
}
return;
}
}
}
}
示例2: processInt
void CDExtraHandler::processInt(CAMBEData& data)
{
if (m_linkState != DEXTRA_LINKED)
return;
if (m_dExtraId != data.getId())
return;
m_inactivityTimer.reset();
m_dExtraSeq = data.getSeq();
// Send the header every 21 frames
if (m_dExtraSeq == 0U)
m_destination->process(*m_header, AS_DUP);
// Copy the data to ensure it remains unchanged
CAMBEData temp(data);
m_destination->process(temp, AS_DEXTRA);
if (temp.isEnd()) {
delete m_header;
m_header = NULL;
m_dExtraId = 0x00U;
m_dExtraSeq = 0x00U;
m_inactivityTimer.stop();
}
}
示例3: writeAMBEInt
void CDPlusHandler::writeAMBEInt(CAMBEData& data, DIRECTION direction)
{
if (m_linkState != DPLUS_LINKED)
return;
if (direction != m_direction)
return;
// Already in use?
if (m_dPlusId != 0x00U)
return;
switch (m_direction) {
case DIR_OUTGOING:
if (data.getId() == m_rptrId) {
data.setDestination(m_yourAddress, m_yourPort);
m_handler->writeAMBE(data);
if (data.isEnd())
m_rptrId = 0x00U;
}
break;
case DIR_INCOMING:
data.setDestination(m_yourAddress, m_yourPort);
m_handler->writeAMBE(data);
break;
}
}
示例4: processInt
void CDPlusHandler::processInt(CAMBEData& data)
{
unsigned int id = data.getId();
if (m_dPlusId != id)
return;
m_dPlusSeq = data.getSeq();
// Send the header every 21 frames
if (m_dPlusSeq == 0U)
m_destination->process(*m_header, AS_DUP);
m_inactivityTimer.reset();
m_pollInactivityTimer.reset();
m_destination->process(data, AS_DPLUS);
if (data.isEnd()) {
m_dPlusId = 0x00U;
m_dPlusSeq = 0x00U;
delete m_header;
m_header = NULL;
m_inactivityTimer.stop();
}
}
示例5: processInt
void CXReflectorDPlusHandler::processInt(CAMBEData& data)
{
unsigned int id = data.getId();
if (m_dPlusId == id) {
m_inactivityTimer.reset();
m_pollInactivityTimer.reset();
m_destination->process(m_dPlusId, data);
if (data.isEnd()) {
m_dPlusId = 0x00;
m_inactivityTimer.stop();
}
}
}
示例6: process
void CCCSHandler::process(CAMBEData& data)
{
CHeaderData& header = data.getHeader();
unsigned int seqNo = data.getSeq();
unsigned int id = data.getId();
if (m_state != CS_CONNECTED && m_state != CS_ACTIVE)
return;
// This is a new incoming CCS call
if (m_state == CS_CONNECTED) {
m_yourCall = header.getMyCall1();
m_local = header.getYourCall();
m_direction = DIR_INCOMING;
m_time = ::time(NULL);
m_state = CS_ACTIVE;
m_stateChange = true;
m_inactivityTimer.start();
m_handler->ccsLinkMade(m_yourCall);
wxLogMessage(wxT("CCS: New incoming link to %s from %s"), m_local.c_str(), m_yourCall.c_str());
}
m_pollInactivityTimer.reset();
m_inactivityTimer.reset();
if (m_id != id) {
// Write to Header.log if it's enabled
if (m_headerLogger != NULL)
m_headerLogger->write(wxT("CCS"), header);
header.setCQCQCQ();
m_handler->process(header, DIR_INCOMING, AS_CCS);
m_id = id;
} else if (seqNo == 0U) {
header.setCQCQCQ();
m_handler->process(header, DIR_INCOMING, AS_DUP);
}
m_handler->process(data, DIR_INCOMING, AS_CCS);
}
示例7: process
bool CStarNetHandler::process(CAMBEData &data, AUDIO_SOURCE source)
{
unsigned int id = data.getId();
if (id != m_id)
return false;
m_linkTimer.reset();
sendToRepeaters(data);
if (data.isEnd()) {
m_linkTimer.stop();
m_id = 0x00U;
// Clear the repeater list
for (CStarNetRepeatersHashMap::iterator it = m_repeaters.begin(); it != m_repeaters.end(); ++it)
delete it->second;
m_repeaters.clear();
}
return true;
}
示例8: writeAMBEInt
void CDExtraHandler::writeAMBEInt(CAMBEData& data, DIRECTION direction)
{
if (m_linkState != DEXTRA_LINKED)
return;
// Is it link in the right direction
if (m_direction != direction)
return;
// If the ids don't match, reject
if (data.getId() != m_rptrId)
return;
// Already in use?
if (m_dExtraId != 0x00)
return;
data.setDestination(m_address, m_port);
m_handler->writeAMBE(data);
if (data.isEnd())
m_rptrId = 0x00;
}