Code Monkey home page Code Monkey logo

sunspec's People

Contributors

jdblair avatar johnnunneley avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

sunspec's Issues

implement host side of logger protocol

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.

Error 2: "suns_parser.d: File or directory not found"

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

Compilation under cygwin

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.

create default search path for device model files

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.

make fails

When i tried to make the libmodbus i received following error on raspberry pi:
make: *** No rule to make target 'install'.

invalid model file causes segfault when that model is read

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.

Spelling Errors?

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

specifying a hostname instead of an ip address for -i option causes segfault

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

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.