cityproto¶
CityProto is a protobuf-based data exchange format for FIBLAB projects. It is designed to be used in Golang, Python, and JavaScript/TypeScript projects.
Usage¶
Golang¶
go mod edit -replace github.com/tsinghua-fib-lab/cityproto/v2=git.fiblab.net/sim/protos/v2@v${major}.${minor}.${patch}
# write code to import "github.com/tsinghua-fib-lab/cityproto/v2/go/city/xxx"
go mod tidy
Python¶
pip install pycityproto
If you encounter the following error during the installation of grpcio:
pip install fails with "No such file or directory: 'c++': 'c++'"
It means that C++ related dependencies are missing. On the Debian image, execute:
sudo apt install build-essential
On the Alpine image, execute:
apk add g++
JavaScript/TypeScript¶
NPM¶
Use the npm install command to install the SDK:
npm install @fiblab/cityproto
Yarn¶
Use the yarn add command to install the SDK:
yarn add @fiblab/cityproto
Table of Contents¶
- Development
- Protocol Documentation
- Table of Contents
- city/clock/v1/clock_service.proto
- city/geo/v2/geo.proto
- city/comm/input/v1/comm.proto
- city/comm/interaction/aoi/v1/aoi_service.proto
- city/comm/interaction/demand/v1/demand_service.proto
- city/comm/interaction/gateway/v1/gateway.proto
- city/event/v1/event.proto
- city/comm/interaction/gateway/v1/gateway_service.proto
- city/comm/output/v1/output.proto
- city/comm/output/v1/output_service.proto
- city/config/v1/config.proto
- city/economy/v1/economy.proto
- city/economy/v1/org_service.proto
- city/economy/v1/person_service.proto
- city/economy/v2/economy.proto
- city/economy/v2/org_service.proto
- city/elec/input/v1/config.proto
- city/elec/input/v1/input.proto
- city/map/v2/light.proto
- city/map/v2/map.proto
- city/elec/input/v1/input_service.proto
- city/elec/interaction/v1/elec_service.proto
- city/elec/output/v1/output.proto
- city/elec/output/v1/output_service.proto
- city/event/v1/event_service.proto
- city/event/v2/event.proto
- city/event/v2/event_service.proto
- city/person/v2/motion.proto
- city/map/v2/aoi_service.proto
- city/map/v2/lane_state.proto
- city/map/v2/junction_service.proto
- city/map/v2/lane_service.proto
- city/map/v2/road_service.proto
- city/map/v2/traffic_light_service.proto
- city/pause/v1/pause_service.proto
- city/person/v1/motion.proto
- city/routing/v2/routing.proto
- city/trip/v2/trip.proto
- city/person/v1/person.proto
- city/person/v1/person_runtime.proto
- city/person/v1/vehicle.proto
- city/person/v1/person_service.proto
- city/person/v2/carbon.proto
- city/person/v2/pedestrian.proto
- city/person/v2/person.proto
- city/person/v2/person_runtime.proto
- city/person/v2/taxi.proto
- city/person/v2/pollution.proto
- city/person/v2/vehicle.proto
- city/person/v2/person_service.proto
- city/ping/v1/ping_service.proto
- city/routing/v2/cost.proto
- city/routing/v2/routing_service.proto
- city/social/v1/message.proto
- city/social/v1/social_service.proto
- city/streetview/v1/streetview.proto
- city/sync/v2/sync_service.proto
- city/water/input/v1/config.proto
- city/water/input/v1/water.proto
- city/water/input/v1/input_service.proto
- city/water/interaction/v1/water_service.proto
- city/water/output/v1/output.proto
- city/water/output/v1/output_service.proto
- Scalar Value Types