GithubHelp home page GithubHelp logo

thiagoralves / openplc Goto Github PK

View Code? Open in Web Editor NEW
131.0 131.0 57.0 6.13 MB

Software for the OpenPLC - an open source industrial controller

License: GNU General Public License v3.0

C++ 78.84% C 16.87% JavaScript 3.58% Shell 0.71%

openplc's People

Contributors

thiagoralves avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  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  avatar  avatar  avatar  avatar  avatar  avatar

openplc's Issues

Warnings building from sources

From Unable to build OpenPLC emulator. C warning: no return statement in function on Stack Overflow:

I encountered a problem trying to run build.sh for OpenPCL master. I get three warnings and the build fails:

openplc.cpp: in function 'void* modbusThread
openplc.cpp:52:1: warning: no return statement in function returning non-void [-Wreturn-type]
persistent_storage.cpp: in function 'int readPersistentStorage()':
persistent_storage.cpp:107:1 warning: control reaches end of non-void function [-Wreturn-type]
server.cpp: in function 'void* handleConnections(void*)':
server.cpp:138:1 warning: no return statement in function returning non-void [-Wreturn-type]

The OP did not state the failures.

Looking at some of the sources, like openplc.cpp:52:

void *modbusThread(void *arg)
{
	startServer(502);
}

It may be a good idea to clear the warnings so inexperienced folks don't have to attempt it. It looks like startServer does not return a value:

$ grep -IR startServer
core/server.cpp:void startServer(int port)
core/openplc.cpp:	startServer(502);
core/ladder.h:void startServer(int port);

So maybe change modbusThread to something like:

void *modbusThread(void *arg)
{
	startServer(502);
	return nullptr;
}

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.