Skip to content

Commit ec6bc6e

Browse files
dixonjoelJoel Dixon
andauthored
Update reference docs (conceptual and API usage) to match latest APIs (#94)
* Update data document to match current fields * test sessions -> test results * Update metadata document to match current fields * Update 'using' document to reflect current APIs * Update 'condition_type' parameter name. --------- Co-authored-by: Joel Dixon <joel.dixon@emerson.com>
1 parent 10ffd1c commit ec6bc6e

3 files changed

Lines changed: 83 additions & 92 deletions

File tree

docs/reference/ni-data-store.md

Lines changed: 19 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ A **TestResult** represents a complete test session or test execution run for a
2121
- `end_date_time` (timestamp) - When the test execution finished
2222
- `outcome` (enum) - Overall test result (PASSED, FAILED, INDETERMINATE, UNSPECIFIED)
2323
- `link` (string) - Optional link to additional resources
24-
- `extensions` (dict) - Custom key-value pairs for additional metadata
24+
- `extension` (dict) - Custom key-value pairs for additional metadata
2525
- `schema_id` (string) - ID of the schema for extension validation
2626
- `error_information` (ErrorInformation) - Error details if test result failed
2727

@@ -36,13 +36,13 @@ A **Step** represents an individual test procedure or operation within a larger
3636
- `test_result_id` (string) - ID of the associated TestResult
3737
- `test_id` (string) - ID of the test definition/specification
3838
- `name` (string) - Human-readable name for the step
39-
- `type` (string) - Type/category of the step
39+
- `step_type` (string) - Type/category of the step
4040
- `notes` (string) - Additional notes about the step
4141
- `start_date_time` (timestamp) - When the step started executing
4242
- `end_date_time` (timestamp) - When the step finished executing
4343
- `outcome` (enum) - Result of this step (PASSED, FAILED, INDETERMINATE, UNSPECIFIED)
4444
- `link` (string) - Optional link to additional resources
45-
- `extensions` (dict) - Custom key-value pairs for additional metadata
45+
- `extension` (dict) - Custom key-value pairs for additional metadata
4646
- `schema_id` (string) - ID of the schema for extension validation
4747
- `error_information` (ErrorInformation) - Error details if step failed
4848

@@ -68,7 +68,7 @@ A **PublishedMeasurement** represents actual measurement data captured during a
6868
- `hardware_item_ids` (list of strings) - Hardware used to capture this measurement
6969
- `test_adapter_ids` (list of strings) - Test adapters used to capture this measurement
7070
- `name` (string) - Name used to group related measurements
71-
- `data_type` (string) - Type of data (e.g., "Scalar", "AnalogWaveform", "Spectrum")
71+
- `value_type` (string) - Type of data (e.g., "Scalar", "AnalogWaveform", "Spectrum")
7272
- `notes` (string) - Additional notes about the measurement
7373
- `start_date_time` (timestamp) - When measurement capture started
7474
- `end_date_time` (timestamp) - When measurement capture finished
@@ -77,13 +77,15 @@ A **PublishedMeasurement** represents actual measurement data captured during a
7777
- `error_information` (ErrorInformation) - Error details if measurement failed
7878

7979
**Supported Data Types:**
80-
- **Scalar** - Single numeric values (voltage, current, frequency, etc.)
81-
- **Vector** - Arrays of numeric values
82-
- **AnalogWaveform** - Time-domain waveforms (double or int16)
83-
- **ComplexWaveform** - Complex-valued waveforms (double or int16)
84-
- **DigitalWaveform** - Digital/logic waveforms
85-
- **Spectrum** - Frequency-domain data
86-
- **XYData** - X-Y paired data sets
80+
- **Scalar** - Single float, int, str or boolean values
81+
- **Vector** - Arrays of float, int, str or boolean values
82+
- **DoubleAnalogWaveform** - Analog waveform with double precision
83+
- **DoubleXYData** - XY coordinate data with double precision
84+
- **I16AnalogWaveform** - Analog waveform with 16-bit integer precision
85+
- **DoubleComplexWaveform** - Complex waveform with double precision
86+
- **I16ComplexWaveform** - Complex waveform with 16-bit integer precision
87+
- **DoubleSpectrum** - Frequency spectrum data with double precision
88+
- **DigitalWaveform** - Digital waveform data
8789

8890
**Real-world examples**:
8991
- A voltage reading: `3.297V` from a multimeter
@@ -99,7 +101,7 @@ A **PublishedCondition** represents environmental or contextual information that
99101
- `moniker` (Moniker) - Data location identifier for retrieving the condition value
100102
- `id` (string) - Unique identifier for this condition
101103
- `name` (string) - Name of the condition (e.g., "Temperature", "Supply Voltage")
102-
- `type` (string) - Type/category of the condition (e.g., "Environment", "Input Parameter")
104+
- `condition_type` (string) - Type/category of the condition (e.g., "Environment", "Input Parameter")
103105
- `step_id` (string) - ID of the associated Step
104106
- `test_result_id` (string) - ID of the associated TestResult
105107

@@ -113,10 +115,10 @@ A **PublishedCondition** represents environmental or contextual information that
113115

114116
#### **Outcome Enum**
115117
Represents the result of a test or measurement:
116-
- `OUTCOME_UNSPECIFIED` (0) - No outcome specified
117-
- `OUTCOME_PASSED` (1) - Test/measurement passed
118-
- `OUTCOME_FAILED` (2) - Test/measurement failed
119-
- `OUTCOME_INDETERMINATE` (3) - Result is unclear/indeterminate
118+
- `UNSPECIFIED` - The outcome is not specified or unknown
119+
- `PASSED` - The measurement or test passed successfully
120+
- `FAILED` - The measurement or test failed
121+
- `INDETERMINATE` - The measurement or test result is indeterminate or inconclusive
120122

121123
#### **ErrorInformation**
122124
Contains error details when operations fail:
@@ -140,7 +142,7 @@ TestResult (Test session for Serial# ABC123)
140142

141143
This hierarchical structure allows you to:
142144
- **Organize data logically** - Group related measurements by test step
143-
- **Drill down progressively** - From test sessions → steps → individual measurements
145+
- **Drill down progressively** - From test results → steps → individual measurements
144146
- **Track context** - Associate environmental conditions with specific measurements
145147
- **Enable powerful queries** - Search and filter data at any level of the hierarchy
146148
- **Maintain traceability** - Link every measurement back to its test context

docs/reference/ni-metadata-store.md

Lines changed: 18 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -4,15 +4,17 @@ The NI Metadata Store supports the digital thread weaving together measurement r
44

55
**Based on:** [`metadata_store.proto`](https://github.com/ni/ni-apis/blob/main/ni/measurements/metadata/v1/metadata_store.proto)
66

7-
## **Operator**
7+
## **Core Entities**
8+
9+
### **Operator**
810
An **Operator** represents a person who performs tests or operates test equipment. This captures the human element in your test process.
911

1012
**Fields:**
1113
- `id` (string) - The id of the operator
1214
- `name` (string) - The name of the operator
1315
- `role` (string) - The role of the operator (e.g., "Test Engineer", "Lab Technician")
1416
- `link` (string) - URI to resource describing the operator
15-
- `extensions` (dict) - Custom key-value pairs for additional metadata
17+
- `extension` (dict) - Custom key-value pairs for additional metadata
1618
- `schema_id` (string) - ID of the schema for extension validation
1719

1820
**Real-world examples**:
@@ -27,10 +29,10 @@ A **Test Station** represents a physical location or setup where testing is perf
2729

2830
**Fields:**
2931
- `id` (string) - The id of the test station
30-
- `test_station_name` (string) - The name of the test station
32+
- `name` (string) - The name of the test station
3133
- `asset_identifier` (string) - For tracking and inventory purposes
3234
- `link` (string) - URI to resource describing the test station
33-
- `extensions` (dict) - Custom key-value pairs for additional metadata
35+
- `extension` (dict) - Custom key-value pairs for additional metadata
3436
- `schema_id` (string) - ID of the schema for extension validation
3537

3638
**Real-world examples**:
@@ -51,7 +53,7 @@ A **UUT** represents a product definition or model being tested. This is the "wh
5153
- `manufacturers` (list of strings) - List of manufacturers of the UUT
5254
- `part_number` (string) - The part number of the UUT
5355
- `link` (string) - URI to resource describing the UUT
54-
- `extensions` (dict) - Custom key-value pairs for additional metadata
56+
- `extension` (dict) - Custom key-value pairs for additional metadata
5557
- `schema_id` (string) - ID of the schema for extension validation
5658

5759
**Real-world examples**:
@@ -73,7 +75,7 @@ A **UUT Instance** represents an individual physical device with a unique serial
7375
- `firmware_version` (string) - Version of the firmware on the UUT instance
7476
- `hardware_version` (string) - Hardware version of the UUT instance
7577
- `link` (string) - URI to resource describing the UUT instance
76-
- `extensions` (dict) - Custom key-value pairs for additional metadata
78+
- `extension` (dict) - Custom key-value pairs for additional metadata
7779
- `schema_id` (string) - ID of the schema for extension validation
7880

7981
**Real-world examples**:
@@ -95,7 +97,7 @@ A **Hardware Item** represents test equipment, instruments, or tools used during
9597
- `asset_identifier` (string) - For tracking and inventory purposes
9698
- `calibration_due_date` (string) - When calibration expires
9799
- `link` (string) - URI to resource describing the hardware item
98-
- `extensions` (dict) - Custom key-value pairs for additional metadata
100+
- `extension` (dict) - Custom key-value pairs for additional metadata
99101
- `schema_id` (string) - ID of the schema for extension validation
100102

101103
**Real-world examples**:
@@ -114,7 +116,7 @@ A **Software Item** represents software tools, environments, or versions used du
114116
- `product` (string) - The software product name (letters, numbers, spaces, hyphens, underscores, parentheses, periods; must begin and end with letter or number)
115117
- `version` (string) - The version of the software item
116118
- `link` (string) - URI to resource describing the software item
117-
- `extensions` (dict) - Custom key-value pairs for additional metadata
119+
- `extension` (dict) - Custom key-value pairs for additional metadata
118120
- `schema_id` (string) - ID of the schema for extension validation
119121

120122
**Real-world examples**:
@@ -132,9 +134,9 @@ A **Test Description** represents a defined test procedure or specification for
132134
**Fields:**
133135
- `id` (string) - The id of the test description
134136
- `uut_id` (string) - The ID of the UUT this test is designed for
135-
- `test_description_name` (string) - Name of the test description
137+
- `name` (string) - Name of the test description
136138
- `link` (string) - URI to resource describing the test description
137-
- `extensions` (dict) - Custom key-value pairs for additional metadata
139+
- `extension` (dict) - Custom key-value pairs for additional metadata
138140
- `schema_id` (string) - ID of the schema for extension validation
139141

140142
**Real-world examples**:
@@ -148,10 +150,10 @@ A **Test** represents an individual test procedure or method. This is more granu
148150

149151
**Fields:**
150152
- `id` (string) - The id of the test
151-
- `test_name` (string) - Name of the test
153+
- `name` (string) - Name of the test
152154
- `description` (string) - Explanation of what the test does
153155
- `link` (string) - URI to resource describing the test
154-
- `extensions` (dict) - Custom key-value pairs for additional metadata
156+
- `extension` (dict) - Custom key-value pairs for additional metadata
155157
- `schema_id` (string) - ID of the schema for extension validation
156158

157159
**Real-world examples**:
@@ -173,7 +175,7 @@ A **Test Adapter** represents a test fixture, mechanical setup, or interface use
173175
- `asset_identifier` (string) - For tracking and inventory purposes
174176
- `calibration_due_date` (string) - When calibration expires
175177
- `link` (string) - URI to resource describing the test adapter
176-
- `extensions` (dict) - Custom key-value pairs for additional metadata
178+
- `extension` (dict) - Custom key-value pairs for additional metadata
177179
- `schema_id` (string) - ID of the schema for extension validation
178180

179181
**Real-world examples**:
@@ -269,7 +271,7 @@ hardware_item = HardwareItem(
269271
manufacturer="NI",
270272
model="PXIe-5171",
271273
serial_number="SCOPE001",
272-
extensions={
274+
extension={
273275
"bandwidth": "1 GHz",
274276
"manufacture_date": "2024-03-15",
275277
"calibration_certificate": "CAL-2024-001234",
@@ -349,7 +351,7 @@ hardware_item = HardwareItem(
349351
model="PXIe-5171",
350352
serial_number="SCOPE001",
351353
schema_id=schema_id, # Links to registered schema
352-
extensions={
354+
extension={
353355
"bandwidth": "1 GHz", # Required by schema
354356
"manufacture_date": "2024-03-15", # Required by schema
355357
"asset_tag": "SCOPE-789" # Optional field
@@ -390,7 +392,7 @@ hardware_item = HardwareItem(
390392
manufacturer="NI",
391393
model="PXIe-4081",
392394
# schema_id automatically inherited from test_result
393-
extensions={
395+
extension={
394396
# Fields validated against inherited schema
395397
}
396398
)

0 commit comments

Comments
 (0)