Skip to content

How to use

Cédric Vautrain edited this page Sep 14, 2022 · 17 revisions

Contents

Starting configuration

Config file

In the "OGREE 3D_Data" folder, we can find "config.json".

Name Value (strings) Comment
verbose true or false
fullscreen true or false
cachePath Path of the cache directory Will store log.txt and fbx files
cacheLimitMo Limit size of the cache directory
cliPort The port use for TCP connection to the CLI
textures List of name:path can be a local file or an url
colors List of name:value Values, #RRGGBB or literal colors are listed here
api_url url
api_token id token for api

Specific colors values

Some colors values have a direct impact for the 3D client UI

Value Comment
selection Color for a rack or a device when it's selected
edit Color for a rack or a device when it's in edit mode
focus Color for a rack or a device when it's in focus mode
highlight Color for a rack or a device when it's highlighted
usableZone Default color for usable zones in rooms
reservedZone Default color for reserved zones in rooms
technicalZone Default color for technical zones in rooms

Default config file

{
    "verbose": "true",
    "fullscreen": "false",
    "cachePath": "C:/",
    "cacheLimitMo": "100",
    "cliPort": "5500",
    "textures": {
        "perf22": "https://raw.githubusercontent.com/ditrit/OGREE-3D/master/Assets/Resources/Textures/TilePerf22.png",
        "perf29": "https://raw.githubusercontent.com/ditrit/OGREE-3D/master/Assets/Resources/Textures/TilePerf29.png"
    },
    "colors": {
        "selection": "#21FF00",
        "edit": "#C900FF",
        "focus": "#FF9F00",
        "highlight": "#00D5FF",

        "usableZone": "#DBEDF2",
        "reservedZone": "#F2F2F2",
        "technicalZone": "#EBF2DE"
    },

    "api_url": "",
    "api_token": ""
}

Command line arguments

Each config file parameter can be overrided with a command line argument

--verbose [true|false]
--fullscreen [true|false]
--apiUrl[url]
--apiToken[token]

You can also start the client with an .ocli file:

--file [path to ocli file to load]

Populate objects

To populate object, you can either load a .ocli file with CLI commands written in it or type them directly on the build-in CLI.
Details about the CLI langage: https://github.com/ditrit/OGREE-3D/wiki/CLI-langage.

When you load a .ocli file, all commands in this file will be put at the end of the current file. If you want to modify an object, you should create and modify it in the same .ocli file.

Object hierarchy

We have to respect this object hierarchy in order to populate objects.

Tenant
 |_ Site
     |_ Building
         |_ Room
             |_Rack
             |  |_ Device
             |  |   |_ Device
             |  |   |   |_ Device
             |  |   |   |_ Device
             |  |   |_ ...
             |  |_ Device
             |  |_ Group
             |  |_ ...
             |_ ...
             |_ Group                      \
             |_ Corridor                   | 
             |_ PowerPanel*                | NO CHILDREN
             |_ AirConditioningSystem*     |
             |_ Cabinet*                   /
  • Not yet implemented
Clone this wiki locally