Skip to content

Commit

Permalink
Address review comments
Browse files Browse the repository at this point in the history
- Remove self-referential cref to DataType in XML docs
  • Loading branch information
jonnew committed Sep 6, 2024
1 parent 6b61f1d commit b0bc622
Showing 2 changed files with 35 additions and 25 deletions.
45 changes: 26 additions & 19 deletions OpenEphys.Onix1/BreakoutAnalogOutput.cs
Original file line number Diff line number Diff line change
@@ -29,26 +29,29 @@ public class BreakoutAnalogOutput : Sink<Mat>
/// Gets or sets the data type used to represent analog samples.
/// </summary>
/// <remarks>
/// If <see cref="BreakoutAnalogIODataType.S16"/> is selected, each DAC value is represented by a signed, twos-complement encoded
/// 16-bit integer. In this case, the output voltage always corresponds to <see cref="BreakoutAnalogIOVoltageRange.TenVolts"/>.
/// When <see cref="BreakoutAnalogIODataType.Volts"/> is selected, 32-bit floating point voltages between -10 and 10 volts are sent
/// directly to the DACs.
/// If <see cref="BreakoutAnalogIODataType.S16"/> is selected, each DAC value is represented by a
/// signed, twos-complement encoded 16-bit integer. In this case, the output voltage always
/// corresponds to <see cref="BreakoutAnalogIOVoltageRange.TenVolts"/>. 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.")]
[Category(DeviceFactory.ConfigurationCategory)]
public BreakoutAnalogIODataType DataType { get; set; } = BreakoutAnalogIODataType.S16;

/// <summary>
/// Send a matrix of samples to analog outputs
/// Send an matrix of samples to all enabled analog outputs.
/// </summary>
/// <remarks>
/// If a matrix contains multiple samples, they will be written to hardware as quickly as communication allows.
/// The data within each input matrix must have <see cref="Depth.S16"/> when <see
/// cref="DataType"/> is set to <see cref="BreakoutAnalogIODataType.S16"/> or <see cref="Depth.F32"/>
/// when <see cref="DataType"/> is set to <see cref="BreakoutAnalogIODataType.Volts"/>.
/// If a matrix contains multiple samples, they will be written to hardware as quickly as
/// communication allows. The data within each input matrix must have <see cref="Depth.S16"/> when
/// <c>DataType</c> is set to <see cref="BreakoutAnalogIODataType.S16"/> or <see cref="Depth.F32"/>
/// when <c>DataType</c> is set to <see cref="BreakoutAnalogIODataType.Volts"/>.
/// </remarks>
/// <param name="source"> A sequence of 12xN sample matrices containing the analog data to write to channels 0 to 11.</param>
/// <returns> A sequence of 12xN sample matrices containing the analog data that were written to channels 0 to 11.</returns>
/// <param name="source"> A sequence of 12xN sample matrices containing the analog data to write to
/// channels 0 to 11.</param>
/// <returns> A sequence of 12xN sample matrices containing the analog data that were written to
/// channels 0 to 11.</returns>
public override unsafe IObservable<Mat> Process(IObservable<Mat> source)
{
var dataType = DataType;
@@ -109,15 +112,17 @@ public override unsafe IObservable<Mat> Process(IObservable<Mat> source)
}

/// <summary>
/// Send an 12-element array of values to update all analog outputs.
/// Send an 12-element array of values to update all enabled analog outputs.
/// </summary>
/// <remarks>
/// This overload should be used when <see cref="DataType"/> is set to <see
/// This overload should be used when <c>DataType</c> is set to <see
/// cref="BreakoutAnalogIODataType.S16"/> and values should be within -32,768 to 32,767, which
/// correspond to -10.0 to 10.0 volts.
/// </remarks>
/// <param name="source"> A sequence of 12x1 element arrays each containing the analog data to write to channels 0 to 11.</param>
/// <returns> A sequence of 12x1 element arrays each containing the analog data to write to channels 0 to 11.</returns>
/// <param name="source"> A sequence of 12x1 element arrays each containing the analog data to write
/// to channels 0 to 11.</param>
/// <returns> A sequence of 12x1 element arrays each containing the analog data to write to channels 0
/// to 11.</returns>
public IObservable<short[]> Process(IObservable<short[]> source)
{
if (DataType != BreakoutAnalogIODataType.S16)
@@ -141,14 +146,16 @@ public IObservable<short[]> Process(IObservable<short[]> source)
}

