Okay guys,
I finally sat down and started programming... It's not working yet, but it
is getting there. The idea is based on some (older) discussions: more than
one program, one of which will do the gruesome serial stuff. That's the one
I'm building...
What does it do (now)
- communication to the pm2+ unit, including error handling and retries
Currently I can only do some very basic stuff, like reading meters (b0
command) and reading checksum (b4), but the principle is there, the rest is
just typing.
- 'web server' (for communication to gui/frontend/database/race server, but
also very handy for debugging)
Currenly works, is able to connect sessions and reply to them.
- Will run as a daemon on just about any Unix system, just as long as the
Unix box does Posix multithreading (eg Linux>2.2, Solaris/Intel, *BSD, etc).
The version I'm working on now has IPv6 in it, not every box will be able to
do that but this is easy to make configurable in the sources.
What will it become:
a) It should be able to send (almost?) any command to the unit directly,
including the workout setup stuff I still haven't documented yet...
-A program would cause these commands to be send to the unit by 'requesting
a web page' from the web server (eg like
'http://my.rower.pc:portnumber/get-meters'). This should make for easy
frontend programming in just about any language, I think.
b) It should be able to take a set of parameters from somewhere (like: I
want a 10 minute workout, with a target speed of 2:00) and run this, and
store all workout data until collected (eg
http://my.rower.pc:portnumber/get-last-workout)
To be clear on this: HTTP would just be the transport protocol, it would not
be necessary to use a browser to get this (but it is very easy during
debugging, though)
Sourceforge is doing maintenance, so I cannot put the stuff to the CVS yet.
Will try again later (maybe it will be there by the time you read this)
BTW. it's called pm2d, currently. I'll be working on it this week, probably,
so I expect things to grow fast.
Sytse
|