Skip to content

Commit de36952

Browse files
authored
Update README for ni-measurement-generator instead of using template.py (#91)
* Update README for ni-measurement-generator instead of using template.py * Brad's feedback * Zero out the Guid on the sample command line.
1 parent 9a69822 commit de36952

1 file changed

Lines changed: 20 additions & 12 deletions

File tree

README.md

Lines changed: 20 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -99,26 +99,34 @@ pip show ni-measurement-service
9999

100100
### Developing a minimal python measurement
101101

102-
1. Open a command prompt, and change the working directory to `ni_measurement_generator`
102+
1. Install the `ni-measurement-generator` package.
103103

104-
``` cmd
105-
cd <path_of_template.py>
106-
REM Example: cd "..\measurement-services-python\ni_measurement_generator"
107-
```
104+
``` cmd
105+
REM Activate the required virtual environment if any.
106+
pip install ni-measurement-generator
107+
```
108+
109+
2. Run the `ni-measurement-generator` tool. Use command line arguments to specify the `display-name` and optionally the `version`, `measurement-type`, and `product-type`.
110+
111+
1. Running `ni-measurement-generator` without optional arguments:
108112

109-
2. Run `template.py` in a command prompt using command line arguments for `display_name`, `version`, `measurement_type`, and `product_type`.
110-
1. Running `template` without optional arguments:
113+
`ni-measurement-generator SampleMeasurement`
111114

112-
`poetry run python ni-measurement-generator SampleMeasurement 0.1.0.0 Measurement Product`
115+
'SampleMeasurement' is the display name of your measurement service. Without the optional arguments,
116+
the other arguments are generated for you based on the display name.
113117

114-
2. Running `template` with optional arguments for `ui_file`, `service_class`, `service_id`, and `description`:
118+
2. Running `ni-measurement-generator` with optional arguments for `version`, `measurement-type`, `product-type`, `ui-file`,
119+
`service-class`, `service-id`, and `description`:
115120

116-
`poetry run python ni-measurement-generator SampleMeasurement 0.1.0.0 Measurement Product --ui-file MeasurementUI.measui --service-class SampleMeasurement_Python --service-id ECFC33EB-AA2E-41A5-A7C8-CAA2A8245052 --description description`
121+
`ni-measurement-generator SampleMeasurement 0.1.0.0 Measurement Product --ui-file MeasurementUI.measui --service-class SampleMeasurement_Python --service-id 00000000-0000-0000-0000-000000000000 --description description`
117122

118-
3. Running `template` with optional argument `directory_out`:
123+
3. Running `ni-measurement-generator` with optional argument for `directory-out`
119124

120-
`poetry run python ni-measurement-generator SampleMeasurement 0.1.0.0 Measurement Product --directory-out <new_path_for_created_files>`
125+
`ni-measurement-generator SampleMeasurement --directory-out <new_path_for_created_files>`
121126

127+
If no output directory is specified, the files will
128+
be placed in a new folder under the current directory
129+
named after the display name without spaces.
122130

123131
3. To customize the created measurement, provide metadata of the measurement's configuration(input parameters) and outputs(output parameters) in `measurement.py`.
124132
1. Use the `configuration()` decorator to provide metadata about the configurations.**The order of the configuration decorator must match with the order of the parameters defined in the function signature.**

0 commit comments

Comments
 (0)