{"id":19961625,"url":"https://github.com/xevoinc/yobd","last_synced_at":"2026-06-10T17:31:37.896Z","repository":{"id":153187409,"uuid":"101438166","full_name":"XevoInc/yobd","owner":"XevoInc","description":"a standalone library for schema-driven data translation from CAN to OBD II","archived":false,"fork":false,"pushed_at":"2020-06-29T23:14:55.000Z","size":221,"stargazers_count":1,"open_issues_count":0,"forks_count":2,"subscribers_count":5,"default_branch":"master","last_synced_at":"2025-11-28T07:16:51.995Z","etag":null,"topics":["c","can","can-bus","library","obd","obd-ii","obd2","parser","python","schema"],"latest_commit_sha":null,"homepage":"","language":"C","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/XevoInc.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2017-08-25T20:02:46.000Z","updated_at":"2020-06-29T23:14:58.000Z","dependencies_parsed_at":null,"dependency_job_id":"9ccea05f-2ce9-4573-b4cf-6dc7aa425883","html_url":"https://github.com/XevoInc/yobd","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/XevoInc/yobd","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/XevoInc%2Fyobd","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/XevoInc%2Fyobd/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/XevoInc%2Fyobd/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/XevoInc%2Fyobd/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/XevoInc","download_url":"https://codeload.github.com/XevoInc/yobd/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/XevoInc%2Fyobd/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":34163253,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-06-10T02:00:07.152Z","response_time":89,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["c","can","can-bus","library","obd","obd-ii","obd2","parser","python","schema"],"created_at":"2024-11-13T02:07:58.473Z","updated_at":"2026-06-10T17:31:37.891Z","avatar_url":"https://github.com/XevoInc.png","language":"C","funding_links":[],"categories":[],"sub_categories":[],"readme":"# yobd\nyobd is a standalone library for schema-driven data translation from CAN to OBD\nII.  The reason this is necessary is that the OBD II protocol is highly\nbitpacked, so each message is interpreted a little bit differently. In addition,\nonly a subset of the possible OBD II data (PIDs) are publicly available, so each\ncar make/model can have other PIDs, each intepreted differently. This calls for\na generalized schema for describing such messages, and a generalized runtime for\nevaluating such messages and passing them on in easily consumable form (e.g.\nJSON or similar hierarchical, string-based format).  Without such a schema, one\nneeds to either hardcode or do code generation (such as what `OpenXC` does),\nboth of which have significant issues.\n\nThere are a few parts to yobd:\n\n- A YAML schema for describing OBD II PIDs. YAML is chosen because it is easy\n  for humans to write and read.\n- A C parser for converting the YAML schema into an in-memory PID representation\n  that can be efficiently evaluated at runtime.\n- A C interpreter that can take an in-memory PID representation and produce\n  easily-consumable, hierarchical data for applications. Notably, this\n  intepreter doesn't know anything about schemas; it just uses the in-memory\n  representation.\n- A Python schema validator to check a YAML schema at compile-time. This parser\n  is used as part of the build but is never deployed. The idea is that the\n  runtime components (the parser and inteprereter) can safely assume that all\n  schemas it sees are valid. Using this tool, we can massively simplify the C\n  parser (by skipping lots of error checking) and catch mistakes at compile-time\n  rather than at runtime.\n\n## Build\n\n### Prerequisites\n- meson: `pip3 install meson`\n\n- ninja: `pip3 install ninja`\n\n- (optional, for developers) `clang-tidy`. This is used for static analysis and\n  is thus a build but not runtime requirement.\n\n- (optional, for developers) Python requirements, as documented in\n  `dev-requirements.txt`. These are some build-time tools that are not required\n  for runtime. They are used for sanity-checking OBD II schemas. You can install\n  them from your distro or via `pip3 install -r dev-requirements.txt`.\n\n### Custom requirements building\n\nNote that, if any of your build prerequisites do not come from standard distro\npackaging, you will need also need to tweak the following env vars:\n\n- `PKG_CONFIG_PATH` needs to be set only when you run `meson` and doesn't matter\n  after that. It should be set to the directory containing the `.pc` files used\n  by the prerequisite you built.\n- `LD_LIBRARY_PATH` needs to be set whenever you actually load the yobd\n  library, such as when you run the unit tests with `ninja test`. It should be\n  set to the directory containing the built prerequisite libraries.\n\n### Debian unstable\n\nTo get your build requirements, you just need to run:\n\n```\nsudo apt-get -y install meson ninja-build\n```\n\n### Fedora 24 and 25 packages\n\nTo get your build requirements, you just need to run:\n\n```\nsudo dnf -y install meson ninja-build\n```\n\nNote that on fedora you will substitute the `ninja-build` command instead of\nthe `ninja` command for the various build commands on this page.\n\n## Instructions\n\n### First time builds\n\n```\nmkdir build\ncd build\nmeson ..\nninja\n```\n\n### Rebuilding\n\nTo rebuild at any time, you just need to rerun the last `ninja` command:\n\n```\nninja\n```\n\nYou can run this command from any directory you like. For instance, to rebuild\nfrom the top level directory, use the ninja `-C` option to point ninja at the\nbuild directory:\n\n```\nninja -C build\n```\n\nAlso, there is nothing special about the directory name `build`. If you prefer a\ndifferent name than `build`, this is not a problem, and you can have different\nbuild directories with different configurations; meson and ninja don't care.\n\n### Compiling with clang instead of gcc\n\nIf you want to use clang, it's the usual meson methodology:\n\n```\nmkdir build.clang\ncd !$\nCC=clang meson ..\nninja\n```\n\n### Running tests\nDo this to run unit tests:\n```\nninja test\n```\nor\n```\nmesontest --setup valgrind\n# ninja test actually calls mesontest\n```\n\nBefore checking in, you should run:\n```\nninja check\n```\n\nWhich runs unit tests, does static analysis, and anything else that is deemed\n\"good hygiene\" prior to checking in. This list may change over time, but the\n`check` target should remain valid.\n\n### Static analysis\nStatic analysis uses `clang-tidy` and can be run with:\n```\nninja clang-tidy\n```\n\nNote that you will need to install the `clang-tidy` tool, either via distro or\nsome other method.\n\n### Generating documentation\nCode documentation is handled by `doxygen` and can be built with:\n```\nninja docs\n```\n\n# Documentation\n\nSee the [doc](doc) folder for more documentation.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fxevoinc%2Fyobd","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fxevoinc%2Fyobd","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fxevoinc%2Fyobd/lists"}