Skip to content

Commit

Permalink
Assign remaining properties to categories
Browse files Browse the repository at this point in the history
- For aggregates, use `Devices` category for encapsulated devices
  • Loading branch information
bparks13 committed Aug 22, 2024
1 parent 28ea231 commit ec3a479
Show file tree
Hide file tree
Showing 7 changed files with 25 additions and 15 deletions.
8 changes: 4 additions & 4 deletions OpenEphys.Onix1/ConfigureBreakoutBoard.cs
Original file line number Diff line number Diff line change
Expand Up @@ -14,31 +14,31 @@ public class ConfigureBreakoutBoard : MultiDeviceFactory
/// </summary>
[TypeConverter(typeof(SingleDeviceFactoryConverter))]
[Description("Specifies the configuration for the heartbeat device in the ONIX breakout board.")]
[Category(ConfigurationCategory)]
[Category(DevicesCategory)]
public ConfigureHeartbeat Heartbeat { get; set; } = new();

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

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

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

internal override IEnumerable<IDeviceConfiguration> GetDevices()
Expand Down
12 changes: 7 additions & 5 deletions OpenEphys.Onix1/ConfigureHeadstage64.cs
Original file line number Diff line number Diff line change
Expand Up @@ -41,39 +41,39 @@ public ConfigureHeadstage64()
/// <summary>
/// Gets or sets the Rhd2164 configuration.
/// </summary>
[Category(ConfigurationCategory)]
[Category(DevicesCategory)]
[TypeConverter(typeof(SingleDeviceFactoryConverter))]
[Description("Specifies the configuration for the Rhd2164 device in the headstage-64.")]
public ConfigureRhd2164 Rhd2164 { get; set; } = new();

/// <summary>
/// Gets or sets the Bno055 9-axis inertial measurement unit configuration.
/// </summary>
[Category(ConfigurationCategory)]
[Category(DevicesCategory)]
[TypeConverter(typeof(SingleDeviceFactoryConverter))]
[Description("Specifies the configuration for the Bno055 device in the headstage-64.")]
public ConfigureBno055 Bno055 { get; set; } = new();

/// <summary>
/// Gets or sets the SteamVR V1 basestation 3D tracking array configuration.
/// </summary>
[Category(ConfigurationCategory)]
[Category(DevicesCategory)]
[TypeConverter(typeof(SingleDeviceFactoryConverter))]
[Description("Specifies the configuration for the TS4231 device in the headstage-64.")]
public ConfigureTS4231V1 TS4231 { get; set; } = new() { Enable = false };

/// <summary>
/// Gets or sets onboard electrical stimulator configuration.
/// </summary>
[Category(ConfigurationCategory)]
[Category(DevicesCategory)]
[TypeConverter(typeof(SingleDeviceFactoryConverter))]
[Description("Specifies the configuration for the ElectricalStimulator device in the headstage-64.")]
public ConfigureHeadstage64ElectricalStimulator ElectricalStimulator { get; set; } = new();

