Comments (6)
Because of collisions in units and their prefixes, you must specify all combinations you want. Units prefixes are case insensitive.
Consider these examples:
- What is MHZ? - mega Hertz or milli Hertz
- What is MV? - mega Volt or milli Volt
- What is MOHM? - mega Ohm or milli Ohm
It all depends on your application and it is not possible to generate prefixes automaticly.
from scpi-parser.
I more meant suffixes. I understand the M problem above, and SCPI even just says it's banned to use milli hertz, milli ohms and megavolts.
I was more meaning things like 400uVrms, 400mVrms and 400Vrms and 400uVpp, 400mVpp, 400Vpp, without specifying Vrms and Vpp as separate units, so the prefix would still do the x1000, /1000 type multipliers, but the suffix could have some other factor after the prefix was applied. Just idle thoughts really.
from scpi-parser.
I now understand what you want. There could be one array of units and each unit connected to array with possible prefixes for that unit.
V -> U,M,,K
Vrms -> U,M,,K
OHM -> ,K,M
HZ -> ,K,M,G
But now, it is not possible and it is hard to implement. The best way now is to expand all possible prefixes with all possible suffixes.
from scpi-parser.
Indeed, I know it's not really possible in the current library, just something to think about .)
from scpi-parser.
Feel free to implement it ;)
from scpi-parser.
Just make two separate issues from this #26 and #25 so closing this.
from scpi-parser.
Related Issues (20)
- C++ compilation error due to NULL being a long int HOT 1
- ip set HOT 1
- check if osThreadCreate() successful HOT 8
- Possible to have multiple, independent scpi session? HOT 4
- Example of Optional keywords/Related API HOT 1
- introducing a help command HOT 5
- problem talking with sigrok HOT 5
- USE_FULL ERROR LIST report "Unknow Error" for all XE errors HOT 2
- Termination for SCPI commands HOT 3
- arm cross-compilation requires additional flags HOT 2
- Compile error when compiling with C++17 HOT 1
- vxi11.h missing ??
- Port to Arduino
- scpi-parser support on windows? HOT 1
- Documentation out of date?
- How the MAV bit is setting in Status register. HOT 1
- Handle errors from the read/write method HOT 11
- [Feature request] Add support to handle numerical values in choice list
- TEST_Chanlst upper limit fails HOT 1
- Parsing decimal values HOT 5
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from scpi-parser.