• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

C++ AddChannel函数代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

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



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


示例16: mSDAChannel

AtmelSWIAnalyzerSettings::AtmelSWIAnalyzerSettings()
:	mSDAChannel(UNDEFINED_CHANNEL)
{
	// init the interface
	mSDAChannelInterface.SetTitleAndTooltip(CHANNEL_NAME, "Single Wire Interface SDA");
	mSDAChannelInterface.SetChannel(mSDAChannel);

	mDecodeLevelInterface.SetTitleAndTooltip("Decode level", "Level of the communication to decode");
	mDecodeLevelInterface.AddNumber(DL_Tokens, "Tokens", "Decode only the level of tokens");
	mDecodeLevelInterface.AddNumber(DL_Bytes, "Bytes", "Group the tokens into bytes");
	mDecodeLevelInterface.AddNumber(DL_Packets, "Packets", "Decode the packet contents");
	
	// set default
	mDecodeLevelInterface.SetNumber(DL_Packets);

	// add the interface
	AddInterface(&mSDAChannelInterface);
	AddInterface(&mDecodeLevelInterface);

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

	ClearChannels();

	AddChannel(mSDAChannel,	CHANNEL_NAME, false);
}
开发者ID:blargony,项目名称:RFFEAnalyzer,代码行数:27,代码来源:AtmelSWIAnalyzerSettings.cpp


示例17: track_conf_read

static void
track_conf_read(void) {
    dict_t node;
    char *str, *modes;

    node = conf_get_data("modules/track", RECDB_OBJECT);
    if (!node)
        return;
    str = database_get_data(node, "snomask", RECDB_QSTRING);
    if (!str)
	    track_cfg.snomask = TRACK_NICK|TRACK_KICK|TRACK_JOIN|TRACK_PART|TRACK_CHANMODE|TRACK_NEW|TRACK_DEL|TRACK_AUTH;
    else
	    parse_track_conf(str);
    str = database_get_data(node, "channel", RECDB_QSTRING);
    modes = database_get_data(node, "channel_modes", RECDB_QSTRING);
    if (!str)
        return;
    // XXX - dont do addchannel if the channel is being shared with
    // another module:
    track_cfg.channel = AddChannel(str, now, (modes ? modes : "+sntOm"), NULL, NULL);
    if (!track_cfg.channel)
        return;
    str = database_get_data(node, "show_bursts", RECDB_QSTRING);
    track_cfg.show_bursts = str ? enabled_string(str) : 0;
    track_cfg.enabled = 1;
    if (finalized)
        track_finalize();
}
开发者ID:Cloudxtreme,项目名称:x3,代码行数:28,代码来源:mod-track.c


示例18: sizeof

bool CChoreoActor::RestoreFromBuffer( CUtlBuffer& buf, CChoreoScene *pScene )
{
	char sz[ 256 ];
	buf.GetString( sz, sizeof( sz ) );

	SetName( sz );

	int i;
	int c = buf.GetShort();
	for ( i = 0; i < c; i++ )
	{
		CChoreoChannel *channel = pScene->AllocChannel();
		Assert( channel );
		if ( channel->RestoreFromBuffer( buf, pScene, this ) )
		{
			AddChannel( channel );
			channel->SetActor( this );
			continue;
		}

		return false;
	}

	SetActive( buf.GetChar() == 1 ? true : false );

	return true;
}
开发者ID:chrizonix,项目名称:RCBot2,代码行数:27,代码来源:choreoactor.cpp


示例19: ClearChannels

void SerialAnalyzerSettings::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, "SaleaeAsyncSerialAnalyzer" ) != 0 )
		AnalyzerHelpers::Assert( "SaleaeAsyncSerialAnalyzer: Provided with a settings string that doesn't belong to us;" );

	text_archive >> mInputChannel;
	text_archive >> mBitRate;
	text_archive >> mBitsPerTransfer;
	text_archive >> mStopBits;
	text_archive >> *(U32*)&mParity;
	text_archive >> *(U32*)&mShiftOrder;
	text_archive >> mInverted;

	//check to make sure loading it actual works befor assigning the result -- do this when adding settings to an anylzer which has been previously released.
	bool use_autobaud;
	if( text_archive >> use_autobaud )
		mUseAutobaud = use_autobaud;

	SerialAnalyzerEnums::Mode mode;
	if( text_archive >> *(U32*)&mode )
		mSerialMode = mode;

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

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


示例20: AddChannel

void CImageChannelAdd::Init(EChannel eChannel, EPrimitiveTypes eType, int iGroup)
{
	maiChannels.Init(1);
	meType = eType;
	miGroup = iGroup;
	AddChannel(eChannel);
}
开发者ID:chrisjaquet,项目名称:Codaphela.Library,代码行数:7,代码来源:ImageChannelAdd.cpp



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


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
C++ AddChild函数代码示例发布时间:2022-05-30
下一篇:
C++ AddCapturePoint函数代码示例发布时间:2022-05-30
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap