README.md 2.59 KB
Newer Older
Nathan Chambron's avatar
Nathan Chambron committed
*This repository is part of the outcomes of the Specialist Task Force 620 focusing on the authoring of a World Representation as part of the ETSI ISG Augmented Reality Framework architecture (https://www.etsi.org/deliver/etsi_gs/ARF/001_099/003/01.01.01_60/gs_ARF003v010101p.pdf).*
*The set of the World Representation authoring components includes:*

*•	The C++ and C# source code for servers and clients  generated from OpenAPI available here (https://forge.etsi.org/rep/arf/arf005)*

*•	A Unity plugin and a Unity editor for authoring and accessing a World Representation hosted on a World Storage server.*

*All these components are available under the ETSI Labs group “World Storage API Helpers”: https://labs.etsi.org/rep/arf/world-storage-api-helpers*

Nathan Chambron's avatar
Nathan Chambron committed
*If you wish to contribute to this project or any other projects in the context of the [ETSI ISG Augmented Reality Framework architecture](https://www.etsi.org/committee/1420-arf), please refer to the ["How to get involved in an ISG" section on the ETSI website](https://www.etsi.org/how-to-get-involved-in-an-isg)*

Nathan Chambron's avatar
Nathan Chambron committed
---

u15767's avatar
u15767 committed
# Description

This is a small project generating the C# client code and DLLs for the ISG ARF World Storage.

# How to checkout

This project contains a submodule. This submodule contains the OpenAPI specification of the ISG ARF World Storage. To correctly compile the project you also need to checkout the submodule. See git submodules (https://git-scm.com/book/en/v2/Git-Tools-Submodules) for more information.

The simplest way to check out the project including the submodule is to use the following command:

    git clone --recurse-submodules https://labs.etsi.org/rep/arf/world-storage-api-helpers/world-storage-csharp-client.git

# How to update the API specification

The referenced submodule contains the OpenAPI specification of the ISG ARF World Storage. To checkout the newest version of it use the following commands:

Sylvain Renault's avatar
Sylvain Renault committed
    cd openapi
u15767's avatar
u15767 committed

Sylvain Renault's avatar
Sylvain Renault committed
# Installing NSwag

    npm install nswag -g

You can check the version with

    npx nswag version

u15767's avatar
u15767 committed
# Code Generation

To generate the code and the DLLs use the following commands:
u15767's avatar
u15767 committed

Sylvain Renault's avatar
Sylvain Renault committed
    npx nswag run WorldStorageNSwag.json
    npx nswag run WorldAnalysisNSwag.json

The generated C# modules (one per definition file) are then contained in the folder `client/csharp-nswag`.

# How to proceed then?

Copy the cs file(s) to your CSharp project or Unity asset folder

## Unity

Add the NewtonSoft package:
"com.unity.nuget.newtonsoft-json": "3.2.1",

Change the Unity prefs to use the NET Framework (not only 2.1)

Add a file "csc.rsp":
-r:System.ComponentModel.DataAnnotations.dll
u15767's avatar
u15767 committed