[Ovmsdev] Java and questions

Mark Webb-Johnson mark at webb-johnson.net
Wed Mar 14 21:45:26 HKT 2012


Tim,

Sounds real useful.

> Please may I also ask a question - what is the model for synchronicity of the messages? On the android app, if I hammer a button, I appear to be able to send more than one command before a response comes from the server. Is this correct? The protocol appears to not allow you to correlate the response from a command to the request (unless I've missed it), so doesn't appear to be asynchronous, although data messages come from the server asynchronously. Is the intended interaction with the server that there is only ever one active command in action?


The command part of the protocol is pretty minimal at the moment. It was added one quite late, and does just the bare minimum of what is needed.

The server doesn't care about the command massages. Any command from the apps it sends to the car (if connected). Any response from the car it sends to _all_ connected apps. The only exception to this is that it does respond to one command itself (the one for GPRS utilization data).

The main limitation is the car module. That can only handle one command at a time, and while it is processing it you shouldn't send any more commands. Most commands will be processed within the same cycle, but some take a second or two.

Regards, Mark.

On 14 Mar, 2012, at 7:33 PM, Tim Putnam wrote:

> Hello all, 
> 
> I just got my OVMS module yesterday. Before I go any further, what a fantastic piece project. Brilliant achievement, well done to everyone involved and my eternal gratitude. 
> 
> I'm a software developer, and time permitting I would love to be able to contribute something to your efforts.
> 
> I've been browsing the specs and android source on github. I have a tendency towards java, and something that stands out to me is that there is no abstracted data model or encapsulation of the protocol at a higher level in any language. I am going to write one for my own benefit, but perhaps it would be of use elsewhere?
> 
> The benefits I see to having it include:
> 
>   - the basis of a higher level specification of the protocol (e.g. for a webservice etc)
> 
>   - give plug and play interaction with the server for any java developer, much reducing the cognitive distance. They could just include the library and already have server connectivity, updated data model, receive relevant events, and have a simple extensible command interface, leaving them to focus on the interface.
> 
>   - could be reused in the android app, or as the basis for a web service application, and also simple desktop swing app I'd quite like to have available on my laptop
> 
> Please may I also ask a question - what is the model for synchronicity of the messages? On the android app, if I hammer a button, I appear to be able to send more than one command before a response comes from the server. Is this correct? The protocol appears to not allow you to correlate the response from a command to the request (unless I've missed it), so doesn't appear to be asynchronous, although data messages come from the server asynchronously. Is the intended interaction with the server that there is only ever one active command in action?
> 
> Best regards,
> Tim Putnam
> 
> _______________________________________________
> OvmsDev mailing list
> OvmsDev at lists.teslaclub.hk
> http://lists.teslaclub.hk/mailman/listinfo/ovmsdev




More information about the OvmsDev mailing list