How the server receives data

Philip7 years ago

Hi. I'm trying to understand how the server handles data from the client at the code level.

If I've got it right, the client sends a URL containing position, course, etc which is received by the server. How is the data extracted (which java function), and how is it written to the database?

Any answers much appreciated.

Anton Tananaev7 years ago

Decoding is in osmand decoder class. Database communication is in data manager class.

Philip7 years ago

Thanks for the pointer (or was it a reference :) ?)
I'm thinking of writing something that will piggy back extra data on the client's payload. E.g. engine data, hours travelled etc.
Will pull request if it turns out to be a useful addition to this already great app.

Philip7 years ago

I found the osmand protocol decoder, and all the other ones alongside it. Is Traccar also able to use all those other mapping apps as well?

Anton Tananaev7 years ago

What "those" apps? I need to know protocol that they use.

Philip7 years ago

I mean all the different protocols listed under traccar/src/org/traccar/protocol/. How can we switch for example from Osmand to Appello, or Cellocator? Thanks.

Anton Tananaev7 years ago

I don't understand the question. What do you want to switch? Each protocol has its own port.

Philip7 years ago

I see, so the Traccar client uses Osmand protocol, but the server can also accept the other protocols, on different ports. I guess I wanted to know the purpose of all the other protocols. Excuse my lack of clarity, and thanks again.

Anton Tananaev7 years ago

Traccar supports more than 800 models of hardware GPS trackers:

https://www.traccar.org/devices/

Philip7 years ago

That is awesome. And a lot of work to get them all included!