{"id":21314466,"url":"https://github.com/polyconseil/caneton","last_synced_at":"2025-06-28T01:34:39.161Z","repository":{"id":62560783,"uuid":"45405759","full_name":"Polyconseil/caneton","owner":"Polyconseil","description":"Offspring of libcanardbc to decode CAN messages from Python code or CLI","archived":false,"fork":false,"pushed_at":"2019-09-06T09:13:36.000Z","size":46,"stargazers_count":20,"open_issues_count":0,"forks_count":3,"subscribers_count":44,"default_branch":"master","last_synced_at":"2024-08-09T15:30:07.714Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Python","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/Polyconseil.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}},"created_at":"2015-11-02T16:12:17.000Z","updated_at":"2021-08-30T08:16:06.000Z","dependencies_parsed_at":"2022-11-03T14:45:21.912Z","dependency_job_id":null,"html_url":"https://github.com/Polyconseil/caneton","commit_stats":null,"previous_names":[],"tags_count":14,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Polyconseil%2Fcaneton","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Polyconseil%2Fcaneton/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Polyconseil%2Fcaneton/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Polyconseil%2Fcaneton/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Polyconseil","download_url":"https://codeload.github.com/Polyconseil/caneton/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":225778840,"owners_count":17522710,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","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":[],"created_at":"2024-11-21T18:13:10.551Z","updated_at":"2024-11-21T18:13:11.246Z","avatar_url":"https://github.com/Polyconseil.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"Caneton\n=======\n\nPython 2/3 project under BSD license to decode messages (or frames) from a CAN bus.\n\nDBC in JSON\n-----------\n\nBefore decoding a message, you need to convert the DBC file which describes the format of the data on the bus in JSON. The project [libcanardbc](https://github.com/Polyconseil/libcanardbc) can\nconvert a CAN DBC file to JSON suitable for caneton project.\n\nUse\n---\n\nTo decode a CAN message, you must provide the message ID, the message data\n(payload) and the DBC file (in JSON).\n\nCaneton can be used as Python module:\n\n```python\nimport binascii\nimport json\n\nimport caneton\n\nwith open('dbc.json') as dbc_file:\n    dbc_json = json.loads(dbc_file.read())\n    message_data = binascii.unhexlify('01780178010000')\n    message = caneton.message_decode(message_id=0x701,\n        message_length=len(message_data), message_data=message_data,\n        dbc_json=dbc_json)\n    print(message)\n```\n\nor as CLI tool to decode CAN message:\n\n`$ caneton-decode dbc.json 0x701 0x01780178010000`\n\n\nTests\n-----\n\nTo run the unit tests:\n\n`$ nosetests`\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpolyconseil%2Fcaneton","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpolyconseil%2Fcaneton","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpolyconseil%2Fcaneton/lists"}