AntRadioInterface Class Library Overview

The AntRadioInterface class library defines interfaces and classes that implementations support and clients utilize. Implementations will derive and implement the interfaces appropriate to the underlying hardware that supports the ANT radio protocol. Clients will interact with an implementation of the AntRadioInterface to communicate with ANT devices.

Implementations at a minimum implement the IAntRadio and IAntChannel interfaces and derive concrete classes from AntResponse and DeviceCapabilities. Implementations may optionally support IAntConfiguration, IAntControl, IAntUsbRadio, ICrypto, and IFitSettings interfaces.

  Tip

Implementations are free to implement the interfaces the underlying hardware supports. Even specific methods of required interfaces can and should throw NotImplementedException() if hardware doesn't support a particular method. This informs the application developer that the client and implementation are not aligned regarding expected functionality.

Interfaces and Classes

These interfaces/classes largely mirror the Garmin/Dynastream ANT Message Protocol and Usage specification.

AntResponse and DeviceCapabilities

Mandatory. Implementations will derive from these classes and provide constructors that take the underlying hardware data as an argument to populate the properties exposed by these classes.

IAntRadio

Mandatory. Methods that must be implemented are InitializeContinuousScanMode(), GetChannel(), GetDeviceCapabilities(), RequestMessageAndResponse() and the properties NumChannels, ProductDescription, SerialNumber and Version.

IAntChannel

Mandatory. SendExtAcknowledgedData/SendExtAcknowledgedDataAsync methods must be implemented; they are integral to working with ANT devices. The only property is ChannelNumber which should be assigned a value relevent to the implementation.

  Tip

Implementors: Consider using locks for methods that transmit data to ANT devices. The intent is to prevent overwriting the channel ID and data until the transmission succeeds or times out.

IAntConfiguration

Optional. Implementors will provide methods to configure the ANT radio.

IAntControl

Optional. Implementors will provide methods to control general operation of the ANT radio.

IAntUsbRadio

Optional. Implementors will provide methods and properties specific to ANT radios connected to USB ports.

ICrypto

Optional. Implementors will provide methods to configure cryptographic functions used by the ANT radio.

IFitSettings

Optional. Implementors will provide methods to manage the ANT radio fitness equipment state.

See Also