{"id":50251538,"url":"https://github.com/microsoft/nearobject-framework","last_synced_at":"2026-05-27T02:01:27.368Z","repository":{"id":64881512,"uuid":"576031583","full_name":"microsoft/nearobject-framework","owner":"microsoft","description":"Framework for interacting with short-range devices","archived":false,"fork":false,"pushed_at":"2023-06-20T22:46:04.000Z","size":4506,"stargazers_count":17,"open_issues_count":13,"forks_count":6,"subscribers_count":2,"default_branch":"develop","last_synced_at":"2026-05-04T18:44:12.012Z","etag":null,"topics":["c-plus-plus","cmake","cpp","fira","linux","near","nearobject","short-range","ultra-wideband","umdf","uwb","vcpkg","windows"],"latest_commit_sha":null,"homepage":"","language":"C++","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/microsoft.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":".github/CODEOWNERS","security":"SECURITY.md","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":"2022-12-08T21:15:40.000Z","updated_at":"2026-01-09T23:52:13.000Z","dependencies_parsed_at":"2022-12-16T23:17:17.639Z","dependency_job_id":null,"html_url":"https://github.com/microsoft/nearobject-framework","commit_stats":null,"previous_names":[],"tags_count":29,"template":false,"template_full_name":null,"purl":"pkg:github/microsoft/nearobject-framework","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/microsoft%2Fnearobject-framework","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/microsoft%2Fnearobject-framework/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/microsoft%2Fnearobject-framework/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/microsoft%2Fnearobject-framework/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/microsoft","download_url":"https://codeload.github.com/microsoft/nearobject-framework/tar.gz/refs/heads/develop","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/microsoft%2Fnearobject-framework/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":33534563,"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":"ssl_error","status_checked_at":"2026-05-26T15:22:15.568Z","response_time":63,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: 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":["c-plus-plus","cmake","cpp","fira","linux","near","nearobject","short-range","ultra-wideband","umdf","uwb","vcpkg","windows"],"created_at":"2026-05-27T02:01:26.490Z","updated_at":"2026-05-27T02:01:27.361Z","avatar_url":"https://github.com/microsoft.png","language":"C++","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Near Object (NO) Framework \n\n[![CI/CD](https://github.com/microsoft/nearobject-framework/actions/workflows/cicd.yml/badge.svg)](https://github.com/microsoft/nearobject-framework/actions/workflows/cicd.yml)\n[![cpp-linter](https://github.com/microsoft/nearobject-framework/actions/workflows/cpp-linter.yml/badge.svg)](https://github.com/microsoft/nearobject-framework/actions/workflows/cpp-linter.yml)\n[![Build [Official Release]](https://github.com/microsoft/nearobject-framework/actions/workflows/official-release.yml/badge.svg)](https://github.com/microsoft/nearobject-framework/actions/workflows/official-release.yml)\n\nThis project is a framework for interacting with short-range devices, providing secure location, ranging, radar, or proximity services. There is a particular focus on [IEEE 802.15.4z-2020](https://standards.ieee.org/ieee/802.15.4z/10230/) Ultra-Wideband (UWB) devices using the [Fine Ranging Consortium (FiRa)](https://www.firaconsortium.org/), however, the framework is not limited to this.\n\n## Project Structure\n\nThis project is organized to allow primary development on both Linux and Windows. Hence, [CMake](https://cmake.org/) is used as the build system generator. Consequently, there is an OS-independent source tree `lib`, and OS-dependent source trees `windows`, `linux`, etc..\n\nNote that all language feature configuration is constrained by the Windows build system since it is the most limiting factor. As such, the current C++ language version being used is C++ 20.\n\n## Coding Guidelines\n\nWhere possible, we will attempt to use primitives provided by the [C++ Standard Library](https://en.cppreference.com/w/cpp/header) for interoperability between common and OS-dependent code. The use of OS-specific primitives and libraries is reserved for scenarios where they are strictly needed (eg. calling an OS/System API), or where the highest possible performance is required and only the OS implementation can provide this.\n\nThe coding style is dictated by both `.clang-format` and `.clang-tidy` files at the root of the project. Please configure your editor to format and lint sources accordingly. Above all, ***the coding style should be kept as consistent as possible***. The exact style used is not overly important.\n\nTo help keep the code consistent, please follow these general guidelines:\n\n* **DO** use spaces instead of tabs.\n* **DON'T** prefix variable names to describe their type, scope, or visibility.\n* **DO** use `std::filesystem` for storage and UNIX path separators (`/`) where possible.\n* **DO** use complete words for variable and function names.\n* **DO** use the following table for variable naming:\n\n| Block | Style | Example |\n| ----- | ----- | -------- |\n| Types | PascalCase | `struct NearObject {};` |\n| Functions | PascalCase | `NearObject GetNearObject()` |\n| Variables | camelCase | `NearObject nearObject;` |\n| Parameters | camelCase | `void registerEventCallback(NearObjectEventCallback\u0026 eventCallback)` |\n| Namespaces | lowercase | `namespace nearobject` |\n| Public Members | PascalCase | `struct NearObject { NearObjectProperties Properties; }` |\n| Private Members | camelCase with `m_` prefix | `class NearObjectSession { uint64_t m_sessionId; }` |\n\n### Commit Signing\n\nWhile not required, it is strongly recommended to configure git with a [GNU Privacy Guard (GPG)](https://gnupg.org/) signing key. This allows GitHub to verify commits were pushed by a specific user and will show a green `Verified` status beside each verified commit. Follow these steps to configure a signing key for commit verification:\n\n1. Install the gpg tools for the target operating system (see the OS-specific `README` files for details: [Windows](./windows/README.md#2-configure-commit-signing-optional), [Linux](./linux/README.md#development-environment-setup)).\n2. [Generate a gpg key](https://docs.github.com/en/authentication/managing-commit-signature-verification/generating-a-new-gpg-key)\n3. [Add the gpg key to your github account](https://docs.github.com/en/authentication/managing-commit-signature-verification/adding-a-gpg-key-to-your-github-account)\n4. [Configure git to use the gpg key](https://docs.github.com/en/authentication/managing-commit-signature-verification/telling-git-about-your-signing-key). This link will also tell you how to use gpg signing with an ssh key. Additionally, if you wish tell git to use a type any type of signing by default, be it gpg, ssh or X.509, you need to run the following command ```git config --global commit.gpgsign true```\n\n## Development Environment Setup\n\nPre-requisites:\n\n* C++ 20 Compiler\n* CMake version \u003e= 3.16\n\n### Compiler\n\nBoth a compiler and standard C++ library supporting C++20 are required. The C++ reference pages for [C++20 core language features](https://en.cppreference.com/w/cpp/compiler_support#cpp20) and [C++20 library features](https://en.cppreference.com/w/cpp/compiler_support#C.2B.2B20_library_features) provide complete details about current compiler and library support.\n\n#### Windows\n\n[Visual Studio 2022](https://visualstudio.microsoft.com/thank-you-downloading-visual-studio/?sku=Enterprise\u0026channel=Release\u0026version=VS2022\u0026source=VSLandingPage\u0026cid=2030\u0026passive=false) generally satisfies the requirements, however, the full integrated development environment (IDE) is not needed unless also building the [simulator driver](./windows/drivers/uwb/simulator/README.md). A much leaner alternative for those using other editors such as Visual Studio Code can instead install [Visual Studio Build Tools](https://visualstudio.microsoft.com/downloads/#build-tools-for-visual-studio-2022). The build tools come with a C++ compatible compiler and standard library. Detailed development environment setup instructions can be found in the Windows [`README`](/windows/README.md).\n\n#### Linux\n\ng++ or llvm/clang are suitable, however, some care must be taken to obtain a compatible standard library. A known, working environment is ubuntu 22.04 (jammy) with clang 14.0.0 and LLVM 14.0.0. Both are both provided by the official ubuntu package repository so can be installed using `apt`. Detailed development environment setup instructions can be found in the Linux [`README`](/linux/README.md).\n\n### CMake\n\nCMake may be installed in any form, as long as the version meets the minimum. One popular way of installing it on Windows is to use [Chocolately](https://chocolatey.org/install) with `choco install -y cmake`. On Linux, all standard package managers provide a cmake package (eg. `apt-get install -y cmake`, `yum install -y cmake`, etc.).\n\nTo bootstrap the build environment, instruct CMake to generate the build files. It is strongly recommended to do this in a directory that is separate from the source; this allows one to easily destroy and recreate the build environment without affecting the checked-out source and changes in progress. Typically, a new directory called `build` at the top-level project tree is used for this purpose:\n\n```Shell\ngit clone git@github.com:microsoft/nearobject-framework.git\ncd nearobject-framework\ncmake -DCMAKE_EXPORT_COMPILE_COMMANDS:BOOL=TRUE -Bbuild \ncmake --build build\n```\n\n#### CMake with Visual Studio Code\n\nAlternatively, Microsoft provides a [CMake Tools](https://marketplace.visualstudio.com/items?itemName=ms-vscode.cmake-tools) Visual Studio Code extension that automates this process. After installing the extension and cloning the repository in VSCode, hit `Ctrl+Shift+P`, then find the command `CMake: Delete Cache and Reconfigure`. This will generate the build configuration in a `build` folder at the top-level of the source tree. Once done, you can build the `ALL` target (default) with the `CMake: Build` command again, `Ctrl+Shift+P`, type cmake, find the command).\n\nIn general, you set a build target and variant, then use the `CMake: Build` command to build incrementally. All build targets can be found in the `CMake: Project Outline` activity bar, but a list of them will also be shown when invoking actions that involve targets.\n\nYou may need to enable unsupported presets versions. To do this, go to the Preferences UI -\u003e search presets -\u003e enable the option \"CMake: Allow Unsupported Presets Versions\"\n\n### Source Dependencies\n\nSource dependencies can be satisfied in two (2) ways:\n\n1. From a URL using the CMake [`FetchContent`](https://cmake.org/cmake/help/latest/module/FetchContent.html) module (default).\n2. From the [`vcpkg`](https://github.com/microsoft/vcpkg) package manager.\n\nThe `FetchContent` method works out of the box with no setup required, so is the default method. The `vcpkg` method requires one-time bootstrapping, described below.\n\n#### vcpkg\n\nThe `vcpkg` source dependency method is configurable through the CMake build option `NOF_USE_VCPKG`. This option defaults to `OFF` since `FetchContent` is much faster for development loop tasks. Set this to `ON` to use `vcpkg` for source dependency resolution (eg. via command line argument such as `cmake -DNOF_USE_VCPKG:BOOL=ON .`, or by editing the CMake cache directly). Note that this is a cache setting, thus it is sticky; once set, the chosen setting will be stored in the CMake variable cache (`CMakeCache.txt`) and so it must be explicitly reset to `OFF` when no longer desired.\n\n`vcpkg` has extra dependencies on Linux including curl, zip, unzip, tar, and pkg-config. These can be installed on Debian or Ubuntu distributions using the following command:\n\n```bash\nsudo apt-get install curl zip unzip tar pkg-config\n```\n\nOnce configured in the build, the `vcpkg` binary must be made available. This can be installed globally for the entire system, locally for the current user, or directly in the project workspace.\n\nFor project-direct installation, the project has been configured to include `vcpkg` source as a sub-module @ `./vcpkg` and attempt to automatically bootstrap it. If this fails for some reason, the following steps can be taken to manually bootstrap `vcpkg`:\n\nThe `vcpkg` submodule must first be initialized and updated to sync it to the fixed, known working release tag, which is accomplished by issuing the following git command at the project root:\n\n```Shell\ngit submodule update --init --recursive\n```\n\nNext, run the OS-specific bootstapping script (`./vcpkg/bootstrap-vcpkg.[bat|sh]`). This should produce the binary `./vcpkg/vcpkg`.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmicrosoft%2Fnearobject-framework","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmicrosoft%2Fnearobject-framework","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmicrosoft%2Fnearobject-framework/lists"}