Skip to content

Commit 409a498

Browse files
authored
Add badges for configuration/acquisition properties (#126)
* Add badges for configuration/acquisition properties * Add references to badges
1 parent 9048b71 commit 409a498

File tree

3 files changed

+33
-4
lines changed

3 files changed

+33
-4
lines changed

articles/getting-started/property-categories.md

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,15 @@ title: Property Categories
55

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

8-
`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.
8+
<span class="badge bg-warning-subtle border border-warning-subtle text-warning-emphasis rounded-pill"
9+
id="configuration">configuration</span> properties have an effect on hardware when a workflow is started and are used to
10+
initialize the hardware state. Even if they are changed while a workflow is running, they will not have an effect until
11+
the workflow is restarted.
912

10-
`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.
13+
<span class="badge bg-primary-subtle border border-primary-subtle text-primary-emphasis rounded-pill"
14+
id="acquisition">acquisition</span> properties have an immediate effect on hardware when the workflow is running. For
15+
instance, stimulus waveform properties can be dynamically modified according to parameters in your workflow.
1116

12-
`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.
17+
`Devices` properties refer to the individual devices available within a particular aggregate operator. Aggregate
18+
operators include <xref:OpenEphys.Onix1.ConfigureHeadstage64>, <xref:OpenEphys.Onix1.ConfigureBreakoutBoard>, and more.
19+
Explore other available options under the [aggregate configuration operators](xref:configure) page.

template/ManagedReference.extension.js

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,14 +28,18 @@ function processChildProperty(child, sharedModel) {
2828
const enumFields = sharedModel[`~/api/${child.syntax.return.type.uid}.yml`]?.type === 'enum' ?
2929
extractEnumData(sharedModel[`~/api/${child.syntax.return.type.uid}.yml`]) :
3030
[];
31+
const acquisition = child?.attributes.some(attribute => attribute.type === 'System.ComponentModel.CategoryAttribute' && attribute?.arguments[0].value === 'Acquisition');
32+
const configuration = child?.attributes.some(attribute => attribute.type === 'System.ComponentModel.CategoryAttribute' && attribute?.arguments[0].value === 'Configuration');
3133
return {
3234
'name': child.name[0].value,
3335
'type': child.syntax.return.type.specName[0].value,
3436
'propertyDescription': {
3537
'text': addCodeTag([child.summary, child.remarks].join('')),
3638
'hasEnum': enumFields.length > 0,
3739
'enum': enumFields,
38-
}
40+
},
41+
'configuration': configuration,
42+
'acquisition': acquisition
3943
}
4044
}
4145

template/partials/propertyTables.tmpl.partial

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,24 @@
11
<tr>
22
<td style = "white-space: nowrap;">
33
<code>{{{name}}}</code>
4+
{{#acquisition}}
5+
<div>
6+
<a class="xref" href="~/articles/getting-started/property-categories.html#acquisition">
7+
<button class="badge bg-primary-subtle border border-primary-subtle text-primary-emphasis rounded-pill">
8+
acquisition
9+
</button>
10+
</a>
11+
</div>
12+
{{/acquisition}}
13+
{{#configuration}}
14+
<div>
15+
<a class="xref" href="~/articles/getting-started/property-categories.html#configuration">
16+
<button class="badge bg-warning-subtle border border-warning-subtle text-warning-emphasis rounded-pill">
17+
configuration
18+
</button>
19+
</a>
20+
</div>
21+
{{/configuration}}
422
</td>
523
<td style = "white-space: nowrap;">
624
{{{type}}}

0 commit comments

Comments
 (0)