/// <summary>
/// Send an 12-element array of values to update all analog outputs.
/// Send an 12-element array of values to update all enabled analog outputs.
/// </summary>
/// <remarks>
/// This overload should be used when <see cref="DataType"/> is set to <see
/// This overload should be used when <c>DataType</c> is set to <see
/// cref="BreakoutAnalogIODataType.Volts"/> and values should be within -10.0 to 10.0 volts.
/// </remarks>
/// <param name="source"> A sequence of 12x1 element arrays each containing the analog data to write to channels 0 to 11.</param>
/// <returns> A sequence of 12x1 element arrays each containing the analog data to write to channels 0 to 11.</returns>
/// <param name="source"> A sequence of 12x1 element arrays each containing the analog data to write
/// to channels 0 to 11.</param>
/// <returns> A sequence of 12x1 element arrays each containing the analog data to write to channels 0
/// to 11.</returns>
public IObservable<float[]> Process(IObservable<float[]> source)
{
if (DataType != BreakoutAnalogIODataType.Volts)
15 changes: 9 additions & 6 deletions OpenEphys.Onix1/ConfigureBreakoutDigitalIO.cs
Original file line number Diff line number Diff line change
@@ -11,7 +11,7 @@ namespace OpenEphys.Onix1
/// cref="BreakoutDigitalInput"/> and <see cref="BreakoutDigitalOutput"/>, using a shared
/// <c>DeviceName</c>.
/// </remarks>
[Description("onfigures the ONIX breakout board's digital inputs and outputs.")]
[Description("Configures the ONIX breakout board's digital inputs and outputs.")]
public class ConfigureBreakoutDigitalIO : SingleDeviceFactory
{
/// <summary>
@@ -27,7 +27,8 @@ public ConfigureBreakoutDigitalIO()
/// Gets or sets the device enable state.
/// </summary>
/// <remarks>
/// If set to true, <see cref="BreakoutDigitalInput"/> will produce data. If set to false, <see cref="BreakoutDigitalInput"/> will not produce data.
/// If set to true, <see cref="BreakoutDigitalInput"/> will produce data. If set to false, <see
/// cref="BreakoutDigitalInput"/> will not produce data.
/// </remarks>
[Category(ConfigurationCategory)]
[Description("Specifies whether the digital IO device is enabled.")]
@@ -37,12 +38,14 @@ public ConfigureBreakoutDigitalIO()
/// Configures the digital input and output device in the ONIX breakout board.
/// </summary>
/// <remarks>
/// This will schedule digital IO hardware configuration actions that can be applied by a
/// <see cref="StartAcquisition"/> object prior to data collection.
/// This will schedule digital IO hardware configuration actions that can be applied by a <see
/// cref="StartAcquisition"/> object prior to data collection.
/// </remarks>
/// <param name="source">A sequence of <see cref="ContextTask"/> instances that hold configuration actions.</param>
/// <param name="source">A sequence of <see cref="ContextTask"/> instances that hold configuration
/// actions.</param>
/// <returns>
/// The original sequence modified by adding additional configuration actions required to configure a digital IO device.
/// The original sequence modified by adding additional configuration actions required to configure a
/// digital IO device.
/// </returns>
public override IObservable<ContextTask> Process(IObservable<ContextTask> source)
{

0 comments on commit b0bc622

Please sign in to comment.