Comments (4)
Can you please show me some example, how to reproduce this error? Example scpi command with parameters and how you handle it.
from scpi-parser.
Perhaps it's due to the old code base. This function was unchanged since then, but perhaps the handling of remaining bytes after processing the expected parameters was modified.
I could reproduce this by using the SCPI_ParamText function with a text in "".
I just found out that locateText is tested isolated but there is no test for SCPI_ParamText (TODO flag), am I correct?
If you add a sample command expecting one text parameter and test it with a text w/o and w/ "" then an error should be produced for the test in "".
My handling in the called function is just
// Read string
if(SCPI_ParamText(context, &cStrPtr, &len, FALSE)) {
if(len > XY_STRINGSIZE - 1) {
SCPI_ErrorPush(context, SCPI_ERROR_DATA_OUTOFRANGE);
return SCPI_RES_ERR;
}
}
from scpi-parser.
OK, there is no longer function SCPI_ParamText
, because it does not work as expected. If you don't care about "
or '
inside of the string, you can now use SCPI_ParamCharacters
. If you care, you must use SCPI_ParamCopyText
. Both functions work properly and they are also well tested in test_parser.c
.
If you have same problems with newest version, just open new issue, but I must close this as invalid, because it is no longer true.
from scpi-parser.
You are correct - sorry for that. I mixed up different sources. My fault.
Thanks for the hint.
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.