本文整理汇总了C#中InputData.DataWithExternalDeviceConfiguration方法的典型用法代码示例。如果您正苦于以下问题:C# InputData.DataWithExternalDeviceConfiguration方法的具体用法?C# InputData.DataWithExternalDeviceConfiguration怎么用?C# InputData.DataWithExternalDeviceConfiguration使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类InputData
的用法示例。
在下文中一共展示了InputData.DataWithExternalDeviceConfiguration方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: PushInputData
// needs a shot at processing the InputData on its way back from the board
public override void PushInputData(IDAQInputStream stream, IInputData inData)
{
IInputData convertedData = new InputData(inData,
inData.DataWithUnits(MeasurementConversionTarget).Data); //TODO
this.Controller.PushInputData(this, convertedData.DataWithExternalDeviceConfiguration(Configuration));
}
示例2: InputData_SetsExternalDeviceConfig
public void InputData_SetsExternalDeviceConfig()
{
var config = new Dictionary<string, object>();
config["key"] = "value";
IInputData data = new InputData(Data, UNUSED_SRATE, DateTimeOffset.Now);
data = data.DataWithExternalDeviceConfiguration(devFake, config);
Assert.That(data.NodeConfigurationWithName(devFake.Name).Configuration, Is.EqualTo(config));
}
示例3: TestInputDataHasNodeConfiguration
public void TestInputDataHasNodeConfiguration()
{
IInputData inData = new InputData(Data, UNUSED_SRATE, DateTimeOffset.Now);
Assert.False(inData.HasNodeConfiguration(IOData.EXTERNAL_DEVICE_CONFIGURATION_NAME));
inData = inData.DataWithExternalDeviceConfiguration(devFake, new Dictionary<string, object>());
Assert.True(inData.HasNodeConfiguration(devFake.Name));
}
示例4: InputData_DataWithExternalDeviceConfigFailsWithNonNullExistingConfig
public void InputData_DataWithExternalDeviceConfigFailsWithNonNullExistingConfig()
{
IInputData data = new InputData(this.Data, UNUSED_SRATE, DateTimeOffset.Now)
.DataWithExternalDeviceConfiguration(devFake, new Dictionary<string, object>());
Assert.Throws<ExistingConfigurationException>(
() => data.DataWithExternalDeviceConfiguration(devFake, new Dictionary<string, object>()));
}