/// <summary>
/// Gets or sets onboard optical stimulator configuration.
/// </summary>
[Category(ConfigurationCategory)]
[Category(DevicesCategory)]
[TypeConverter(typeof(SingleDeviceFactoryConverter))]
[Description("Specifies the configuration for the OpticalStimulator device in the headstage-64.")]
public ConfigureHeadstage64OpticalStimulator OpticalStimulator { get; set; } = new();
Expand All @@ -85,6 +85,7 @@ public ConfigureHeadstage64()
/// The port is the physical connection to the ONIX breakout board and must be specified prior to operation.
/// </remarks>
[Description("Specifies the physical connection of the headstage to the ONIX breakout board.")]
[Category(ConfigurationCategory)]
public PortName Port
{
get { return port; }
Expand Down Expand Up @@ -120,6 +121,7 @@ public PortName Port
[Description("If defined, it will override automated voltage discovery and apply the specified voltage" +
"to the headstage. Warning: this device requires 5.5V to 6.0V for proper operation." +
"Supplying higher voltages may result in damage to the headstage.")]
[Category(ConfigurationCategory)]
public double? PortVoltage
{
get => PortControl.PortVoltage;
Expand Down
4 changes: 2 additions & 2 deletions OpenEphys.Onix1/ConfigureNeuropixelsV1eHeadstage.cs
Original file line number Diff line number Diff line change
Expand Up @@ -25,15 +25,15 @@ public ConfigureNeuropixelsV1eHeadstage()
/// <summary>
/// Gets or sets the NeuropixelsV1e configuration.
/// </summary>
[Category(ConfigurationCategory)]
[Category(DevicesCategory)]
[TypeConverter(typeof(SingleDeviceFactoryConverter))]
[Description("Specifies the configuration for the NeuropixelsV1e device.")]
public ConfigureNeuropixelsV1e NeuropixelsV1e { get; set; } = new();

/// <summary>
/// Gets or sets the Bno055 9-axis inertial measurement unit configuration.
/// </summary>
[Category(ConfigurationCategory)]
[Category(DevicesCategory)]
[TypeConverter(typeof(SingleDeviceFactoryConverter))]
[Description("Specifies the configuration for the Bno055 device.")]
public ConfigureNeuropixelsV1eBno055 Bno055 { get; set; } = new();
Expand Down
6 changes: 4 additions & 2 deletions OpenEphys.Onix1/ConfigureNeuropixelsV2eBetaHeadstage.cs
Original file line number Diff line number Diff line change
Expand Up @@ -24,15 +24,15 @@ public ConfigureNeuropixelsV2eBetaHeadstage()
/// <summary>
/// Gets or sets the NeuropixelsV2eBeta configuration.
/// </summary>
[Category(ConfigurationCategory)]
[Category(DevicesCategory)]
[TypeConverter(typeof(SingleDeviceFactoryConverter))]
[Description("Specifies the configuration for the NeuropixelsV2eBeta device.")]
public ConfigureNeuropixelsV2eBeta NeuropixelsV2eBeta { get; set; } = new();

/// <summary>
/// Gets or sets the Bno055 9-axis inertial measurement unit configuration.
/// </summary>
[Category(ConfigurationCategory)]
[Category(DevicesCategory)]
[TypeConverter(typeof(SingleDeviceFactoryConverter))]
[Description("Specifies the configuration for the Bno055 device.")]
public ConfigureNeuropixelsV2eBno055 Bno055 { get; set; } = new();
Expand All @@ -44,6 +44,7 @@ public ConfigureNeuropixelsV2eBetaHeadstage()
/// The port is the physical connection to the ONIX breakout board and must be specified prior to operation.
/// </remarks>
[Description("Specifies the physical connection of the headstage to the ONIX breakout board.")]
[Category(ConfigurationCategory)]
public PortName Port
{
get { return port; }
Expand All @@ -69,6 +70,7 @@ public PortName Port
[Description("If defined, overrides automated voltage discovery and applies " +
"the specified voltage to the headstage. Warning: this device requires 3.0V to 5.0V " +
"for proper operation. Higher voltages can damage the headstage.")]
[Category(ConfigurationCategory)]
public double? PortVoltage
{
get => PortControl.PortVoltage;
Expand Down
6 changes: 4 additions & 2 deletions OpenEphys.Onix1/ConfigureNeuropixelsV2eHeadstage.cs
Original file line number Diff line number Diff line change
Expand Up @@ -25,15 +25,15 @@ public ConfigureNeuropixelsV2eHeadstage()
/// <summary>
/// Gets or sets the NeuropixelsV2e configuration.
/// </summary>
[Category(ConfigurationCategory)]
[Category(DevicesCategory)]
[TypeConverter(typeof(SingleDeviceFactoryConverter))]
[Description("Specifies the configuration for the NeuropixelsV2e device.")]
public ConfigureNeuropixelsV2e NeuropixelsV2e { get; set; } = new();

/// <summary>
/// Gets or sets the Bno055 9-axis inertial measurement unit configuration.
/// </summary>
[Category(ConfigurationCategory)]
[Category(DevicesCategory)]
[TypeConverter(typeof(SingleDeviceFactoryConverter))]
[Description("Specifies the configuration for the Bno055 device.")]
public ConfigureNeuropixelsV2eBno055 Bno055 { get; set; } = new();
Expand All @@ -45,6 +45,7 @@ public ConfigureNeuropixelsV2eHeadstage()
/// The port is the physical connection to the ONIX breakout board and must be specified prior to operation.
/// </remarks>
[Description("Specifies the physical connection of the headstage to the ONIX breakout board.")]
[Category(ConfigurationCategory)]
public PortName Port
{
get { return port; }
Expand All @@ -70,6 +71,7 @@ public PortName Port
[Description("If defined, overrides automated voltage discovery and applies " +
"the specified voltage to the headstage. Warning: this device requires 3.0V to 5.5V " +
"for proper operation. Higher voltages can damage the headstage.")]
[Category(ConfigurationCategory)]
public double? PortVoltage
{
get => PortControl.PortVoltage;
Expand Down
2 changes: 2 additions & 0 deletions OpenEphys.Onix1/CreateContext.cs
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ public class CreateContext
/// Gets or sets a string specifying the device driver used to communicate with hardware.
/// </summary>
[Description("Specifies the device driver used to communicate with hardware.")]
[Category(DeviceFactory.ConfigurationCategory)]
public string Driver { get; set; } = ContextTask.DefaultDriver;

/// <summary>
Expand All @@ -30,6 +31,7 @@ public class CreateContext
/// managed by the specified selected <see cref="Driver"/> in the host computer.
/// </remarks>
[Description("The index of the host interconnect between the ONI controller and host computer.")]
[Category(DeviceFactory.ConfigurationCategory)]
public int Index { get; set; } = ContextTask.DefaultIndex;

/// <summary>
Expand Down
2 changes: 2 additions & 0 deletions OpenEphys.Onix1/MultiDeviceFactory.cs
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,8 @@ public abstract class MultiDeviceFactory : DeviceFactory, INamedElement
const string BaseTypePrefix = "Configure";
string _name;

internal const string DevicesCategory = "Devices";

internal MultiDeviceFactory()
{
var baseName = GetType().Name;
Expand Down

0 comments on commit ec3a479

Please sign in to comment.