Skip to main content

DacControllerApiWrapper Class

NuGet: GHIElectronics.TinyCLR.Devices.Dac
Assembly: GHIElectronics.TinyCLR.Devices.Dac
Namespace: GHIElectronics.TinyCLR.Devices.Dac.Provider

Concrete IDacControllerProvider backed by the native TinyCLR DAC HAL. Constructed internally by DacController; you don't normally need to use this type directly.

public sealed class DacControllerApiWrapper : IDacControllerProvider

Constructors​

DacControllerApiWrapper(NativeApi api)​

public DacControllerApiWrapper(NativeApi api)

Wraps the given native API as a provider.

ParameterTypeDescription
apiNativeApiThe native DAC API to bind to.

Properties​

Api​

public NativeApi Api { get; }

The underlying native API descriptor.

ChannelCount​

public extern int ChannelCount { get; }

Total number of channels exposed by this controller. (inherited)

ResolutionInBits​

public extern int ResolutionInBits { get; }

Sample width in bits. (inherited)

MinValue​

public extern int MinValue { get; }

Smallest raw value accepted by Write(int, int). (inherited)

MaxValue​

public extern int MaxValue { get; }

Largest raw value accepted by Write(int, int). (inherited)

Methods​

Dispose()​

public void Dispose()

Releases the native controller.

OpenChannel(int channel)​

public extern void OpenChannel(int channel)

Acquires exclusive access to the specified channel. (inherited)

ParameterTypeDescription
channelintController-relative channel index.

CloseChannel(int channel)​

public extern void CloseChannel(int channel)

Releases a previously opened channel. (inherited)

ParameterTypeDescription
channelintController-relative channel index.

Write(int channel, int value)​

public extern void Write(int channel, int value)

Writes a raw code to the channel. (inherited)

ParameterTypeDescription
channelintController-relative channel index.
valueintOutput code.