当前位置: 首页>>代码示例>>C++>>正文


C++ AddChannel函数代码示例

本文整理汇总了C++中AddChannel函数的典型用法代码示例。如果您正苦于以下问题:C++ AddChannel函数的具体用法?C++ AddChannel怎么用?C++ AddChannel使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。


在下文中一共展示了AddChannel函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。

示例1: ClearChannels

void SpiAnalyzerSettings::LoadSettings( const char* settings )
{
	SimpleArchive text_archive;
	text_archive.SetString( settings );

	const char* name_string;	//the first thing in the archive is the name of the protocol analyzer that the data belongs to.
	text_archive >> &name_string;
	if( strcmp( name_string, "SaleaeSpiAnalyzer" ) != 0 )
		AnalyzerHelpers::Assert( "SaleaeSpiAnalyzer: Provided with a settings string that doesn't belong to us;" );

	text_archive >>  mMosiChannel;
	text_archive >>  mMisoChannel;
	text_archive >>  mClockChannel;
	text_archive >>  mEnableChannel;
	text_archive >>  *(U32*)&mShiftOrder;
	text_archive >>  mBitsPerTransfer;
	text_archive >>  *(U32*)&mClockInactiveState;
	text_archive >>  *(U32*)&mDataValidEdge;
	text_archive >>  *(U32*)&mEnableActiveState;

	//bool success = text_archive >> mUsePackets;  //new paramater added -- do this for backwards compatibility
	//if( success == false )
	//	mUsePackets = false; //if the archive fails, set the default value

	ClearChannels();
	AddChannel( mMosiChannel, "MOSI", mMosiChannel != UNDEFINED_CHANNEL );
	AddChannel( mMisoChannel, "MISO", mMisoChannel != UNDEFINED_CHANNEL );
	AddChannel( mClockChannel, "CLOCK", mClockChannel != UNDEFINED_CHANNEL );
	AddChannel( mEnableChannel, "ENABLE", mEnableChannel != UNDEFINED_CHANNEL );

	UpdateInterfacesFromSettings();
}
开发者ID:blargony,项目名称:RFFEAnalyzer,代码行数:32,代码来源:SpiAnalyzerSettings.cpp

示例2: mClockChannel

SDMMCAnalyzerSettings::SDMMCAnalyzerSettings()
    :	mClockChannel(UNDEFINED_CHANNEL),
      mCommandChannel(UNDEFINED_CHANNEL),
      mProtocol(PROTOCOL_MMC),
      mSampleEdge(SAMPLE_EDGE_RISING)
{
    mClockChannelInterface.reset(new AnalyzerSettingInterfaceChannel());
    mClockChannelInterface->SetTitleAndTooltip("Clock", "Clock (CLK)");
    mClockChannelInterface->SetChannel(mClockChannel);

    mCommandChannelInterface.reset(new AnalyzerSettingInterfaceChannel());
    mCommandChannelInterface->SetTitleAndTooltip("Command", "Command (CMD)");
    mCommandChannelInterface->SetChannel(mCommandChannel);

    mProtocolInterface.reset(new AnalyzerSettingInterfaceNumberList());
    mProtocolInterface->SetTitleAndTooltip("Protocol", "Protocol");
    mProtocolInterface->AddNumber(PROTOCOL_MMC, "MMC", "MMC protocol");
    mProtocolInterface->AddNumber(PROTOCOL_SD,	"SD",  "SD protocol");

    mSampleEdgeInterface.reset(new AnalyzerSettingInterfaceNumberList());
    mSampleEdgeInterface->SetTitleAndTooltip("Sample edge", "Clock sampling edge");
    mSampleEdgeInterface->AddNumber(SAMPLE_EDGE_RISING,  "Rising",  "Sample on rising edge");
    mSampleEdgeInterface->AddNumber(SAMPLE_EDGE_FALLING, "Falling", "Sample on falling edge");

    AddInterface(mClockChannelInterface.get());
    AddInterface(mCommandChannelInterface.get());
    AddInterface(mProtocolInterface.get());
    AddInterface(mSampleEdgeInterface.get());

    ClearChannels();
    AddChannel(mClockChannel, "Clock", false);
    AddChannel(mCommandChannel, "Command", false);
}
开发者ID:BenGardiner,项目名称:sdmmc-analyzer,代码行数:33,代码来源:SDMMCAnalyzerSettings.cpp

示例3: SetErrorText

