Skip to content

Commit 6b61f1d

Browse files
committed
Add unique documentation to Generate() overrides
1 parent d439fe8 commit 6b61f1d

File tree

3 files changed

+44
-13
lines changed

3 files changed

+44
-13
lines changed

OpenEphys.Onix1/BreakoutAnalogOutput.cs

Lines changed: 18 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -39,8 +39,14 @@ public class BreakoutAnalogOutput : Sink<Mat>
3939
public BreakoutAnalogIODataType DataType { get; set; } = BreakoutAnalogIODataType.S16;
4040

4141
/// <summary>
42-
/// Send samples to analog outputs.
42+
/// Send a matrix of samples to analog outputs
4343
/// </summary>
44+
/// <remarks>
45+
/// If a matrix contains multiple samples, they will be written to hardware as quickly as communication allows.
46+
/// The data within each input matrix must have <see cref="Depth.S16"/> when <see
47+
/// cref="DataType"/> is set to <see cref="BreakoutAnalogIODataType.S16"/> or <see cref="Depth.F32"/>
48+
/// when <see cref="DataType"/> is set to <see cref="BreakoutAnalogIODataType.Volts"/>.
49+
/// </remarks>
4450
/// <param name="source"> A sequence of 12xN sample matrices containing the analog data to write to channels 0 to 11.</param>
4551
/// <returns> A sequence of 12xN sample matrices containing the analog data that were written to channels 0 to 11.</returns>
4652
public override unsafe IObservable<Mat> Process(IObservable<Mat> source)
@@ -103,8 +109,13 @@ public override unsafe IObservable<Mat> Process(IObservable<Mat> source)
103109
}
104110

105111
/// <summary>
106-
/// Send samples to analog outputs.
112+
/// Send an 12-element array of values to update all analog outputs.
107113
/// </summary>
114+
/// <remarks>
115+
/// This overload should be used when <see cref="DataType"/> is set to <see
116+
/// cref="BreakoutAnalogIODataType.S16"/> and values should be within -32,768 to 32,767, which
117+
/// correspond to -10.0 to 10.0 volts.
118+
/// </remarks>
108119
/// <param name="source"> A sequence of 12x1 element arrays each containing the analog data to write to channels 0 to 11.</param>
109120
/// <returns> A sequence of 12x1 element arrays each containing the analog data to write to channels 0 to 11.</returns>
110121
public IObservable<short[]> Process(IObservable<short[]> source)
@@ -130,8 +141,12 @@ public IObservable<short[]> Process(IObservable<short[]> source)
130141
}
131142

132143
/// <summary>
133-
/// Send samples to analog outputs.
144+
/// Send an 12-element array of values to update all analog outputs.
134145
/// </summary>
146+
/// <remarks>
147+
/// This overload should be used when <see cref="DataType"/> is set to <see
148+
/// cref="BreakoutAnalogIODataType.Volts"/> and values should be within -10.0 to 10.0 volts.
149+
/// </remarks>
135150
/// <param name="source"> A sequence of 12x1 element arrays each containing the analog data to write to channels 0 to 11.</param>
136151
/// <returns> A sequence of 12x1 element arrays each containing the analog data to write to channels 0 to 11.</returns>
137152
public IObservable<float[]> Process(IObservable<float[]> source)

OpenEphys.Onix1/NeuropixelsV1eBno055Data.cs

Lines changed: 13 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -23,13 +23,14 @@ public class NeuropixelsV1eBno055Data : Source<Bno055DataFrame>
2323
public string DeviceName { get; set; }
2424

