ldas-tools-frameAPI  3.0.3
Classes | Public Types | Public Member Functions | Static Public Member Functions | Private Types | Private Member Functions | Private Attributes | List of all members
FrameAPI::DeviceIOConfiguration Class Reference

Singleton to keep track of how to support io on a device. More...

#include <DeviceIOConfiguration.hh>

Inheritance diagram for FrameAPI::DeviceIOConfiguration:
Inheritance graph
[legend]
Collaboration diagram for FrameAPI::DeviceIOConfiguration:
Collaboration graph
[legend]

Classes

struct  Characteristics
 
struct  Description
 

Public Types

typedef INT_8U dev_type
 
typedef FrameCPP::Common::FrameBufferInterface::buffer_size_type size_type
 
typedef bool use_mmap_io_type
 
typedef std::vector< Descriptiondescriptions_type
 

Public Member Functions

 DeviceIOConfiguration ()
 Constructor. More...
 
 ~DeviceIOConfiguration ()
 Destructor. More...
 

Static Public Member Functions

static void GetConfiguration (const char *Filename, size_type &BufferSize, bool &UseMemoryMappedIO)
 Fetch the options for the device associated with the file. More...
 
static void GetConfiguration (const char *Filename, size_type &BufferSize, bool &UseMemoryMappedIO, std::string &FSType)
 Fetch the options for the device associated with the file. More...
 
static std::string Reset (const descriptions_type &Descriptions)
 Resets the cache to be empty. More...
 

Private Types

typedef std::map< dev_type, Characteristicscache_type
 
typedef LDASTools::AL::unordered_map< std::string, Characteristicsfstype_cache_type
 

Private Member Functions

void get_configuration (const char *Filename, size_type &BufferSize, bool &UseMemoryMappedIO, std::string &FSType)
 Fetch the options for the device associated with the file. More...
 
std::string reset (const descriptions_type &Descriptions)
 Resets the cache to be empty. More...
 

Private Attributes

LDASTools::AL::ReadWriteLock::baton_type m_cache_lock
 
cache_type m_cache
 
fstype_cache_type m_fstype_cache
 
MountMgr m_mount_mgr
 

Detailed Description

Singleton to keep track of how to support io on a device.

Member Typedef Documentation

◆ cache_type

◆ descriptions_type

◆ dev_type

◆ fstype_cache_type

typedef LDASTools::AL::unordered_map< std::string, Characteristics > FrameAPI::DeviceIOConfiguration::fstype_cache_type
private

◆ size_type

typedef FrameCPP::Common::FrameBufferInterface::buffer_size_type FrameAPI::DeviceIOConfiguration::size_type

◆ use_mmap_io_type

Constructor & Destructor Documentation

◆ DeviceIOConfiguration()

FrameAPI::DeviceIOConfiguration::DeviceIOConfiguration ( )

Constructor.

◆ ~DeviceIOConfiguration()

DeviceIOConfiguration::~DeviceIOConfiguration ( )

Destructor.

Member Function Documentation

◆ get_configuration()

void DeviceIOConfiguration::get_configuration ( const char *  Filename,
size_type BufferSize,
bool &  UseMemoryMappedIO,
std::string &  FSType 
)
private

Fetch the options for the device associated with the file.

Parameters
[in]FilenameThe name of the file on the device being queried.
[out]BufferSizeThe optimal size of the buffer for the device.
[out]UseMemoryMappedIOTrue if the device performance is enhanced by using memory mapped I/O.
[out]FSTypeThe description of the file type for the device being queried.

◆ GetConfiguration() [1/2]

void FrameAPI::DeviceIOConfiguration::GetConfiguration ( const char *  Filename,
size_type BufferSize,
bool &  UseMemoryMappedIO 
)
inlinestatic

Fetch the options for the device associated with the file.

Parameters
[in]FilenameThe name of the file on the device being queried.
[out]BufferSizeThe optimal size of the buffer for the device.
[out]UseMemoryMappedIOTrue if the device performance is enhanced by using memory mapped I/O.

◆ GetConfiguration() [2/2]

void DeviceIOConfiguration::GetConfiguration ( const char *  Filename,
size_type BufferSize,
bool &  UseMemoryMappedIO,
std::string &  FSType 
)
static

Fetch the options for the device associated with the file.

Parameters
[in]FilenameThe name of the file on the device being queried.
[out]BufferSizeThe optimal size of the buffer for the device.
[out]UseMemoryMappedIOTrue if the device performance is enhanced by using memory mapped I/O.
[out]FSTypeThe description of the file type for the device being queried.

◆ Reset()

std::string DeviceIOConfiguration::Reset ( const descriptions_type Descriptions)
static

Resets the cache to be empty.

Parameters
[out]DescriptionsList of names or file system types that are to be reset.
Returns
List of warning messages generated while trying to reset.

◆ reset()

std::string DeviceIOConfiguration::reset ( const descriptions_type Descriptions)
private

Resets the cache to be empty.

Parameters
[out]DescriptionsList of names or file system types that are to be reset.
Returns
List of warning messages generated while trying to reset.

Member Data Documentation

◆ m_cache

cache_type FrameAPI::DeviceIOConfiguration::m_cache
private

◆ m_cache_lock

LDASTools::AL::ReadWriteLock::baton_type FrameAPI::DeviceIOConfiguration::m_cache_lock
private

◆ m_fstype_cache

fstype_cache_type FrameAPI::DeviceIOConfiguration::m_fstype_cache
private

◆ m_mount_mgr

MountMgr FrameAPI::DeviceIOConfiguration::m_mount_mgr
private

The documentation for this class was generated from the following files: