![]() |
Google Protocol Buffers and C++ on Fremantle?
Does anyone know of a way I can use Google Protocol Buffers .proto files with C++ on Maemo Fremantle on the N900? Presumably it would involve getting the protocol buffer compiler and libraries to build in Scratchbox and then getting the runtime libraries to work on the device (and then packaging the result up in the repos somewhere)
Specifically I am planning to work with Google GTFS-realtime data. EDIT: It looks like there might be some protobuf stuff in extras but it looks to be old and un-maintained with no-one working on it anymore. |
Re: Google Protocol Buffers and C++ on Fremantle?
Quote:
But anyway it would be nice to update protobuf. |
Re: Google Protocol Buffers and C++ on Fremantle?
Looks like whats in the repos is suitable for compiling the GTFS-realtime .proto file anyway (that .proto file needs protobuf 2.x). So that's all good. Now I just need to find something that can parse the GTFS text files and I am good :)
|
Re: Google Protocol Buffers and C++ on Fremantle?
Have a look at stackoverflow. There is a python script which parsing GTFS-realtime.
|
Re: Google Protocol Buffers and C++ on Fremantle?
Parsing GTFS-realtime I can do now that I have been able to compile the protobuf file properly. What I have to find (or write) is something for parsing regular GTFS data (which is comma separated text files in a special format). All the code I can find with Google seems to be either for scripting languages or with web backend languages like Java. Can't seem to find anyone who has written GTFS parsing code in C or C++.
|
Re: Google Protocol Buffers and C++ on Fremantle?
Quote:
I don't know maybe that helps: https://code.google.com/archive/p/gtfsengine/ https://developers.google.com/protoc...cs/cpptutorial Or attach two files one with the initial data and one with the target format. I could write some function. |
Re: Google Protocol Buffers and C++ on Fremantle?
I think writing my own makes sense, will be a fun exercise anyway :)
Although I did see something to convert GTFS data into a sqlite db, that might be a good place to start (since being in an sqlite db means I can write SQL to get the info I need) |
All times are GMT. The time now is 09:24. |
vBulletin® Version 3.8.8