Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add missing documentation and description strings for all public classes #177

Merged
merged 4 commits into from
Jul 30, 2024
Merged
Show file tree
Hide file tree
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion OpenEphys.Onix/OpenEphys.Onix/Bno055Data.cs
Original file line number Diff line number Diff line change
Expand Up @@ -7,16 +7,18 @@
namespace OpenEphys.Onix
{
/// <summary>
/// A class that produces a sequence of 3D orientation measurements produced by a BNO055 9-axis inertial measurement unit.
/// A class that generates a sequence of 3D orientation measurements produced by BNO055 9-axis inertial measurement unit.
/// </summary>
/// <remarks>
/// This data stream class must be linked to an appropriate configuration, such as a <see cref="ConfigureBno055"/>,
/// in order to stream 3D orientation data.
/// </remarks>
[Description("Generates a sequence of 3D orientation measurements produced by a BNO055 9-axis inertial measurement unit.")]
public class Bno055Data : Source<Bno055DataFrame>
{
/// <inheritdoc cref = "SingleDeviceFactory.DeviceName"/>
[TypeConverter(typeof(Bno055.NameConverter))]
[Description(SingleDeviceFactory.DeviceNameDescription)]
public string DeviceName { get; set; }

/// <summary>
Expand Down
2 changes: 2 additions & 0 deletions OpenEphys.Onix/OpenEphys.Onix/BreakoutAnalogInput.cs
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,12 @@ namespace OpenEphys.Onix
/// <summary>
/// Produces a sequence of analog input frames from an ONIX breakout board.
/// </summary>
[Description("Produces a sequence of analog input frames from an ONIX breakout board.")]
public class BreakoutAnalogInput : Source<BreakoutAnalogInputDataFrame>
{
/// <inheritdoc cref = "SingleDeviceFactory.DeviceName"/>
[TypeConverter(typeof(BreakoutAnalogIO.NameConverter))]
[Description(SingleDeviceFactory.DeviceNameDescription)]
public string DeviceName { get; set; }

/// <summary>
Expand Down
3 changes: 3 additions & 0 deletions OpenEphys.Onix/OpenEphys.Onix/BreakoutAnalogOutput.cs
Original file line number Diff line number Diff line change
Expand Up @@ -10,12 +10,14 @@ namespace OpenEphys.Onix
/// <summary>
/// Sends analog output data to an ONIX breakout board.
/// </summary>
[Description("Sends analog output data to an ONIX breakout board.")]
public class BreakoutAnalogOutput : Sink<Mat>
{
const BreakoutAnalogIOVoltageRange OutputRange = BreakoutAnalogIOVoltageRange.TenVolts;

/// <inheritdoc cref = "SingleDeviceFactory.DeviceName"/>
[TypeConverter(typeof(BreakoutAnalogIO.NameConverter))]
[Description(SingleDeviceFactory.DeviceNameDescription)]
public string DeviceName { get; set; }

/// <summary>
Expand All @@ -27,6 +29,7 @@ public class BreakoutAnalogOutput : Sink<Mat>
/// When <see cref="BreakoutAnalogIODataType.Volts"/> is selected, 32-bit floating point voltages between -10 and 10 volts are sent
/// directly to the DACs.
/// </remarks>
[Description("The data type used to represent analog samples.")]
public BreakoutAnalogIODataType DataType { get; set; } = BreakoutAnalogIODataType.S16;

/// <summary>
Expand Down
4 changes: 3 additions & 1 deletion OpenEphys.Onix/OpenEphys.Onix/BreakoutDigitalInput.cs
Original file line number Diff line number Diff line change
Expand Up @@ -7,16 +7,18 @@
namespace OpenEphys.Onix
{
/// <summary>
/// A class that produces a sequence of digital input data frames.
/// A class that produces a sequence of digital input frames from an ONIX breakout board.
/// </summary>
/// <remarks>
/// This data stream class must be linked to an appropriate configuration, such as a <see cref="ConfigureBreakoutDigitalIO"/>,
/// in order to stream data.
/// </remarks>
[Description("Produces a sequence of digital input frames from an ONIX breakout board.")]
public class BreakoutDigitalInput : Source<BreakoutDigitalInputDataFrame>
{
/// <inheritdoc cref = "SingleDeviceFactory.DeviceName"/>
[TypeConverter(typeof(BreakoutDigitalIO.NameConverter))]
[Description(SingleDeviceFactory.DeviceNameDescription)]
public string DeviceName { get; set; }

/// <summary>
Expand Down
2 changes: 2 additions & 0 deletions OpenEphys.Onix/OpenEphys.Onix/BreakoutDigitalOutput.cs
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,12 @@ namespace OpenEphys.Onix
/// <summary>
/// Sends digital output data to an ONIX breakout board.
/// </summary>
[Description("Sends digital output data to an ONIX breakout board.")]
public class BreakoutDigitalOutput : Sink<BreakoutDigitalPortState>
{
/// <inheritdoc cref = "SingleDeviceFactory.DeviceName"/>
[TypeConverter(typeof(BreakoutDigitalIO.NameConverter))]
[Description(SingleDeviceFactory.DeviceNameDescription)]
public string DeviceName { get; set; }

/// <summary>
Expand Down
5 changes: 3 additions & 2 deletions OpenEphys.Onix/OpenEphys.Onix/ConfigureBno055.cs
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ namespace OpenEphys.Onix
/// <remarks>
/// This configuration class can be linked to a <see cref="Bno055Data"/> instance to stream orientation data from the IMU.
/// </remarks>
[Description("Configures a Bosch BNO055 9-axis IMU device.")]
public class ConfigureBno055 : SingleDeviceFactory
{
/// <summary>
Expand All @@ -20,7 +21,7 @@ public ConfigureBno055()
}

/// <summary>
/// Get or set the device enable state.
/// Gets or sets the device enable state.
/// </summary>
/// <remarks>
/// If set to true, a <see cref="Bno055Data"/> instance that is linked to this configuration will produce data. If set to false,
Expand All @@ -31,7 +32,7 @@ public ConfigureBno055()
public bool Enable { get; set; } = true;

/// <summary>
/// Configure a BNO055 device.
/// Configures a Bosch BNO055 9-axis IMU device.
/// </summary>
/// <remarks>
/// This will schedule configuration actions to be applied by a <see cref="StartAcquisition"/> instance
Expand Down
60 changes: 31 additions & 29 deletions OpenEphys.Onix/OpenEphys.Onix/ConfigureBreakoutAnalogIO.cs
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ namespace OpenEphys.Onix
/// A class for configuring the ONIX breakout board's analog inputs and outputs.
/// </summary>
[TypeConverter(typeof(SortedPropertyConverter))]
[Description("Configures the analog input and output device in the ONIX breakout board.")]
public class ConfigureBreakoutAnalogIO : SingleDeviceFactory
{
/// <summary>
Expand All @@ -20,7 +21,7 @@ public ConfigureBreakoutAnalogIO()
}

/// <summary>
/// Get or set the device enable state.
/// Gets or sets the device enable state.
/// </summary>
/// <remarks>
/// If set to true, <see cref="BreakoutAnalogInput"/> will produce data. If set to false, <see cref="BreakoutAnalogInput"/> will not produce data.
Expand All @@ -30,185 +31,186 @@ public ConfigureBreakoutAnalogIO()
public bool Enable { get; set; } = true;

/// <summary>
/// Get or set the input voltage range of channel 0.
/// Gets or sets the input voltage range of channel 0.
/// </summary>
[Category(ConfigurationCategory)]
[Description("The input voltage range of channel 0.")]
public BreakoutAnalogIOVoltageRange InputRange0 { get; set; }

/// <summary>
/// Get or set the input voltage range of channel 1.
/// Gets or sets the input voltage range of channel 1.
/// </summary>
[Category(ConfigurationCategory)]
[Description("The input voltage range of channel 1.")]
public BreakoutAnalogIOVoltageRange InputRange1 { get; set; }

/// <summary>
/// Get or set the input voltage range of channel 2.
/// Gets or sets the input voltage range of channel 2.
/// </summary>
[Category(ConfigurationCategory)]
[Description("The input voltage range of channel 2.")]
public BreakoutAnalogIOVoltageRange InputRange2 { get; set; }

/// <summary>
/// Get or set the input voltage range of channel 3.
/// Gets or sets the input voltage range of channel 3.
/// </summary>
[Category(ConfigurationCategory)]
[Description("The input voltage range of channel 3.")]
public BreakoutAnalogIOVoltageRange InputRange3 { get; set; }

/// <summary>
/// Get or set the input voltage range of channel 4.
/// Gets or sets the input voltage range of channel 4.
/// </summary>
[Category(ConfigurationCategory)]
[Description("The input voltage range of channel 4.")]
public BreakoutAnalogIOVoltageRange InputRange4 { get; set; }

/// <summary>
/// Get or set the input voltage range of channel 5.
/// Gets or sets the input voltage range of channel 5.
/// </summary>
[Category(ConfigurationCategory)]
[Description("The input voltage range of channel 5.")]
public BreakoutAnalogIOVoltageRange InputRange5 { get; set; }

/// <summary>
/// Get or set the input voltage range of channel 6.
/// Gets or sets the input voltage range of channel 6.
/// </summary>
[Category(ConfigurationCategory)]
[Description("The input voltage range of channel 6.")]
public BreakoutAnalogIOVoltageRange InputRange6 { get; set; }

/// <summary>
/// Get or set the input voltage range of channel 7.
/// Gets or sets the input voltage range of channel 7.
/// </summary>
[Category(ConfigurationCategory)]
[Description("The input voltage range of channel 7.")]
public BreakoutAnalogIOVoltageRange InputRange7 { get; set; }

/// <summary>
/// Get or set the input voltage range of channel 8.
/// Gets or sets the input voltage range of channel 8.
/// </summary>
[Category(ConfigurationCategory)]
[Description("The input voltage range of channel 8.")]
public BreakoutAnalogIOVoltageRange InputRange8 { get; set; }

/// <summary>
/// Get or set the input voltage range of channel 9.
/// Gets or sets the input voltage range of channel 9.
/// </summary>
[Category(ConfigurationCategory)]
[Description("The input voltage range of channel 9.")]
public BreakoutAnalogIOVoltageRange InputRange9 { get; set; }

/// <summary>
/// Get or set the input voltage range of channel 10.
/// Gets or sets the input voltage range of channel 10.
/// </summary>
[Category(ConfigurationCategory)]
[Description("The input voltage range of channel 10.")]
public BreakoutAnalogIOVoltageRange InputRange10 { get; set; }

/// <summary>
/// Get or set the input voltage range of channel 11.
/// Gets or sets the input voltage range of channel 11.
/// </summary>
[Category(ConfigurationCategory)]
[Description("The input voltage range of channel 11.")]
public BreakoutAnalogIOVoltageRange InputRange11 { get; set; }

/// <summary>
/// Get or set the direction of channel 0.
/// Gets or sets the direction of channel 0.
/// </summary>
[Category(AcquisitionCategory)]
[Description("The direction of channel 0.")]
public BreakoutAnalogIODirection Direction0 { get; set; }

/// <summary>
/// Get or set the direction of channel 1.
/// Gets or sets the direction of channel 1.
/// </summary>
[Category(AcquisitionCategory)]
[Description("The direction of channel 1.")]
public BreakoutAnalogIODirection Direction1 { get; set; }

/// <summary>
/// Get or set the direction of channel 2.
/// Gets or sets the direction of channel 2.
/// </summary>
[Category(AcquisitionCategory)]
[Description("The direction of channel 2.")]
public BreakoutAnalogIODirection Direction2 { get; set; }

/// <summary>
/// Get or set the direction of channel 3.
/// Gets or sets the direction of channel 3.
/// </summary>
[Category(AcquisitionCategory)]
[Description("The direction of channel 3.")]
public BreakoutAnalogIODirection Direction3 { get; set; }

/// <summary>
/// Get or set the direction of channel 4.
/// Gets or sets the direction of channel 4.
/// </summary>
[Category(AcquisitionCategory)]
[Description("The direction of channel 4.")]
public BreakoutAnalogIODirection Direction4 { get; set; }

/// <summary>
/// Get or set the direction of channel 5.
/// Gets or sets the direction of channel 5.
/// </summary>
[Category(AcquisitionCategory)]
[Description("The direction of channel 5.")]
public BreakoutAnalogIODirection Direction5 { get; set; }

/// <summary>
/// Get or set the direction of channel 6.
/// Gets or sets the direction of channel 6.
/// </summary>
[Category(AcquisitionCategory)]
[Description("The direction of channel 6.")]
public BreakoutAnalogIODirection Direction6 { get; set; }

/// <summary>
/// Get or set the direction of channel 7.
/// Gets or sets the direction of channel 7.
/// </summary>
[Category(AcquisitionCategory)]
[Description("The direction of channel 7.")]
public BreakoutAnalogIODirection Direction7 { get; set; }

/// <summary>
/// Get or set the direction of channel 8.
/// Gets or sets the direction of channel 8.
/// </summary>
[Category(AcquisitionCategory)]
[Description("The direction of channel 8.")]
public BreakoutAnalogIODirection Direction8 { get; set; }

/// <summary>
/// Get or set the direction of channel 9.
/// Gets or sets the direction of channel 9.
/// </summary>
[Category(AcquisitionCategory)]
[Description("The direction of channel 9.")]
public BreakoutAnalogIODirection Direction9 { get; set; }

/// <summary>
/// Get or set the direction of channel 10.
/// Gets or sets the direction of channel 10.
/// </summary>
[Category(AcquisitionCategory)]
[Description("The direction of channel 10.")]
public BreakoutAnalogIODirection Direction10 { get; set; }

/// <summary>
/// Get or set the direction of channel 11.
/// Gets or sets the direction of channel 11.
/// </summary>
[Category(AcquisitionCategory)]
[Description("The direction of channel 11.")]
public BreakoutAnalogIODirection Direction11 { get; set; }

/// <summary>
/// Configure analog inputs and outputs within an ONI context.
/// Configures the analog input and output device in the ONIX breakout board.
/// </summary>
/// <remarks>
/// This will schedule analog IO hardware configuration actions that can be applied by a <see cref="StartAcquisition"/> object prior to data collection.
/// This will schedule analog IO hardware configuration actions that can be applied by a
/// <see cref="StartAcquisition"/> object prior to data collection.
/// </remarks>
/// <param name="source">
/// The sequence of <see cref="ContextTask"/> objects on which to apply the analog IO configuration.
/// </param>
/// <returns>
/// A sequence of <see cref="ContextTask"/> objects that is identical to <paramref name="source"/> in which each <see cref="ContextTask"/> has been instructed
/// to apply the analog IO configuration.
/// A sequence of <see cref="ContextTask"/> objects that is identical to <paramref name="source"/>
/// in which each <see cref="ContextTask"/> has been instructed to apply the analog IO configuration.
/// </returns>
public override IObservable<ContextTask> Process(IObservable<ContextTask> source)
{
Expand Down
5 changes: 5 additions & 0 deletions OpenEphys.Onix/OpenEphys.Onix/ConfigureBreakoutBoard.cs
Original file line number Diff line number Diff line change
Expand Up @@ -6,30 +6,35 @@ namespace OpenEphys.Onix
/// <summary>
/// A class that configures an ONIX breakout board.
/// </summary>
[Description("Configures an ONIX breakout board.")]
public class ConfigureBreakoutBoard : HubDeviceFactory
{
/// <summary>
/// Gets or sets the heartbeat configuration.
/// </summary>
[TypeConverter(typeof(HubDeviceConverter))]
[Description("Specifies the configuration for the heartbeat device in the ONIX breakout board.")]
public ConfigureHeartbeat Heartbeat { get; set; } = new();

/// <summary>
/// Gets or sets the breakout board's analog IO configuration.
/// </summary>
[TypeConverter(typeof(HubDeviceConverter))]
[Description("Specifies the configuration for the analog IO device in the ONIX breakout board.")]
public ConfigureBreakoutAnalogIO AnalogIO { get; set; } = new();

/// <summary>
/// Gets or sets the breakout board's digital IO configuration.
/// </summary>
[TypeConverter(typeof(HubDeviceConverter))]
[Description("Specifies the configuration for the digital IO device in the ONIX breakout board.")]
public ConfigureBreakoutDigitalIO DigitalIO { get; set; } = new();

/// <summary>
/// Gets or sets the hardware memory monitor configuration.
/// </summary>
[TypeConverter(typeof(HubDeviceConverter))]
[Description("Specifies the configuration for the memory monitor device in the ONIX breakout board.")]
public ConfigureMemoryMonitor MemoryMonitor { get; set; } = new();

internal override IEnumerable<IDeviceConfiguration> GetDevices()
Expand Down
Loading