DRAFT
- FNSDKEXT-13Getting issue details... STATUS
- FNSDKEXT-82Getting issue details... STATUS
- FNSDKEXT-88Getting issue details... STATUS
Definitions / Abbreviations / Acronyms
Term | Description |
---|---|
API | Application Programming Interface |
AAR | Android Archive |
BLE | Bluetooth Low-Energy |
SDK | Software Development Kit |
OS | Operating System |
USB | Universal Serial Bus |
UWP | Universal Windows Platform |
Purpose
The FN VictoR SDK shall serve as the core software development tool that allows for the creation of applications that use FN VictoR devices. The SDK will achieve this goal by providing developers with a series of libraries that handle the bulk of the work required to both communicate and interact with a device.
The Communications Libraries will provide operating system and communications protocol specific implementations of the SDK’s standardized communications interface designed for use with the VictoR Core Library.
The VictoR Core Library will provide a standardized, user-friendly set of interfaces for interacting with the various services within an FN VictoR device without needing to reference an ICD to figure out the low-level details required for those interactions. Note that the Communications Libraries are designed for use in conjunction with the VictoR Core Library for convenience, but are still usable for direct interaction with a device. For example, if new services are added to the device, but corresponding interfaces for that service have not yet been added to the VictoR Core Library, then, combined with details on how to interact with the service (i.e. from the ICD), interaction with that service can still be achieved.
The diagram in figure 1 below illustrates the high-level architecture of the SDK and its relationship to applications that develop with it. Blocks highlighted in white and blue indicate implementations that Unity will provide. Blocks highlighted in grey are presented for illustration purposes only, and will not be implemented by Unity.
Project Structure
The SDK will be composed of multiple libraries, each targeting a different language and/or project type combination determined by their specific use case. All projects will be contained within a single repository.
VictoR Core Library
Language: C#
Project Type: .NET Standard 2.0 Library
Reason: A .NET Standard 2.0 library allows for easy integration with cross-platform development frameworks (including Unity and Xamarin) that target the .NET API.
Windows Communications Library
Language: C#
Project Type: UWP Library
Reason: A UWP library provides access to the Windows SDK’s BLE libraries, and still supports integration into Unity (or other .NET projects).
Note: A Unity project that uses this library must target UWP. Windows applications can target UWP or standard Win32.
Android Communications Library
Language: Java
Project Type: AAR Library
Reason: Java is the only language that the Android SDK supports for access to its BLE libraries. A Java-based AAR library can be integrated with Unity and bound to C# using Unity provided helper classes.
Library Breakdown
VictoR Core
The VictoR Core Library will provide a standardized, user-friendly set of interfaces for interacting with the services within an FN VictoR device. It will also provide a logging system and any other miscellaneous helper functions, utilities, or base classes/templates that might be useful to developers using the SDK.
The VictoR Core library will contain the following elements:
Abstract VictoR Communications Interface: The common base interface that establishes the “contract” that service classes can expect communications implementations to adhere to.
Base Service Interface: The common base class that will house information relevant to every service specific implementation such as common UUID bases and references to communications interfaces and provide functionality shared by all service implementations.
Service Interface Implementations:
Device Information Service Interface: Provides an interface to the Device Information Service, which provides device system related information.
Device Configuration Service Interface: Provides an interface to the Device Configuration Service, which handles device settings and operational behavior.
Object Transfer Service Interface: Provides an interface to the Object Transfer Service, which allows transferring of video and snapshot images as well as vision system model files.
Logging System: Designed to assist in the development, debugging, and monitoring of interactions between both the end-user application and the SDK, and the SDK and the FN VictoR device.
Figure 2 below outlines the core elements of the VictoR Core Library and how each class relates to one another. Note that this diagram is not an exhaustive representation of the members and methods of each class. It is merely a subset meant to illustrate the interaction and relationships.
VictoR Windows Communications
The VictoR Windows Communications Library will provide Windows OS-specific implementations of the communications interface.
The following implementations will be provided:
BLE Communications Interface
USB Communications Interface
VictoR Android Communications
The VictoR Android Communications Library will provide Android OS-specific implementations of the communications interface.
The following implementations will be provided:
BLE Communications Interface
USB Communications Interface (stretch goal - not guaranteed)
Library Testing
SDK libraries will be tested with external testing applications that will load the libraries and provide/perform unit testing on the APIs provided by the libraries.
The testing applications will be written in the same language as the libraries being tested for ease of loading/integration.
C# testing applications will use the xUnit.net testing framework.
Java testing applications will use the JUnit5 testing framework.
Test application code will be contained within the respective library project that they are testing.
Unity Package
In addition to the SDK, a Unity Package will be provided that serves as a reference implementation of an application that integrates the SDK. This package also serves as a starting platform from which Unity projects that want to utilize the SDK for FN VictoR device communication can be built.
Supported Build Types: UWP and Android
VictoR Core Library integration
C#
Windows Communications Library integration
C#
Android Communications Library integration
Java/C# Binding
Reference implementation for Android applications
A README will be included outlining the general purpose of each library
A Samples folder will be included to house any example scripts, prefabs, and game objects built to demonstrate the FN SDK’s functionality. Game Objects will utilize scripts implementing various features from the VictoR Core Library to provide example use cases. Fields within these scripts will be exposed to enable users to make their own modifications.
A Tests folder will be included to house any test scripts built in support of the FN SDK
A Documentation folder will be included to house any relevant documents dealing with the FN SDK
A CHANGELOG itemizing the changes made to the package in reverse chronological order will be included
A package manifest will be included to enable loading the package into a Unity project and provide useful information regarding the nature of the package, such as the version number and the Unity Editor version compatibility
A Third Party Notice will be included to indicate any third party libraries used by the FN SDK
A License file will be included to indicate any relevant licensing information dealing with the FN SDK and any third party libraries used
Unity Package Testing
The Unity Package will be tested using Trilleon. Testing will provide/perform unit testing of the samples (scripts, prefabs, and game objects) provided to demonstrate the FN SDK’s functionality and end-to-end integration testing with provided FN VictoR devices.