{"id":15014230,"url":"https://github.com/shisx/protocol-jt808","last_synced_at":"2025-09-13T08:32:49.494Z","repository":{"id":229992199,"uuid":"778170591","full_name":"shisx/protocol-jt808","owner":"shisx","description":"支持JT808-2019版本协议的编解码","archived":false,"fork":false,"pushed_at":"2024-03-27T08:17:12.000Z","size":3079,"stargazers_count":4,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-03-22T12:42:32.097Z","etag":null,"topics":["java","jt808","netty"],"latest_commit_sha":null,"homepage":"","language":"Java","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/shisx.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":"2024-03-27T08:05:34.000Z","updated_at":"2025-03-19T09:26:35.000Z","dependencies_parsed_at":null,"dependency_job_id":"7f665f9b-3606-41a7-931c-70a47834e982","html_url":"https://github.com/shisx/protocol-jt808","commit_stats":{"total_commits":2,"total_committers":2,"mean_commits":1.0,"dds":0.5,"last_synced_commit":"04e2c27a2d047a9fe7c325ef989c0090f27f1cc4"},"previous_names":["shisx/protocol-jt808"],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/shisx/protocol-jt808","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/shisx%2Fprotocol-jt808","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/shisx%2Fprotocol-jt808/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/shisx%2Fprotocol-jt808/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/shisx%2Fprotocol-jt808/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/shisx","download_url":"https://codeload.github.com/shisx/protocol-jt808/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/shisx%2Fprotocol-jt808/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":274938476,"owners_count":25377550,"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","status":"online","status_checked_at":"2025-09-13T02:00:10.085Z","response_time":70,"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":["java","jt808","netty"],"created_at":"2024-09-24T19:45:21.084Z","updated_at":"2025-09-13T08:32:49.466Z","avatar_url":"https://github.com/shisx.png","language":"Java","funding_links":[],"categories":[],"sub_categories":[],"readme":"# protocol-jt808\n\n`protocol-jt808` 是一个实现了对《JT/T808 2019道路运输车辆卫星定位系统终端通讯协议及数据格式》数据进行解析与拼接的工具库。\n\n* 基于`JDK8`,`Netty`\n\n# 1 使用准备\n\n## 1.1 引入依赖\n\n`Maven`\n\n```xml\n\n\u003cdependency\u003e\n    \u003cgroupId\u003ecom.shisx.protocol\u003c/groupId\u003e\n    \u003cartifactId\u003eprotocol-jt808\u003c/artifactId\u003e\n    \u003cversion\u003e1.0.0\u003c/version\u003e\n\u003c/dependency\u003e\n```\n\n## 1.2 数据解析\n\n\u003e 将字节数组解析成`JT808Message`对象\n\n```java\nclass Example {\n    public static void main(String[] args) {\n        byte[] bytes = ...;\n        JT808Message jt808Message = JT808Message.parse(bytes);\n    }\n}\n```\n\n## 1.2 数据拼装\n\n\u003e 将`JT808Message`对象转换字节数组\n\n示例：为手机号为`123456789123456789`的终端构建一个`0x8100`消息\n\n```java\nclass Example {\n    public static void main(String[] args) {\n        Msg8100 body = new Msg8100();\n        body.setAckSn((short) 1);\n        body.setResult((byte) 0);\n        body.setAuthCode(\"success\");\n\n        JT808Message.build(\"123456789123456789\", body);\n    }\n}\n```\n\n## 1.2 作为服务\n\n### 1.2.1 TCP服务\n\n启动一个TCP服务，监听客户端发送的消息，并将消息解析成[JT808Message](/src/main/java/com/shisx/protocol/jt808/message/JT808Message.java)\n对象，并进行业务处理\n\n[TcpListener](/src/main/java/com/shisx/protocol/jt808/network/TcpListener.java)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fshisx%2Fprotocol-jt808","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fshisx%2Fprotocol-jt808","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fshisx%2Fprotocol-jt808/lists"}