{"id":44332395,"url":"https://github.com/bringauto/internal-client-cpp","last_synced_at":"2026-02-11T10:09:57.305Z","repository":{"id":216114962,"uuid":"731221814","full_name":"bringauto/internal-client-cpp","owner":"bringauto","description":"Fleet Protocol Internal Client C and C++ implementation","archived":false,"fork":false,"pushed_at":"2025-10-17T18:59:19.000Z","size":221,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-10-18T20:58:18.231Z","etag":null,"topics":["fleet-protocol"],"latest_commit_sha":null,"homepage":"","language":"C++","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"lgpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/bringauto.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,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2023-12-13T15:47:21.000Z","updated_at":"2025-10-17T18:56:57.000Z","dependencies_parsed_at":"2024-04-19T09:47:30.846Z","dependency_job_id":"aa611c66-9565-4a40-ac42-bcbaa7d97849","html_url":"https://github.com/bringauto/internal-client-cpp","commit_stats":null,"previous_names":["bringauto/internal-client-cpp"],"tags_count":6,"template":false,"template_full_name":null,"purl":"pkg:github/bringauto/internal-client-cpp","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bringauto%2Finternal-client-cpp","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bringauto%2Finternal-client-cpp/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bringauto%2Finternal-client-cpp/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bringauto%2Finternal-client-cpp/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/bringauto","download_url":"https://codeload.github.com/bringauto/internal-client-cpp/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bringauto%2Finternal-client-cpp/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29331747,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-11T06:13:03.264Z","status":"ssl_error","status_checked_at":"2026-02-11T06:12:55.843Z","response_time":97,"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":["fleet-protocol"],"created_at":"2026-02-11T10:09:56.663Z","updated_at":"2026-02-11T10:09:57.285Z","avatar_url":"https://github.com/bringauto.png","language":"C++","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Internal Client\n\nImplementation of Internal client library for fleet protocol v2 as described\n[here](https://docs.google.com/document/d/19h2yEh3DzIizKZc-iHWpUrQIrLyop7FQUBzUi_K9LWY/view).  \nAPI of this implementation is based on ANSI C api proposed in fleet protocol internal client [header file](https://gitlab.bringauto.com/bring-auto/fleet-protocol-v2/fleet-protocol/-/blob/master/lib/module_api/include/internal_client/internal_client.h).\n\n\n## Requirements\n\n- CMLib\n- CMake [\u003e= 3.25] \n\n## Usage\n\u003eExample usage can be seen in `examples` directory.\n\n\n### Client initialization\nFirst you need to initialize device and context:\n```c++\nstruct device_identification device { \u003cmodule_num\u003e, \u003cdevice_type\u003e, \u003cdevice_role\u003e, \u003cdevice_name\u003e, \u003cpriority\u003e};\nvoid *context {};\n```\nThen create connection to an Internal server:\n```c++\ninit_connection(\u0026context, \"127.0.0.1\", 8888, device)\n```\n\nThe return code must be checked to find out, if an error occurred or the program can continue.\nIf the connection was successful, context will be initialized.\n\n### Sending and receiving data\nAfter connection was established with server, device status can be sent. This is done by using `send_status` method:\n```c++\nsend_status(context, binary_payload, 30)\n```\nClient will try to send status with provided binary payload to server, then will wait for a command.\n\nThe timeout given to send_status is the maximum time for sending and for receiving, therefore the maximum time this function can take is `2*timeout`.\n\nIf no error occurs during the communication and a response with a command is received, it can be obtained using:\n```c++\nget_command(context, \u0026command_buffer)\n```\nThe command_buffer must be initialized before use. \n1. If the data pointer is not allocated, it will allocate it.\n2. If the data pointer is allocated, but only for not sufficient size. The pointer will be reallocated\n3. Command data will be copied into command_buffer data pointer and the size_in_bytes will be set accordingly\n\nIf the client was disconnected by the server, it will attempt to reconnect once.\n\n### Destroying client\nAfter client is no longer needed, or an error occurred, it needs to be destroyed using:\n```c++\ndestroy_connection(\u0026context)\n```\n\n## CMake arguments\n* BRINGAUTO_SAMPLES - configure examples\n* BRINGAUTO_INSTALL - enable install\n* BRINGAUTO_PACKAGE - Enable package generation\n* BRINGAUTO_SYSTEM_DEP - Enable system dependencies, so they won't be installed with CMLib\n  * If this option is used, all library requirements must be installed manually\n  * Library requirements:\n    * protobuf [= 3.21.12]\n  \n## Install\nTo install, use the following commands:\n```shell\n$ mkdir _build \u0026\u0026 cd _build\n$ cmake -DBRINGAUTO_INSTALL=ON -DCMLIB_DIR=\u003cpath_to_cmlib\u003e ..\n$ make install\n```\n\n## Package\nTo generate packages, use the following commands:\n```shell\n$ mkdir _build \u0026\u0026 cd _build\n$ cmake -DBRINGAUTO_INSTALL=ON -DBRINGAUTO_PACKAGE=ON -DCMLIB_DIR=\u003cpath_to_cmlib\u003e ..\n$ cpack\n```\n\n## Include library\nAfter the library is installed, it can be included in a project by using the following lines in CMakeLists.txt. ([Fleet protocol](https://github.com/bringauto/fleet-protocol) headers are also required)\n```cmake\nFIND_PACKAGE(internal-client-shared REQUIRED)\nFIND_PACKAGE(fleet-protocol-interface REQUIRED)\nTARGET_LINK_LIBRARIES(\u003ctarget\u003e\n        PUBLIC\n        internal-client-shared::internal-client-shared\n        fleet-protocol-interface::internal-client-interface)\n```\n\nAnd then include the header file `internal_client.h` to the source code.\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbringauto%2Finternal-client-cpp","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbringauto%2Finternal-client-cpp","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbringauto%2Finternal-client-cpp/lists"}