2525
/// <summary>
26-
/// Generates a sequence of <see cref="Bno055DataFrame"/> objects at approximately 100 Hz.
26+
/// Generates a sequence of <see cref="Bno055DataFrame">Bno055DataFrames</see> at approximately 100
27+
/// Hz.
2728
/// </summary>
28-
/// <returns>A sequence of <see cref="Bno055DataFrame"/> objects.</returns>
2929
/// <remarks>
30-
/// This will generate a sequence of <see cref="Bno055DataFrame"/> objects at approximately 100 Hz. This rate
31-
/// may be limited by the I2C bus.
30+
/// This will generate a sequence of <see cref="Bno055DataFrame">Bno055DataFrames</see> at approximately 100 Hz.
31+
/// This rate may be limited by the hardware.
3232
/// </remarks>
33+
/// <returns>A sequence of <see cref="Bno055DataFrame">Bno055DataFrames</see>.</returns>
3334
public override IObservable<Bno055DataFrame> Generate()
3435
{
3536
// Max of 100 Hz, but limited by I2C bus
@@ -38,8 +39,15 @@ public override IObservable<Bno055DataFrame> Generate()
3839
}
3940

4041
/// <summary>
41-
/// Generates a sequence of <see cref="Bno055DataFrame"/> objects.
42+
/// Generates a sequence of <see cref="Bno055DataFrame">Bno055DataFrames</see> that is driven by an
43+
/// input sequence.
4244
/// </summary>
45+
/// <remarks>
46+
/// This will attempt to produce a sequence of <see cref="Bno055DataFrame">Bno055DataFrames</see> that is updated whenever
47+
/// an item in the <paramref name="source"/> sequence is received. This rate is be limited by the
48+
/// hardware and has a maximum meaningful rate of 100 Hz.
49+
/// </remarks>
50+
/// <param name="source">A sequence to drive sampling.</param>
4351
/// <returns>A sequence of <see cref="Bno055DataFrame"/> objects.</returns>
4452
public unsafe IObservable<Bno055DataFrame> Generate<TSource>(IObservable<TSource> source)
4553
{

OpenEphys.Onix1/NeuropixelsV2eBno055Data.cs

Lines changed: 13 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -23,13 +23,14 @@ public class NeuropixelsV2eBno055Data : Source<Bno055DataFrame>
2323
public string DeviceName { get; set; }
2424

2525
/// <summary>
26-
/// Generates a sequence of <see cref="Bno055DataFrame"/> objects at approximately 100 Hz.
26+
/// Generates a sequence of <see cref="Bno055DataFrame">Bno055DataFrames</see> at approximately 100
27+
/// Hz.
2728
/// </summary>
28-
/// <returns>A sequence of <see cref="Bno055DataFrame"/> objects.</returns>
2929
/// <remarks>
30-
/// This will generate a sequence of <see cref="Bno055DataFrame"/> objects at approximately 100 Hz. This rate
31-
/// may be limited by the I2C bus.
30+
/// This will generate a sequence of <see cref="Bno055DataFrame">Bno055DataFrames</see> at approximately 100 Hz.
31+
/// This rate may be limited by the hardware.
3232
/// </remarks>
33+
/// <returns>A sequence of <see cref="Bno055DataFrame">Bno055DataFrames</see>.</returns>
3334
public override IObservable<Bno055DataFrame> Generate()
3435
{
3536
// Max of 100 Hz, but limited by I2C bus
@@ -38,8 +39,15 @@ public override IObservable<Bno055DataFrame> Generate()
3839
}
3940

4041
/// <summary>
41-
/// Generates a sequence of <see cref="Bno055DataFrame"/> objects.
42+
/// Generates a sequence of <see cref="Bno055DataFrame">Bno055DataFrames</see> that is driven by an
43+
/// input sequence.
4244
/// </summary>
45+
/// <remarks>
46+
/// This will attempt to produce a sequence of <see cref="Bno055DataFrame">Bno055DataFrames</see> that is updated whenever
47+
/// an item in the <paramref name="source"/> sequence is received. This rate is be limited by the
48+
/// hardware and has a maximum meaningful rate of 100 Hz.
49+
/// </remarks>
50+
/// <param name="source">A sequence to drive sampling.</param>
4351
/// <returns>A sequence of <see cref="Bno055DataFrame"/> objects.</returns>
4452
public unsafe IObservable<Bno055DataFrame> Generate<TSource>(IObservable<TSource> source)
4553
{

0 commit comments

Comments
 (0)