Skip to content

Commit

Permalink
Add badges for configuration/acquisition properties (#126)
Browse files Browse the repository at this point in the history
* Add badges for configuration/acquisition properties

* Add references to badges
  • Loading branch information
cjsha authored Oct 31, 2024
1 parent 9048b71 commit 409a498
Show file tree
Hide file tree
Showing 3 changed files with 33 additions and 4 deletions.
13 changes: 10 additions & 3 deletions articles/getting-started/property-categories.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,15 @@ title: Property Categories

There are specific categories of properties that define when an operator's properties can be modified.

`Configuration` properties only have effect when a workflow is started and are used to initialize the hardware state. If they are changed while a workflow is running they will have no effect.
<span class="badge bg-warning-subtle border border-warning-subtle text-warning-emphasis rounded-pill"
id="configuration">configuration</span> properties have an effect on hardware when a workflow is started and are used to
initialize the hardware state. Even if they are changed while a workflow is running, they will not have an effect until
the workflow is restarted.

`Acquisition` properties can be manipulated when the workflow is running and will have an immediate effect on hardware. For instance stimulus waveform parameters can be modified in real-time and sent to the device multiple times while the workflow is running to shape stimulation patterns.
<span class="badge bg-primary-subtle border border-primary-subtle text-primary-emphasis rounded-pill"
id="acquisition">acquisition</span> properties have an immediate effect on hardware when the workflow is running. For
instance, stimulus waveform properties can be dynamically modified according to parameters in your workflow.

`Devices` properties refer to the individual devices available within a particular aggregate operator. Aggregate operators include <xref:OpenEphys.Onix1.ConfigureHeadstage64>, <xref:OpenEphys.Onix1.ConfigureBreakoutBoard>, and more. Explore other available options under the [aggregate configuration operators](xref:configure) page.
`Devices` properties refer to the individual devices available within a particular aggregate operator. Aggregate
operators include <xref:OpenEphys.Onix1.ConfigureHeadstage64>, <xref:OpenEphys.Onix1.ConfigureBreakoutBoard>, and more.
Explore other available options under the [aggregate configuration operators](xref:configure) page.
6 changes: 5 additions & 1 deletion template/ManagedReference.extension.js
Original file line number Diff line number Diff line change
Expand Up @@ -28,14 +28,18 @@ function processChildProperty(child, sharedModel) {
const enumFields = sharedModel[`~/api/${child.syntax.return.type.uid}.yml`]?.type === 'enum' ?
extractEnumData(sharedModel[`~/api/${child.syntax.return.type.uid}.yml`]) :
[];
const acquisition = child?.attributes.some(attribute => attribute.type === 'System.ComponentModel.CategoryAttribute' && attribute?.arguments[0].value === 'Acquisition');
const configuration = child?.attributes.some(attribute => attribute.type === 'System.ComponentModel.CategoryAttribute' && attribute?.arguments[0].value === 'Configuration');
return {
'name': child.name[0].value,
'type': child.syntax.return.type.specName[0].value,
'propertyDescription': {
'text': addCodeTag([child.summary, child.remarks].join('')),
'hasEnum': enumFields.length > 0,
'enum': enumFields,
}
},
'configuration': configuration,
'acquisition': acquisition
}
}

Expand Down
18 changes: 18 additions & 0 deletions template/partials/propertyTables.tmpl.partial
Original file line number Diff line number Diff line change
@@ -1,6 +1,24 @@
<tr>
<td style = "white-space: nowrap;">
<code>{{{name}}}</code>
{{#acquisition}}
<div>
<a class="xref" href="~/articles/getting-started/property-categories.html#acquisition">
<button class="badge bg-primary-subtle border border-primary-subtle text-primary-emphasis rounded-pill">
acquisition
</button>
</a>
</div>
{{/acquisition}}
{{#configuration}}
<div>
<a class="xref" href="~/articles/getting-started/property-categories.html#configuration">
<button class="badge bg-warning-subtle border border-warning-subtle text-warning-emphasis rounded-pill">
configuration
</button>
</a>
</div>
{{/configuration}}
</td>
<td style = "white-space: nowrap;">
{{{type}}}
Expand Down

0 comments on commit 409a498

Please sign in to comment.