示例#1
0
// Connected to be called when the values of the input data source change
void AMDeadTimeAB::onInputSourceValuesChanged(const AMnDIndex& start, const AMnDIndex& end)
{
	if (start.isValid() && end.isValid())
		emitValuesChanged(start, end);

	else
		emitValuesChanged();
}
示例#2
0
AMNumber AMMockDetector::reading(const AMnDIndex &indexes) const
{
	// We want an "invalid" AMnDIndex for this 0D detector
	if (indexes.isValid()) {
		return AMNumber(AMNumber::DimensionError);
	}

	return generateRandomNumber();
}
AMNumber AMScalerTimeControlDetector::reading(const AMnDIndex &indexes) const
{
	if(!isConnected())
		return AMNumber(AMNumber::Null);
	// We want an "invalid" AMnDIndex for this 0D detector
	if(indexes.isValid())
		return AMNumber(AMNumber::DimensionError);

	return control_->value()/1000;
}