{"id":38881775,"url":"https://github.com/djarek/canary","last_synced_at":"2026-01-17T14:43:12.333Z","repository":{"id":48787960,"uuid":"236224260","full_name":"djarek/canary","owner":"djarek","description":"A lightweight implementation of Linux SocketCAN bindings for ASIO/Boost.ASIO","archived":false,"fork":false,"pushed_at":"2022-07-31T00:50:28.000Z","size":69,"stargazers_count":27,"open_issues_count":4,"forks_count":4,"subscribers_count":3,"default_branch":"master","last_synced_at":"2026-01-13T22:14:25.488Z","etag":null,"topics":["asio","boost-asio","can","can-bus","cpp11","socketcan"],"latest_commit_sha":null,"homepage":null,"language":"C++","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"bsl-1.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/djarek.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE_1_0.txt","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2020-01-25T20:16:10.000Z","updated_at":"2025-12-25T23:17:33.000Z","dependencies_parsed_at":"2022-09-24T16:12:48.352Z","dependency_job_id":null,"html_url":"https://github.com/djarek/canary","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/djarek/canary","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/djarek%2Fcanary","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/djarek%2Fcanary/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/djarek%2Fcanary/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/djarek%2Fcanary/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/djarek","download_url":"https://codeload.github.com/djarek/canary/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/djarek%2Fcanary/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28510674,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-17T13:38:16.342Z","status":"ssl_error","status_checked_at":"2026-01-17T13:37:44.060Z","response_time":85,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"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":["asio","boost-asio","can","can-bus","cpp11","socketcan"],"created_at":"2026-01-17T14:43:12.256Z","updated_at":"2026-01-17T14:43:12.319Z","avatar_url":"https://github.com/djarek.png","language":"C++","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Canary\n\nLanguage|Build|Coverage|License|Documentation|\n|-------|-----|--------|-------|-------------|\n|[![Standard](https://img.shields.io/badge/C%2B%2B-11-blue.svg)](https://en.wikipedia.org/wiki/C%2B%2B#Standardization) | [![Build Status](https://dev.azure.com/damianjarek93/canary/_apis/build/status/djarek.canary?branchName=master)](https://dev.azure.com/damianjarek93/canary/_build/latest?definitionId=11\u0026branchName=master) | [![codecov](https://codecov.io/gh/djarek/canary/branch/master/graph/badge.svg)](https://codecov.io/gh/djarek/canary) | [![License](https://img.shields.io/badge/license-BSL%201.0-blue.svg)](https://opensource.org/licenses/BSL-1.0) | [![Documentation](https://img.shields.io/badge/documentation-master-brightgreen.svg)](doc/generated/standardese_entities.md)\n\n## Introduction\n\n**Canary** is a thin, C++11 wrapper over the SocketCAN API in Linux, which\nenables communication over [CAN bus](https://en.wikipedia.org/wiki/CAN_bus)\nusing idioms from the [Boost.ASIO](https://github.com/boostorg/asio) and\n[ASIO](https://github.com/chriskohlhoff/asio) libraries.\n\n## Dependencies\n\n**Canary** depends only on ASIO and the C++11 standard library. By default, it\nuses Boost.ASIO, but can be configured to use standalone ASIO. The\n`CANARY_STANDALONE_ASIO` macro makes the library depend only on standalone ASIO.\n\nRunning tests requires lightweight test facilities from Boost.Core (which is a\nheader only library).\n\n## Installation\n**Canary** is header-only, so you only need to add the include directory to the\ninclude paths in your build system. An `install` target is available in CMake\nwhich will install the headers and a CMake `find_package` configuration script\nfor easy consumption in projects built with CMake:\n```bash\nmkdir build\ncd build\ncmake ..\nmake install\n```\n\nAfter installation, a project built with CMake can consume the library using\n`find_package`:\n```cmake\nfind_package(canary REQUIRED)\ntarget_link_libraries(my_target PUBLIC canary::canary)\n```\n\n## Running tests\nTests require the existence of 2 virtual CAN interfaces - `vcan0` and `vcan1`,\nwhich can be created with the `create_vcans.sh` script:\n```\nsudo tools/create_vcans.sh vcan0 vcan1\n```\n\nTests can be run using the standard `test` target generated by CMake:\n```bash\nmkdir build\ncd build\ncmake ..\nmake test\n```\n\n## Supported protocols\n\n### Raw CAN frames\nCanary exposes the raw CAN frame socket API from Linux's SocketCAN module.\nWhen using this API, data read from the socket will contain a frame header at\nthe start. Users can parse it on their own, or use the provided `frame_header`\nclass, which is trivially copyable and can be filled by reading from the socket\ndirectly. Note that the header is not an exact CAN frame header - the underlying\nAPI does not expose lower-level protocol detail, such as CRCs.\n\n### ISO-TP kernel module\nCanary provides a wrapper for the in-kernel ISO 15765-2(also known as ISO-TP)\nimplementation which is loadable as a kernel module, [see more\ndetails](https://github.com/hartkopp/can-isotp). When using this transport-layer\nprotocol, a socket is bound to a CAN ID pair (rx, tx), often referred to as\n\"ISO-TP addresses\". If more addresses are to be used, a socket per (rx, tx) pair\nmust be constructed.\n\nNote: The ISO-TP kernel module must either be loaded prior to creating an ISO-TP\nsocket, or the module must be configured to be loaded on socket creation attempt\n(using `depmod -A` after installation)\n\n## Documentation\n- Examples (TODO)\n- [API Reference - entities](doc/generated/standardese_entities.md)\n- [API Reference - files](doc/generated/standardese_files.md)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdjarek%2Fcanary","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdjarek%2Fcanary","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdjarek%2Fcanary/lists"}