Skip to content

Commit 62ae8db

Browse files
committed
Merge branch 'main' into issue-46
2 parents 1efe6d2 + 138d2b0 commit 62ae8db

File tree

3 files changed

+50
-12
lines changed

3 files changed

+50
-12
lines changed

articles/getting-started/property-categories.md

+10-3
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

+22-9
Original file line numberDiff line numberDiff line change
@@ -28,38 +28,50 @@ 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,
34-
'propertyDescription': {
36+
'propertyDescription':
37+
{
3538
'text': addCodeTag([child.summary, child.remarks].join('')),
3639
'hasEnum': enumFields.length > 0,
3740
'enum': enumFields,
38-
}
41+
},
42+
'configuration': configuration,
43+
'acquisition': acquisition
3944
}
4045
}
4146

47+
const filterProperties = propertyCandidate => propertyCandidate.type === 'property' && !propertyCandidate?.attributes.some(attribute =>
48+
attribute.type === 'System.ComponentModel.BrowsableAttribute' && attribute.arguments[0].value === false);
49+
4250
function extractPropertiesData(model, sharedModel) {
4351
return model?.children
44-
.filter(child => child.type === 'property' && child.syntax)
52+
.filter(filterProperties)
4553
.map(child => processChildProperty(child, sharedModel));
4654
}
4755

4856
function extractPropertiesFromInheritedMembersData(model, sharedModel) {
4957
return model.inheritedMembers
50-
.filter(inheritedMember => inheritedMember.type === 'property')
51-
.map(inheritedMember => (
52-
processChildProperty(
58+
.filter(filterProperties)
59+
.map(inheritedMember =>
60+
(
61+
processChildProperty
62+
(
5363
sharedModel[`~/api/${inheritedMember.parent}.yml`].children.find(inheritedMemberChild => inheritedMemberChild.uid === inheritedMember.uid),
5464
sharedModel
5565
)
56-
));
66+
)
67+
);
5768
}
5869

5970
function extractConstituentOperatorsData(model) {
6071
return model?.children
6172
.filter(child => child.type === 'property' && model.__global._shared?.[`~/api/${child.syntax.return.type.uid}.yml`].type === 'class')
62-
.map(child => {
73+
.map(child =>
74+
{
6375
const deviceModel = model.__global._shared?.[`~/api/${child.syntax.return.type.uid}.yml`];
6476
const properties = sortPropertiesData(extractPropertiesData(deviceModel, model.__global._shared));
6577
return {
@@ -69,7 +81,8 @@ function extractConstituentOperatorsData(model) {
6981
'hasProperties': properties === undefined || properties.length === 0 ? false : true,
7082
'properties': properties,
7183
};
72-
});
84+
}
85+
);
7386
}
7487

7588
function extractOperatorData(model) {

template/partials/propertyTable.tmpl.partial

+18
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,24 @@
1010
<tr>
1111
<td style = "white-space: nowrap;">
1212
<code>{{{name}}}</code>
13+
{{#acquisition}}
14+
<div>
15+
<a class="xref" href="~/articles/getting-started/property-categories.html#acquisition">
16+
<button class="badge bg-primary-subtle border border-primary-subtle text-primary-emphasis rounded-pill">
17+
acquisition
18+
</button>
19+
</a>
20+
</div>
21+
{{/acquisition}}
22+
{{#configuration}}
23+
<div>
24+
<a class="xref" href="~/articles/getting-started/property-categories.html#configuration">
25+
<button class="badge bg-warning-subtle border border-warning-subtle text-warning-emphasis rounded-pill">
26+
configuration
27+
</button>
28+
</a>
29+
</div>
30+
{{/configuration}}
1331
</td>
1432
<td style = "white-space: nowrap;">
1533
{{{type}}}

0 commit comments

Comments
 (0)