jdblair / sunspec Goto Github PK
View Code? Open in Web Editor NEWSunspec Reference Implementation and Test Tool
License: Other
Sunspec Reference Implementation and Test Tool
License: Other
A nice feature would be to store the models that were discovered on a given device so the device doesn't have to be re-scanned. This isn't necessary as a test tool, but it would be useful if the software was used as part of a logger.
Implement a test host as a cgi which could be used with any web server. This should be able to accept the logger xml format and parse it into the internal representation.
By default the host should then store the data using the sqlite output driver.
Hello,
I get an error when trying to build via "make". Any suggestions?
Thanks in advance!
Nico
make -C src all
make[1]: Entering directory '/home/pi/Desktop/sunspec/sunspec-1.0.2 2/src'
Makefile:88: suns_parser.d: Datei oder Verzeichnis nicht gefunden
Makefile:88: suns_model.d: Datei oder Verzeichnis nicht gefunden
Makefile:88: suns_app.d: Datei oder Verzeichnis nicht gefunden
Makefile:88: suns_output.d: Datei oder Verzeichnis nicht gefunden
Makefile:88: suns_host_parser.d: Datei oder Verzeichnis nicht gefunden
Makefile:88: suns_host.d: Datei oder Verzeichnis nicht gefunden
Makefile:88: suns_lang.tab.d: Datei oder Verzeichnis nicht gefunden
Makefile:88: suns_lang.yy.d: Datei oder Verzeichnis nicht gefunden
yacc -d -o suns_lang.tab.c suns_lang.y
make[1]: yacc: Kommando nicht gefunden
Makefile:101: recipe for target 'suns_lang.tab.c' failed
make[1]: *** [suns_lang.tab.c] Error 127
make[1]: Leaving directory '/home/pi/Desktop/sunspec/sunspec-1.0.2 2/src'
Makefile:40: recipe for target 'all' failed
make: *** [all] Error 2
The complete end marker (0xFFFF, 0x0000) must be present at the end of the data. The test tool should indicate an error if it is not present.
Need to add the "x" (index) attribute to the "m" (model) records in the xml model output.
Although cygwin is not supported officially, are the following errors/warnings related to my (gcc) compiler, the modbus library (compiled in the same environment) or the .c files?
$ make
make -C src all
make[1]: Entering directory '/cygdrive/d/sunspec/src'
cc -std=gnu99 -g -DDEBUG -DYY_NO_INPUT -DSUNS_MODELPATH=""\"/usr/local/lib/suns/models\""" -Wall -I/usr/local/include/modbus -I ../lib -c -o suns_app.o suns_app.c
suns_app.c: In function ‘suns_init_modbus’:
suns_app.c:510:5: warning: passing argument 2 of ‘modbus_set_response_timeout’ makes integer from pointer without a cast [enabled by default]
modbus_set_response_timeout(app->mb_ctx, &timeout);
^
In file included from suns_app.c:48:0:
/usr/local/include/modbus/modbus.h:188:16: note: expected ‘uint32_t’ but argument is of type ‘struct timeval *’
MODBUS_API int modbus_set_response_timeout(modbus_t *ctx, uint32_t to_sec, uint32_t to_usec);
^
suns_app.c:510:5: error: too few arguments to function ‘modbus_set_response_timeout’
modbus_set_response_timeout(app->mb_ctx, &timeout);
^
In file included from suns_app.c:48:0:
/usr/local/include/modbus/modbus.h:188:16: note: declared here
MODBUS_API int modbus_set_response_timeout(modbus_t *ctx, uint32_t to_sec, uint32_t to_usec);
^
<builtin>: recipe for target 'suns_app.o' failed
make[1]: *** [suns_app.o] Error 1
make[1]: Leaving directory '/cygdrive/d/sunspec/src'
Makefile:40: recipe for target 'all' failed
make: *** [all] Error 2
Any hints are much appreciated.
Instead of being required to specify a device model file every time the suns tool is invoked it should contain a default search path and look for model files itself.
It should search for files ending in "model" which will be in "slang" format, as well as files ending in "xml" which should be in model definition xml format.
A warning or errors should be reported if any mandatory values are marked not-implemented.
Need to add the symbolic (human readable) bitfield output to the text output format. This should work like the enum16 and enum32 symbolic output.
When i tried to make the libmodbus i received following error on raspberry pi:
make: *** No rule to make target 'install'.
If a model file is invalid due to an incorrect type field, reading that did causes a segfault.
I think the problem is that there is a partial model stored in the internal representation. The did is added to the did index, but then there is an incomplete data point list.
Maintaining the offset values is tedious and error prone. It could be handled automatically based on the type sizes. There should be a command that will parse smdx files and then output offsets that are correct based on the defined types. This will simplify maintenance.
I have read out my meter with your software and the output looks like this. I think there are some bugs in the xml files, marked with a "*".
Total VAR-hours Imported Q1 0 varh *
Total VAr-hours Imported Q1 phase A 0 varh
Total VAr-hours Imported Q1 phase B 0 varh
Total VAr-hourse Imported Q1 phase C 0 varh *
Total VAr-hours Imported Q2 0 varh
Total VAr-hours Imported Q2 phase A 0 varh
Total VAr-hours Imported Q2 phase B 0 varh
Total VAr-hours Imported Q2 phase C 0 varh
Total VAr-hours Exported Q3 0 varh
Total VAr-hours Exported Q3 phase A 0 varh
Total VAr-hours Exported Q3 phase B 0 varh
Total VAr-hours Exported Q3 phase C 0 varh
Total VAr-hours Exported Q4 0 varh
Total VAr-hours Exported Q4 Imported phase A 0 varh
TotVArhExpQ4PhB 0 varh *
Total VAr-hours Exported Q4 Imported phase C 0 varh
If you specify a hostname argument to the -i option, like "-i zaphod.dyndns.org" the tool segfaults rather than doing the right thing.
jdblair@lappy:~/git/sunspec/src$ suns -i zaphod.dyndns.org
The IP string has been truncated
ERROR: cannot initialize modbus context: Invalid argument
Segmentation fault
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.