bool USBAnalyzerSettings::SetSettingsFromInterfaces()
{
	if (mDPChannelInterface.GetChannel() == UNDEFINED_CHANNEL)
	{
		SetErrorText("Please select an input for the D+ channel.");
		return false;
	}

	if (mDMChannelInterface.GetChannel() == UNDEFINED_CHANNEL)
	{
		SetErrorText("Please select an input for the D- channel.");
		return false;
	}

	mDPChannel = mDPChannelInterface.GetChannel();
	mDMChannel = mDMChannelInterface.GetChannel();
	mSpeed = USBSpeed(int(mSpeedInterface.GetNumber()));
	mDecodeLevel = USBDecodeLevel(int(mDecodeLevelInterface.GetNumber()));

	if (mDMChannel == mDPChannel)
	{
		SetErrorText("Please select different inputs for the D- and D+ channels.");
		return false;
	}

	ClearChannels();

	AddChannel(mDPChannel, "D+", true);
	AddChannel(mDMChannel, "D-", true);

	return true;
}
开发者ID:blargony,项目名称:RFFEAnalyzer,代码行数:32,代码来源:USBAnalyzerSettings.cpp

示例4: mClockChannel

PS2KeyboardAnalyzerSettings::PS2KeyboardAnalyzerSettings()
:	mClockChannel( UNDEFINED_CHANNEL ),
	mDataChannel( UNDEFINED_CHANNEL ),
	mDeviceType( 0 )
{
	mClockChannelInterface.reset( new AnalyzerSettingInterfaceChannel() );
	mClockChannelInterface->SetTitleAndTooltip( "Clock", "PS/2 - Clock" );
	mClockChannelInterface->SetChannel( mClockChannel );

	mDataChannelInterface.reset( new AnalyzerSettingInterfaceChannel() );
	mDataChannelInterface->SetTitleAndTooltip( "Data", "PS/2 - Data" );
	mDataChannelInterface->SetChannel( mDataChannel );

	mDeviceTypeInterface.reset( new AnalyzerSettingInterfaceNumberList() );
	mDeviceTypeInterface->SetTitleAndTooltip( "Device Type", "Device Type");
	mDeviceTypeInterface->AddNumber(0, "Keyboard", "Keyboard");
	mDeviceTypeInterface->AddNumber(1, "Mouse (Standard PS/2)", "Mouse (Standard PS/2)");
	mDeviceTypeInterface->AddNumber(2, "Mouse (IntelliMouse)", "Mouse (IntelliMouse)");
	mDeviceTypeInterface->SetNumber( mDeviceType );

	AddInterface( mClockChannelInterface.get() );
	AddInterface( mDataChannelInterface.get() );
	AddInterface( mDeviceTypeInterface.get() );

	AddExportOption( 0, "Export captured keys as text file (Keyboard Only)" );
	AddExportExtension( 0, "text", "txt" );
	AddExportOption( 1, "Export data as .csv log file" );
	AddExportExtension( 1, "csv", "csv" );

	ClearChannels();
	AddChannel( mClockChannel, "PS/2 - Clock", false );
	AddChannel( mDataChannel, "PS/2 - Data", false );
}
开发者ID:blargony,项目名称:RFFEAnalyzer,代码行数:33,代码来源:PS2KeyboardAnalyzerSettings.cpp

示例5: ClearChannels

bool PS2KeyboardAnalyzerSettings::SetSettingsFromInterfaces()
{
	mClockChannel = mClockChannelInterface->GetChannel();
	mDataChannel = mDataChannelInterface->GetChannel();
	mDeviceType = mDeviceTypeInterface->GetNumber();
	ClearChannels();

	Channel ArrayOfChannels [2];
	ArrayOfChannels[0] = mClockChannel;
	ArrayOfChannels[1] = mDataChannel;

	bool IsInvalidConfig = AnalyzerHelpers::DoChannelsOverlap(ArrayOfChannels,2);

	if(IsInvalidConfig)
	{
		SetErrorText( "Clock and Data must be unique channels!" );
		return false;
	}
	else
	{
		AddChannel( mClockChannel, "PS/2 - Clock", true );
		AddChannel( mDataChannel, "PS/2 - Data", true );
		return true;
	}

	return true;
}
开发者ID:blargony,项目名称:RFFEAnalyzer,代码行数:27,代码来源:PS2KeyboardAnalyzerSettings.cpp

示例6: ClearChannels

bool Xlink2WAnalyzerSettings::SetSettingsFromInterfaces()
{
    chanW0 = chanW0Interface->GetChannel();
    chanW1 = chanW1Interface->GetChannel();

    ClearChannels();
    AddChannel( chanW0, "XLINK Wire 0", true );
    AddChannel( chanW1, "XLINK Wire 1", true );

    return true;
}
开发者ID:BiancoZandbergen,项目名称:XMOS_xCONNECT_Saleae_LA,代码行数:11,代码来源:Xlink2WAnalyzerSettings.cpp

