From 409a498c3b950d6048dd38431989ccc012232434 Mon Sep 17 00:00:00 2001 From: cjsha <36574350+cjsha@users.noreply.github.com> Date: Thu, 31 Oct 2024 10:01:38 -0400 Subject: [PATCH] Add badges for configuration/acquisition properties (#126) * Add badges for configuration/acquisition properties * Add references to badges --- .../getting-started/property-categories.md | 13 ++++++++++--- template/ManagedReference.extension.js | 6 +++++- template/partials/propertyTables.tmpl.partial | 18 ++++++++++++++++++ 3 files changed, 33 insertions(+), 4 deletions(-) diff --git a/articles/getting-started/property-categories.md b/articles/getting-started/property-categories.md index 8942806..b819365 100644 --- a/articles/getting-started/property-categories.md +++ b/articles/getting-started/property-categories.md @@ -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. +configuration 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. +acquisition 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 , , and more. Explore other available options under the [aggregate configuration operators](xref:configure) page. \ No newline at end of file +`Devices` properties refer to the individual devices available within a particular aggregate operator. Aggregate +operators include , , and more. +Explore other available options under the [aggregate configuration operators](xref:configure) page. \ No newline at end of file diff --git a/template/ManagedReference.extension.js b/template/ManagedReference.extension.js index 2c162f1..aec591f 100644 --- a/template/ManagedReference.extension.js +++ b/template/ManagedReference.extension.js @@ -28,6 +28,8 @@ 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, @@ -35,7 +37,9 @@ function processChildProperty(child, sharedModel) { 'text': addCodeTag([child.summary, child.remarks].join('')), 'hasEnum': enumFields.length > 0, 'enum': enumFields, - } + }, + 'configuration': configuration, + 'acquisition': acquisition } } diff --git a/template/partials/propertyTables.tmpl.partial b/template/partials/propertyTables.tmpl.partial index 3be3754..1be5152 100644 --- a/template/partials/propertyTables.tmpl.partial +++ b/template/partials/propertyTables.tmpl.partial @@ -1,6 +1,24 @@ {{{name}}} + {{#acquisition}} +
+ + + +
+ {{/acquisition}} + {{#configuration}} +
+ + + +
+ {{/configuration}} {{{type}}}