문제

I have a sensor gateway which is connected to the serial port. My java program basically a desktop application which is collecting sensor data and storing in a public mysql database. Now I am wanting to access the serial port through internet with a web application which is using the same public mysql database. I have think a bit but I think it is not a proper way. If I would keep a table in the database, if any command is generated through internet via the web application this table store the command for a period of time and my desktop application continuous monitoring the table if data available get the data and pass it through serial port. I am seeking for a proper way to access serial port through internet/cloud which is connected to remote machine or something like an expert opinion.

도움이 되었습니까?

해결책

That's certainly the simplest method. Much simpler than say a web service that stores it in memory, or again in the database and you get safety which you wouldn't get if you just relied on the file system to lock a file. You might need some method of clearing out the output from the DB.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top