winIDEA SDK
isys::CStorageDeviceFactory Class Reference

Description

This class presents a storage devices factory methods.

#include <CStorageDeviceFactory.h>

Static Public Member Functions

static std::shared_ptr< CStorageDeviceControllermakeDevice (ConnectionMgrSPtr connectionMgr, const EStorageDevice type, const std::string deviceName)
 Creates pointer to specified device type by device name. More...
 
static std::shared_ptr< CStorageDeviceControllermakeDevice (ConnectionMgrSPtr connectionMgr, const EStorageDevice type, const std::string deviceName, const std::string partitionName)
 Creates pointer to specified device type by device and partition name. More...
 
static std::shared_ptr< CStorageDeviceControllermakeDevice (ConnectionMgrSPtr connectionMgr, const EStorageDevice type, const uint32_t deviceIndex)
 Creates pointer to specified device type by device index. More...
 
static std::shared_ptr< CStorageDeviceControllermakeDevice (ConnectionMgrSPtr connectionMgr, const EStorageDevice type, const uint32_t deviceIndex, const std::string partitionName)
 Creates pointer to specified device type by device index and partition name. More...
 
static void terminateDevice (ConnectionMgrSPtr connectionMgr, const EStorageDevice type, const std::string deviceName)
 Terminates device connection by name. More...
 
static void terminateDevice (ConnectionMgrSPtr connectionMgr, const EStorageDevice type, const uint32_t deviceIndex)
 Terminates device connection by index. More...
 
static void getDeviceNames (ConnectionMgrSPtr connectionMgr, std::vector< std::string > &deviceNames)
 Collects all enabled storage device names. More...
 
static void getDeviceInfo (ConnectionMgrSPtr connectionMgr, std::string deviceName, iconnect::StrStrMap &elements)
 Provides device info - internal device structure. More...
 

Static Public Attributes

static const std::string DEVICES_OPT_URL
 Option URL to be used by COptionController to set winIDEA options related to storage devices.
 

Member Function Documentation

◆ getDeviceInfo()

static void isys::CStorageDeviceFactory::getDeviceInfo ( ConnectionMgrSPtr  connectionMgr,
std::string  deviceName,
iconnect::StrStrMap elements 
)
static

Provides device info - internal device structure.

Valid only for partition based devices (emmc).

Parameters
connectionMgrconnection manager
deviceNamestorage device name
elementsdevice parameters as mapping
Exceptions
IOExceptionif no device by deviceName exists.

Python example: test_storage_get_device_info.py

◆ getDeviceNames()

static void isys::CStorageDeviceFactory::getDeviceNames ( ConnectionMgrSPtr  connectionMgr,
std::vector< std::string > &  deviceNames 
)
static

Collects all enabled storage device names.

Parameters
connectionMgrconnection manager
deviceNamesvector of all available storage device names

Python example: test_storage_get_devices_names.py
Python example: test_storage_get_devices_number.py

◆ makeDevice() [1/4]

static std::shared_ptr< CStorageDeviceController > isys::CStorageDeviceFactory::makeDevice ( ConnectionMgrSPtr  connectionMgr,
const EStorageDevice  type,
const std::string  deviceName 
)
static

Creates pointer to specified device type by device name.

When using partition based devices (emmc), makeDevice loads monitor to the device. Don't call any non-storage SDK function before unloading monitor with terminateDevice.

Parameters
connectionMgrconnection manager
typestorage device type
deviceNamedevice name
Returns
pointer to specified device type

◆ makeDevice() [2/4]

static std::shared_ptr< CStorageDeviceController > isys::CStorageDeviceFactory::makeDevice ( ConnectionMgrSPtr  connectionMgr,
const EStorageDevice  type,
const std::string  deviceName,
const std::string  partitionName 
)
static

Creates pointer to specified device type by device and partition name.

When using partition based devices (emmc), makeDevice loads monitor to the device. Don't call any non-storage SDK function before unloading monitor with terminateDevice.

Parameters
connectionMgrconnection manager
typestorage device type
deviceNamedevice name
partitionNamepartition name
Returns
pointer to specified device type

◆ makeDevice() [3/4]

static std::shared_ptr< CStorageDeviceController > isys::CStorageDeviceFactory::makeDevice ( ConnectionMgrSPtr  connectionMgr,
const EStorageDevice  type,
const uint32_t  deviceIndex 
)
static

Creates pointer to specified device type by device index.

When using partition based devices (emmc), makeDevice loads monitor to the device. Don't call any non-storage SDK function before unloading monitor with terminateDevice.

Parameters
connectionMgrconnection manager
typestorage device type
deviceIndexdevice index
Returns
pointer to specified device type

◆ makeDevice() [4/4]

static std::shared_ptr< CStorageDeviceController > isys::CStorageDeviceFactory::makeDevice ( ConnectionMgrSPtr  connectionMgr,
const EStorageDevice  type,
const uint32_t  deviceIndex,
const std::string  partitionName 
)
static

Creates pointer to specified device type by device index and partition name.

When using partition based devices (emmc), makeDevice loads monitor to the device. Don't call any non-storage SDK function before unloading monitor with terminateDevice.

Parameters
connectionMgrconnection manager
typestorage device type
deviceIndexdevice index
partitionNamepartition name
Returns
pointer to specified device type

◆ terminateDevice() [1/2]

static void isys::CStorageDeviceFactory::terminateDevice ( ConnectionMgrSPtr  connectionMgr,
const EStorageDevice  type,
const std::string  deviceName 
)
static

Terminates device connection by name.

Valid only for partition based devices (emmc).

Parameters
connectionMgrconnection manager
typestorage device type
deviceNamedevice name

Python example: test_storage_init_terminate.py

◆ terminateDevice() [2/2]

static void isys::CStorageDeviceFactory::terminateDevice ( ConnectionMgrSPtr  connectionMgr,
const EStorageDevice  type,
const uint32_t  deviceIndex 
)
static

Terminates device connection by index.

Valid only for partition based devices (emmc).

Parameters
connectionMgrconnection manager
typestorage device type
deviceIndexdevice index