Exemple #1
0
Sampler::Sampler( Sampler & input )
{
  setPortAddress( input.PortAddress() );
  setNumPoints( input.NumPoints() );
  setNumTriggerPoints( input.NumTriggerPoints() );
  setTriggerLevel( input.TriggerLevel() );
  setTimeOut( input.TimeOut() );
  setSampleMethod( input.SampleMethod() );
  setInterval( input.Interval() );
}
Exemple #2
0
Sampler & Sampler::operator = ( Sampler & input )
{
  if( this == &input )
  {
    setPortAddress( input.PortAddress() );
    setNumPoints( input.NumPoints() );
    setNumTriggerPoints( input.NumTriggerPoints() );
    setTriggerLevel( input.TriggerLevel() );
    setTimeOut( input.TimeOut() );
    setSampleMethod( input.SampleMethod() );
    setInterval( input.Interval() );
  }
  return *this;
}
	/// \brief Set the trigger source.
	/// \param special true for a special channel (EXT, ...) as trigger source.
	/// \param id The number of the channel, that should be used as trigger.
	/// \return 0 on success, -1 on invalid channel.
	int Control::setTriggerSource(bool special, unsigned int id) {
		if (!device->isConnected())
			return -2;
		
		if ((!special && id >= BUUDAI_CHANNELS) || (special && id >= BUUDAI_SPECIAL_CHANNELS))
			return -1;
		
		// Generate trigger source value that will be transmitted
		int sourceValue;
		sourceValue = TRIGGER_CH1 - id;
		
		triggerSpecial = special;
		triggerSource = id;
		
		setTriggerLevel(id, triggerLevel[id]);
		
		return 0;
	}