コード例 #1
0
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();
}
コード例 #2
0
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();
}
コード例 #3
0
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();
}
コード例 #4
0
void HdmiCecAnalyzerSettings::LoadSettings( const char* settings )
{
    SimpleArchive text_archive;
    text_archive.SetString( settings );

    text_archive >> mCecChannel;

    ClearChannels();
    AddChannel( mCecChannel, HdmiCec::GetProtocolName(), true );

    UpdateInterfacesFromSettings();
}
コード例 #5
0
void ISO14443AnalyzerSettings::LoadSettings( const char* settings )
{
	SimpleArchive text_archive;
	text_archive.SetString( settings );

	text_archive >> mInputChannel;
	text_archive >> mBitRate;

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

	UpdateInterfacesFromSettings();
}
コード例 #6
0
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();
}
コード例 #7
0
void PWMAnalyzerSettings::LoadSettings(const char *settings)
{
    SimpleArchive text_archive;
    text_archive.SetString(settings);

    text_archive >> mInputChannel;
    text_archive >> mMinChange;
    text_archive >> mAnalysisType;

    ClearChannels();
    AddChannel(mInputChannel, "Simple PWM Analyzer", true);

    UpdateInterfacesFromSettings();
}
コード例 #8
0
void SWDAnalyzerSettings::LoadSettings( const char* settings )
{
	SimpleArchive text_archive;
	text_archive.SetString( settings );

	text_archive >> mSWDIOChannel;
	text_archive >> mSWCLKChannel;

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

	UpdateInterfacesFromSettings();
}
void Xlink2WAnalyzerSettings::LoadSettings( const char* settings )
{
    SimpleArchive text_archive;
    text_archive.SetString( settings );

    text_archive >> chanW0;
    text_archive >> chanW1;

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

    UpdateInterfacesFromSettings();
}
コード例 #10
0
void PS2KeyboardAnalyzerSettings::LoadSettings( const char* settings )
{
	SimpleArchive text_archive;
	text_archive.SetString( settings );

	text_archive >> mClockChannel;
	text_archive >> mDataChannel;
	text_archive >> mDeviceType;

	ClearChannels();
	AddChannel( mClockChannel, "PS/2 - Clock", true );
	AddChannel( mDataChannel, "PS/2 - Data", true );

	UpdateInterfacesFromSettings();
}
void QuadratureAnalyserAnalyzerSettings::LoadSettings( const char* settings )
{
	SimpleArchive text_archive;
	text_archive.SetString( settings );

	text_archive >> mInputChannelA;
	text_archive >> mInputChannelB;
	text_archive >> ticksPerRotation;
	text_archive >> ticksPerFrame;

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

	UpdateInterfacesFromSettings();
}
コード例 #12
0
void AtmelSWIAnalyzerSettings::LoadSettings(const char* settings)
{
	SimpleArchive text_archive;
	text_archive.SetString( settings );

	text_archive >> mSDAChannel;
	int temp_dl;
	text_archive >> temp_dl;
	mDecodeLevel = static_cast<DecodeLevel>(temp_dl);

	ClearChannels();

	AddChannel(mSDAChannel, CHANNEL_NAME,	true);

	UpdateInterfacesFromSettings();
}
コード例 #13
0
void LD110AnalyzerSettings::LoadSettings( const char* settings )
  {
	m_oArchive.SetString( settings );

  for(int nIndex = 0; nIndex < m_nBCDAndDigitChannelCount; nIndex++)
    {
    m_oArchive >> m_oBCDChannelVector[nIndex];
    m_oArchive >> m_oDigitChannelVector[nIndex];
    }

  m_oArchive >> m_oGlobalClockChannel;

	ClearChannels();
  AddChannels();

  UpdateInterfacesFromSettings();
  }
コード例 #14
0
void IRAnalyzerSettings::LoadSettings( const char* settings )
{
	SimpleArchive text_archive;
	text_archive.SetString( settings );

	const char* name_string;
	text_archive >> &name_string;
	if( strcmp( name_string, "IRAnalyzer" ) != 0 )
			AnalyzerHelpers::Assert( "IRAnalyzer: Provided with a settings string that doesn't belong to us;" );


	text_archive >> mInputChannel;
	text_archive >> mFrequency;
	text_archive >> *(U32*)&mSignal;

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

	UpdateInterfacesFromSettings();
}
コード例 #15
0
void SDMMCAnalyzerSettings::LoadSettings(const char *settings)
{
    SimpleArchive archive;
    U32 tmp;

    archive.SetString(settings);

    archive >> mClockChannel;
    archive >> mCommandChannel;
    archive >> tmp;
    mProtocol = SDMMCProtocol(tmp);
    archive >> tmp;
    mSampleEdge = SDMMCSampleEdge(tmp);

    ClearChannels();
    AddChannel(mClockChannel, "Clock", true);
    AddChannel(mCommandChannel, "Command", true);

    UpdateInterfacesFromSettings();
}
コード例 #16
0
void USBAnalyzerSettings::LoadSettings(const char* settings)
{
	SimpleArchive text_archive;
	text_archive.SetString(settings);

	text_archive >> mDPChannel;
	text_archive >> mDMChannel;
	int s;
	text_archive >> s;
	mSpeed = USBSpeed(s);

	text_archive >> s;
	mDecodeLevel = USBDecodeLevel(s);

	ClearChannels();

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

	UpdateInterfacesFromSettings();
}
コード例 #17
0
void SDIOAnalyzerSettings::LoadSettings( const char* settings )
{
	SimpleArchive text_archive;
	text_archive.SetString( settings );

	text_archive >> mClockChannel;
	text_archive >> mCmdChannel;
	text_archive >> mDAT0Channel;
	text_archive >> mDAT1Channel;
	text_archive >> mDAT2Channel;
	text_archive >> mDAT3Channel;

	ClearChannels();

	AddChannel( mClockChannel, "Clock", true );
	AddChannel( mCmdChannel, "Cmd", true );
	AddChannel( mDAT0Channel, "DAT0", true );
	AddChannel( mDAT1Channel, "DAT1", mDAT1Channel != UNDEFINED_CHANNEL);
	AddChannel( mDAT2Channel, "DAT2", mDAT2Channel != UNDEFINED_CHANNEL);
	AddChannel( mDAT3Channel, "DAT3", mDAT3Channel != UNDEFINED_CHANNEL);

	UpdateInterfacesFromSettings();
}