Dobby
3.0
Dobby “Docker based Thingy” is a tool for managing and running OCI containers using crun
|
Basic class used to store the stb environment. More...
#include <DobbyEnv.h>
Public Member Functions | |
DobbyEnv (const std::shared_ptr< const IDobbySettings > &settings) | |
std::string | workspaceMountPath () const override |
Returns the absolute AI workspace mount point path. More... | |
std::string | flashMountPath () const override |
Returns the absolute path to the AI area on flash. More... | |
std::string | pluginsWorkspacePath () const override |
Returns the path to directory that plugins can write to. More... | |
std::string | cgroupMountPath (Cgroup cgroup) const override |
Returns the absolute path to the cgroup mount point for the given cgroup. More... | |
uint16_t | platformIdent () const override |
Returns the two byte platform identification number. More... | |
Static Private Member Functions | |
static std::map< IDobbyEnv::Cgroup, std::string > | getCgroupMountPoints () |
Attempts to get the mount points of the cgroup filesystems. More... | |
static uint16_t | getPlatformIdent () |
Attempts to get the STB platform identifier bytes. More... | |
Additional Inherited Members | |
Public Types inherited from IDobbyEnv | |
enum class | Cgroup { Freezer , Memory , Cpu , CpuAcct , CpuSet , Devices , Gpu , NetCls , Blkio , Ion } |
Basic class used to store the stb environment.
Used to store constant stuff, like the flash mount point and platform type.
An instance of this class is passed to all plugins when they are initialised as well as storing information for the daemon's own use.
|
overridevirtual |
Returns the absolute path to the cgroup mount point for the given cgroup.
This is typically "/sys/fs/cgroup/<cgroup>"
Implements IDobbyEnv.
|
overridevirtual |
Returns the absolute path to the AI area on flash.
This is the flash mount used to store things like package widget files and any other sort of persistent data.
The path changes depending on the platform, but the following is typical "/mnt/nds/dev_17/part_0/appmanager"
Implements IDobbyEnv.
|
staticprivate |
Attempts to get the mount points of the cgroup filesystems.
This scans the mount table looking for the cgroups mounts, if this fails it's pretty fatal.
This is typically the name of the cgroup prefixed with "/sys/fs/cgroup"
|
staticprivate |
Attempts to get the STB platform identifier bytes.
The bytes should be set in the AI_PLATFORM_IDENT environment variable, if they aren't, or the env var is invalid then we return 0x0000 for the platform.
|
overridevirtual |
Returns the two byte platform identification number.
The following list the platforms at time of writing, for a complete list refer to https://www.stb.bskyb.com/confluence/display/SKYQ/Sky+Q+Hardware
32B0 : Falcon (broadcom 7445) 32B1 : FalconV2 UK (ST 419 Gateway) 32B2 : Titan (Broadcom 7278 Gateway) 32C0 : X-Wing (ST 412 Gateway) 32C1 : HIP Box (SKYH412 X-Wing) 32D0 : MR Box (ST 412 IP-Client) 7D67 : Amidala (ST 418 Gateway Satellite) 3400 : Amidala (ST 418 Gateway Cable) 6763 : Amidala (ST 418 GW Satellite & Cable) 32C2 : AX2 m-star 64bit platform
Implements IDobbyEnv.
|
overridevirtual |
Returns the path to directory that plugins can write to.
This is non-persistent storage and is just a subdirectory of the workspace. Plugins should use this to store any temporary files, mount points, etc.
The path is typically "/mnt/nds/tmpfs/APPLICATIONS_WORKSPACE/plugins"
Implements IDobbyEnv.
|
overridevirtual |
Returns the absolute AI workspace mount point path.
This is the tmpfs mount used by all AI code as a place to store non-persistent files.
The path is typically "/mnt/nds/tmpfs/APPLICATIONS_WORKSPACE"
Implements IDobbyEnv.