示例7: ClearChannels

bool SWDAnalyzerSettings::SetSettingsFromInterfaces()
{
	mSWDIOChannel = mSWDIOChannelInterface->GetChannel();
	mSWCLKChannel = mSWCLKChannelInterface->GetChannel();

	ClearChannels();
	AddChannel( mSWDIOChannel, "SWDIO", true );
	AddChannel( mSWCLKChannel, "SWCLK", true );

	return true;
}
开发者ID:GotoHack,项目名称:SaleaeSWDAnalyzer,代码行数:11,代码来源:SWDAnalyzerSettings.cpp

示例8: ClearChannels

bool QuadratureAnalyserAnalyzerSettings::SetSettingsFromInterfaces()
{
	mInputChannelA = mInputChannelAInterface->GetChannel();
	mInputChannelB = mInputChannelBInterface->GetChannel();
	ticksPerRotation = mTicksPerRotationInterface->GetInteger();
	ticksPerFrame = mTicksPerFrameInterface->GetInteger();

	ClearChannels();
	AddChannel( mInputChannelA, "Quadrature A", true);
	AddChannel( mInputChannelB, "Quadrature B", true);

	return true;
}
开发者ID:hvontres,项目名称:Quadrature-Saleae-Analyser,代码行数:13,代码来源:QuadratureAnalyserAnalyzerSettings.cpp

示例9: ClearChannels

void MDIOAnalyzerSettings::LoadSettings( const char* settings )
{
	SimpleArchive text_archive;
	text_archive.SetString( settings );

	text_archive >> mMdioChannel;
	text_archive >> mMdcChannel;

	ClearChannels();
	AddChannel( mMdioChannel, "MDIO", true );
	AddChannel( mMdcChannel, "MDC", true );

	UpdateInterfacesFromSettings();
}
开发者ID:blargony,项目名称:RFFEAnalyzer,代码行数:14,代码来源:MDIOAnalyzerSettings.cpp

示例10: AddChannel

void LD110AnalyzerSettings::AddChannels()
  {
  for(int nIndex = 0; nIndex < m_nBCDAndDigitChannelCount; nIndex++)
    {
    m_oTitle.str("Digit ");
    m_oTitle << nIndex + 1 << " clock";
    AddChannel(m_oDigitChannelVector[nIndex], m_oTitle.str().c_str(), true);

    m_oTitle.str("Digit ");
    m_oTitle << nIndex + 1 << " clock";
    AddChannel(m_oDigitChannelVector[nIndex], m_oTitle.str().c_str(), true);
    }

	AddChannel(m_oGlobalClockChannel, "Global IC clock", true);
  }
开发者ID:fmorgner,项目名称:LD110,代码行数:15,代码来源:LD110AnalyzerSettings.cpp

示例11: mInputChannel

IRAnalyzerSettings::IRAnalyzerSettings()
:	mInputChannel( UNDEFINED_CHANNEL ),
	mFrequency( 17777 ),
	mSignal (NEC_SIG)
{
	mInputChannelInterface.reset( new AnalyzerSettingInterfaceChannel() );
	mInputChannelInterface->SetTitleAndTooltip( "Input", "Standard InfraRed" );
	mInputChannelInterface->SetChannel( mInputChannel );

	mFrenquencyInterface.reset( new AnalyzerSettingInterfaceInteger() );
	mFrenquencyInterface->SetTitleAndTooltip( "Frequency (Hz)",  "Specify the frequency used." );
	mFrenquencyInterface->SetMax( 6000000 );
	mFrenquencyInterface->SetMin( 1 );
	mFrenquencyInterface->SetInteger( mFrequency );

	mSignalInterface.reset( new AnalyzerSettingInterfaceNumberList() );
	mSignalInterface->SetTitleAndTooltip( "Signal", "Type of signal" );
    mSignalInterface->AddNumber( NEC_SIG, "NEC (32 bits)", "");
    mSignalInterface->SetNumber( mSignal );

	AddInterface( mInputChannelInterface.get() );
	AddInterface( mFrenquencyInterface.get() );
	AddInterface( mSignalInterface.get() );

	AddExportOption( 0, "Export as text/csv file" );
	AddExportExtension( 0, "text", "txt" );
	AddExportExtension( 0, "csv", "csv" );

	ClearChannels();
	AddChannel( mInputChannel, "Infrared", false );
}
开发者ID:bkerler,项目名称:IRAnalyzer,代码行数:31,代码来源:IRAnalyzerSettings.cpp

示例12: m_id

