Skip to content

Class jac::Device

template <class Machine>

ClassList > jac > Device

Inherits the following classes: jac::MachineCtrl

Public Functions

Type Name
Device (std::filesystem::path rootDir, std::function< std::string()> getMemoryStats, std::function< std::string()> getStorageStats, std::vector< std::pair< std::string, std::string >> versionInfo, std::function< void(std::filesystem::path)> formatFS, std::unordered_map< std::string, std::span< const uint8_t >> resources, KeyValueOpener openKeyValueNamespace)
Device (const Device &) = delete
Device (Device &&) = delete
virtual void emitKeyValueModified (const std::string & nsname, const std::string & key) override
const KeyValueOpener & getKeyValueOpener () const
virtual std::tuple< bool, int, std::string > getMachineStatus () override
TimeoutLock & lock ()
MachineIO & machineIO ()
void onConfigureMachine (std::function< void(Machine &)> f)
void onKeyValueModified (std::function< void(const std::string &, const std::string &)> f)
virtual std::unique_ptr< KeyValueNamespace > openKeyValue (const std::string & nsname) override const
Device & operator= (const Device &) = delete
Device & operator= (Device &&) = delete
Router & router ()
void start ()
virtual bool startMachine (std::string path) override
virtual bool stopMachine () override
~Device ()

Public Functions inherited from jac::MachineCtrl

See jac::MachineCtrl

Type Name
virtual void emitKeyValueModified (const std::string & nsname, const std::string & key) = 0
virtual std::tuple< bool, int, std::string > getMachineStatus () = 0
virtual std::unique_ptr< KeyValueNamespace > openKeyValue (const std::string & nsname) const = 0
virtual bool startMachine (std::string path) = 0
virtual bool stopMachine () = 0

Public Functions Documentation

function Device [1/3]

inline jac::Device::Device (
    std::filesystem::path rootDir,
    std::function< std::string()> getMemoryStats,
    std::function< std::string()> getStorageStats,
    std::vector< std::pair< std::string, std::string >> versionInfo,
    std::function< void(std::filesystem::path)> formatFS,
    std::unordered_map< std::string, std::span< const uint8_t >> resources,
    KeyValueOpener openKeyValueNamespace
) 

function Device [2/3]

jac::Device::Device (
    const Device &
) = delete

function Device [3/3]

jac::Device::Device (
    Device &&
) = delete

function emitKeyValueModified

inline virtual void jac::Device::emitKeyValueModified (
    const std::string & nsname,
    const std::string & key
) override

Implements jac::MachineCtrl::emitKeyValueModified


function getKeyValueOpener

inline const KeyValueOpener & jac::Device::getKeyValueOpener () const

function getMachineStatus

virtual std::tuple< bool, int, std::string > jac::Device::getMachineStatus () override

Implements jac::MachineCtrl::getMachineStatus


function lock

inline TimeoutLock & jac::Device::lock () 

function machineIO

inline MachineIO & jac::Device::machineIO () 

function onConfigureMachine

inline void jac::Device::onConfigureMachine (
    std::function< void(Machine &)> f
) 

function onKeyValueModified

inline void jac::Device::onKeyValueModified (
    std::function< void(const std::string &, const std::string &)> f
) 

function openKeyValue

inline virtual std::unique_ptr< KeyValueNamespace > jac::Device::openKeyValue (
    const std::string & nsname
) override const

Implements jac::MachineCtrl::openKeyValue


function operator=

Device & jac::Device::operator= (
    const Device &
) = delete

function operator=

Device & jac::Device::operator= (
    Device &&
) = delete

function router

inline Router & jac::Device::router () 

function start

inline void jac::Device::start () 

function startMachine

virtual bool jac::Device::startMachine (
    std::string path
) override

Implements jac::MachineCtrl::startMachine


function stopMachine

virtual bool jac::Device::stopMachine () override

Implements jac::MachineCtrl::stopMachine


function ~Device

inline jac::Device::~Device () 


The documentation for this class was generated from the following file src/jac/device/device.h