项目作者: propershark

项目描述 :
Purveyor of schedule information for transit agencies via GTFS feeds and WAMP procedures.
高级语言: C++
项目地址: git://github.com/propershark/timetable_cpp.git
创建时间: 2016-10-08T19:35:53Z
项目社区:https://github.com/propershark/timetable_cpp

开源协议:

下载


Timetable

Purveyor of schedule information for transit agencies via GTFS feeds and WAMP procedures. This time in C++.

Installation

This is the only compiled part of the server system. As such, it takes a bit more effort to install and set up. These are the steps I took to get a working application.

NOTE: This project is configured to be compiled with clang. To use a different compiler (untested), simply edit line 5 of Makefile to be CXX ?= compiler_name. There are currently no compiler-specific flags, so everything else should work as-is.

First, you’ll need to download and compile wamped and its dependency, mpack. It’s easiest to clone msgpack into the mpack folder in wamped.

  1. git clone https://github.com/propershark/wamped.git
  2. cd wamped
  3. git clone http://github.com/alvistar/mpack.git

Then, follow the build instructions from wamped to create the static libraries for your system. I’ve copied them here to make things simple.

  1. mkdir build
  2. cd build
  3. cmake ..
  4. make

After running make, the built libraries will be somewhat hidden away. It took me a while to find these, but we need to copy them into our lib/ folder to link them properly when compiling timetable. Assuming you are in the directory for this repo (i.e., ../timetable), and you cloned wamped to a sibling folder (i.e., ../wamped), these commands should copy the library files properly.

  1. cd /path/to/timetable/clone
  2. cp ../wamped/build/source/wamped/libwamped.a lib/
  3. cp ../wamped/build/source/mpackCPP/libmpackcpp.a lib/
  4. cp ../wamped/build/mpack/src/mpack/libmpack.a lib/

Note that the extension of the lib* files may depend on your system. Use tab completion in your shell and you should be able to find them pretty easily.

Now, to compile timetable itself, you should be able to run make and get a timetable executable.

  1. make
  2. ./timetable

Usage

Timetable is currently a dumb executable with no real capabilities. As such, it can be run with no arguments.

  1. ./timetable

As it develops, there will need to be configurations for finding GTFS files and configuring worker pools. These may be done at the command line

  1. ./timetable --gtfs ./data/gtfs.zip --workers 8

However, this will likely be done through a configuration file instead. Only time will tell.