本文整理汇总了C++中CHeaderData::setCQCQCQ方法的典型用法代码示例。如果您正苦于以下问题:C++ CHeaderData::setCQCQCQ方法的具体用法?C++ CHeaderData::setCQCQCQ怎么用?C++ CHeaderData::setCQCQCQ使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类CHeaderData
的用法示例。
在下文中一共展示了CHeaderData::setCQCQCQ方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: processInt
void CXReflectorDPlusHandler::processInt(CHeaderData& header)
{
wxString rpt1 = header.getRptCall1();
wxString rpt2 = header.getRptCall2();
unsigned int id = header.getId();
if (!m_linked)
return;
// Convert the callsign(s) from the DPlus call to the repeater call
wxString rpt = m_dplusCallsign;
wxChar band = rpt2.GetChar(LONG_CALLSIGN_LENGTH - 1U);
rpt.SetChar(LONG_CALLSIGN_LENGTH - 1U, band);
// Check the destination callsign
m_destination = CXReflectorReflectorHandler::findReflector(rpt);
if (m_destination == NULL) {
band = rpt1.GetChar(LONG_CALLSIGN_LENGTH - 1U);
rpt.SetChar(LONG_CALLSIGN_LENGTH - 1U, band);
m_destination = CXReflectorReflectorHandler::findReflector(rpt);
if (m_destination == NULL) {
wxLogMessage(wxT("Incoming unmatched D-Plus header, RPT1=%s, RPT2=%s"), rpt1.c_str(), rpt2.c_str());
return;
}
}
if (m_dPlusId != 0x00)
return;
m_dPlusId = id;
m_inactivityTimer.start();
m_pollInactivityTimer.reset();
header.setCQCQCQ();
header.setFlag1(0x00U);
bool ret = m_destination->process(m_dPlusId, header);
// Write to Users.log if it's enabled
if (ret && m_userLogger != NULL)
m_userLogger->write(header.getMyCall1(), header.getRptCall2(), m_reflector, PROTO_DPLUS);
}
示例2: process
bool CStarNetHandler::process(CHeaderData &header, AUDIO_SOURCE source)
{
if (m_id != 0x00U)
return false;
wxString my = header.getMyCall1();
m_id = header.getId();
m_linkTimer.start();
// Change the Your callsign to CQCQCQ
header.setCQCQCQ();
header.setFlag1(0x00);
header.setFlag2(0x00);
header.setFlag3(0x00);
// Build new repeater list
for (CStarNetUsersHashMap::const_iterator it = m_users.begin(); it != m_users.end(); ++it) {
CStarNetUser* user = it->second;
if (user != NULL) {
// Find the user in the cache
CUserData* userData = m_cache->findUser(user->getCallsign());
if (userData != NULL) {
// Find the users repeater in the repeater list, add it otherwise
CStarNetRepeater* repeater = m_repeaters[userData->getRepeater()];
if (repeater == NULL) {
// Add a new repeater entry
repeater = new CStarNetRepeater;
repeater->m_destination = wxT("/") + userData->getRepeater().Left(6U) + userData->getRepeater().Right(1U);
repeater->m_repeater = userData->getRepeater();
repeater->m_gateway = userData->getGateway();
repeater->m_address = userData->getAddress();
repeater->m_local = CRepeaterHandler::findDVRepeater(userData->getRepeater());
m_repeaters[userData->getRepeater()] = repeater;
}
delete userData;
userData = NULL;
}
}
}
switch (m_callsignSwitch) {
case SCS_GROUP_CALLSIGN:
// Change the My Callsign 1 to be that of the StarNet group
header.setMyCall1(m_groupCallsign);
header.setMyCall2(wxT("SNET"));
break;
case SCS_USER_CALLSIGN:
// Change the My Callsign 2 to be that of the StarNet group
header.setMyCall1(my);
header.setMyCall2(m_shortCallsign);
break;
default:
break;
}
sendToRepeaters(header);
if (m_txMsgSwitch)
sendFromText(my);
return true;
}