IOLoop::IOLoop(UINT id, IChannelListener* listener, Channel** channel)
: m_id(id), m_shouldRun(false), m_threadHandle(NULL)
{
  Channel* ioChannel;
  ChannelQueue::CreateQueuePair(id + 1, listener, this, channel, &ioChannel);
  AddChannel(ioChannel);
}
开发者ID:guozanhua,项目名称:projectanarchy,代码行数:7,代码来源:VIOLoop.cpp

示例13: mInputChannel

PWMAnalyzerSettings::PWMAnalyzerSettings()
    :   mInputChannel(UNDEFINED_CHANNEL),
        mMinChange(3),
        mAnalysisType(ANALYSIS_WIDTH)
{
    mInputChannelInterface.reset(new AnalyzerSettingInterfaceChannel());
    mInputChannelInterface->SetTitleAndTooltip("PWM", "Simple Standard PWM Analyzer");
    mInputChannelInterface->SetChannel(mInputChannel);

    mAnalysisTypeInterface.reset(new AnalyzerSettingInterfaceNumberList());
    mAnalysisTypeInterface->SetTitleAndTooltip("Analysis Type",
            "What is important in analyzing this pwm stream?");
    mAnalysisTypeInterface->AddNumber(ANALYSIS_WIDTH, "Pulse Width", "The width of high pulses");
    mAnalysisTypeInterface->AddNumber(ANALYSIS_DUTY, "Duty Cycle", "The duty cycle between high and low");
    mAnalysisTypeInterface->SetNumber(mAnalysisType);

    mMinChangeInterface.reset(new AnalyzerSettingInterfaceInteger());
    mMinChangeInterface->SetTitleAndTooltip("Min Change(μS or %)",
                                            "The minimum amount of value change before recording a frame.");
    mMinChangeInterface->SetMax(10000);
    mMinChangeInterface->SetMin(0);
    mMinChangeInterface->SetInteger(mMinChange);

    AddInterface(mInputChannelInterface.get());
    AddInterface(mMinChangeInterface.get());
    AddInterface(mAnalysisTypeInterface.get());

    AddExportOption(0, "Export as csv file");
    AddExportExtension(0, "csv", "csv");

    ClearChannels();
    AddChannel(mInputChannel, "PWM", false);
}
开发者ID:tracernz,项目名称:logic-pwm,代码行数:33,代码来源:PWMAnalyzerSettings.cpp

示例14: iauth_loc_conf_read

static void
iauth_loc_conf_read(void)
{
    dict_t node;
    const char *str1;
    const char *str2;


    node = conf_get_data("modules/blacklist", RECDB_OBJECT);
    if (node == NULL)
        return;

    str1 = database_get_data(node, "debug_bot", RECDB_QSTRING);
    if (str1)
        conf.debug_bot = GetUserH(str1);

    str1 = database_get_data(node, "debug_channel", RECDB_QSTRING);
    if (conf.debug_bot && str1) {
        str2 = database_get_data(node, "debug_channel_modes", RECDB_QSTRING);
        if (!str2)
            str2 = "+tinms";
        conf.debug_channel = AddChannel(str1, now, str2, NULL);
        AddChannelUser(conf.debug_bot, conf.debug_channel)->modes |= MODE_CHANOP;
    } else {
        conf.debug_channel = NULL;
    }
}
开发者ID:staticfox,项目名称:srvx,代码行数:27,代码来源:mod-iauth_loc.c

示例15: ClearChannels

void ManchesterAnalyzerSettings::LoadSettings( const char* settings )
{
	SimpleArchive text_archive;
	text_archive.SetString( settings );

	const char* name_string;	//the first thing in the archive is the name of the protocol analyzer that the data belongs to.
	text_archive >> &name_string;
	if( strcmp( name_string, "SaleaeManchesterAnalyzer" ) != 0 )
		AnalyzerHelpers::Assert( "SaleaeManchesterAnalyzer: Provided with a settings string that doesn't belong to us;" );

	text_archive >> mInputChannel;
	text_archive >> *(U32*)&mMode;
	text_archive >> mBitRate;
	text_archive >> mInverted;
	text_archive >> mBitsPerTransfer;
	text_archive >> *(U32*)&mShiftOrder;
	text_archive >> mBitsToIgnore;

	ManchesterTolerance tolerance;
	if( text_archive >> *(U32*)&tolerance )
		mTolerance = tolerance;

	ClearChannels();
	AddChannel( mInputChannel, "Manchester", true );

	UpdateInterfacesFromSettings();
}
开发者ID:blargony,项目名称:RFFEAnalyzer,代码行数:27,代码来源:ManchesterAnalyzerSettings.cpp


注:本文中的AddChannel函数示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。