Skip to main content
FW version: Stable

Filesystem

Items in YOS are organized in tree-topology structure. This structure is presented as a virtual filesystem and provides access to the device's data model. Idea of filesystem is very similar to Linux operating system, where almost everything is represented by file or directory. YOS filesystem has several item types, each item has its own specific metadata with item-dependent description.

Unlike a typical filesystem, items in this virtual file system usually cannot be created, deleted, or moved to another folder. The exceptions are dynamic variables and mounted storage devices like SD cards. These parts of the virtual file system function like a normal filesystem, allowing the structure to be modified. The tree of items can be broke down as follows:

Entry typeEntry function
DataA generic data item, typically mapped onto an embedded variable.
ExecutableA generic executable, typically mapped onto an embedded function.
DirectoryA node containing the addresses to nested entries.
DeviceAn I/O-type entry for accessing a device through other than in-built memory spaces.

Data

Data item is like file in a typical OS. The most typical entry type is a variable. The file's content is mapped to the raw variable's value. Each variable also has an adjacent, non-volatile metadata object, which describes the variable's type, default value, etc.

Command

The command is another basic item type in filesystem. It communicates through the standard input, standard output, arguments and a return value. The command is linked to specific function hardcoded in the firmware. Running a command starts this function with standard input and arguments; output of the function is redirected to the standard output. In additon, commands can have direct access to the hardware, for example motor can be spinned up or stopped using a command.

Directory

Directory is an item used for creating logical structure of filesystem. Another items that has something in common are usually placed in one directory. Directory itself has no other funcion or contains some data, it is used only for sorting and organizing other items of file system. Directory could be used as mount point for eternal devices such as a SD card.

IO device

Similar to Linux, input or output device (SD card, UART, WiFi module or bluetooth module) could be displayed as file in file system.

info

Metadata is an adjacent object that describes the filesystem item and defines its attributes. Metadata differ depending on the item it describes. For data items, metadata could contain size of item in bytes, class and type of the item (integer, float, string, array ...), units of variable (Volts, Amps, seconds ...), minimal, maximal, default values and so on.

Access level

Access level is a filesystem attribute that defines which user can read, write or execute the item. Each service that provides access to the filesystem implements some kind of authentication mechanism to provide correct access level. Default username and password for the end-user is typically guest:guest. Passwords for other users with higher access rights is generated by propietary authentication algorithm. Access rigts of currently logged user can be discovered by the whoami command.

tip

Dynamic variable can also be stored in the user storage by the save command.

File system topology overview

In this section, brief overview of the items in filesystem are given. Only items directly connected with YOS are described in detail, other item ale listed only with short comment. Detail information about them are given in corresponding manual.

Root directory, /

Everything located directly in root directory is associated to the given application (release) and it is described in Application manual. Exceptions are directories commands, permanents, flash and vars. All these directories are described below.

Directory /commands

Executable commands are located in this directory by default. When using yOS shell,any command registered in folder /commands can be run just by typing its name into shell, without specifying full path to the command. Directory /commands work similarly to system variable $PATH in a typical OS. Commands which belongs directly to the yOS are described in section 3.14. Other commands are described in corresponding documentation : Driver manual, Datasheet or Application manual.

Directory /permanents

This directory contains service data, generally counters and min/max registers are located here. Refer to the Variables section for overview of what's there.

Directory /flash

Parts of internal flash memory available fo storing data are listed in this directory.

Directory /vars

The built-in variables are located in this directory by default. Dynamically allocated variables are placed to this directory as well. Variables located in this directory can be referred directly, without specifying their full path (similar to Commands).

Application-specific directories : /driver and /common

Directory /driver contains items connected with motor Driver. Most important are voltage and current references, settings of PID regulators, current, voltage and temperature limiters. All items are described in detail in Driver manual. Directory /common contains user I/O, their mapping and configuration. Content of this folder is hardwaredependent, it is defined by product type. This directory is described in corresponding Datasheet.