μHAL (v2.6.5)
Part of the IPbus software repository
Public Member Functions | Private Attributes | List of all members
uhal::Mmap::File Class Reference

Public Member Functions

 File (const std::string &aPath, int aFlags)
 
 ~File ()
 
const std::string & getPath () const
 
void setPath (const std::string &aPath)
 
void open ()
 
void close ()
 
void read (const uint32_t aAddr, const uint32_t aNrWords, std::vector< uint32_t > &aValues)
 
void write (const uint32_t aAddr, const std::vector< std::pair< const uint8_t *, size_t > > &aData)
 

Private Attributes

std::string mPath
 
int mFd
 
int mFlags
 
void * mMmapBaseAddress
 

Detailed Description

Definition at line 94 of file ProtocolMmap.hpp.

Constructor & Destructor Documentation

◆ File()

uhal::Mmap::File::File ( const std::string &  aPath,
int  aFlags 
)

Definition at line 107 of file ProtocolMmap.cpp.

◆ ~File()

uhal::Mmap::File::~File ( )

Definition at line 115 of file ProtocolMmap.cpp.

References close().

Member Function Documentation

◆ close()

void uhal::Mmap::File::close ( )

Definition at line 153 of file ProtocolMmap.cpp.

References uhal::Error, uhal::Integer(), MAP_SIZE, mFd, mMmapBaseAddress, mPath, and uhal::Quote().

Referenced by uhal::Mmap::disconnect(), and ~File().

◆ getPath()

const std::string & uhal::Mmap::File::getPath ( ) const

Definition at line 120 of file ProtocolMmap.cpp.

References mPath.

Referenced by uhal::Mmap::connect(), uhal::Mmap::read(), and uhal::Mmap::write().

◆ open()

void uhal::Mmap::File::open ( )

Definition at line 133 of file ProtocolMmap.cpp.

References uhal::Integer(), MAP_SIZE, mFd, mFlags, mMmapBaseAddress, mPath, and uhal::Quote().

Referenced by read(), and write().

◆ read()

void uhal::Mmap::File::read ( const uint32_t  aAddr,
const uint32_t  aNrWords,
std::vector< uint32_t > &  aValues 
)

Definition at line 169 of file ProtocolMmap.cpp.

References mFd, mMmapBaseAddress, and open().

Referenced by uhal::Mmap::connect(), and uhal::Mmap::read().

◆ setPath()

void uhal::Mmap::File::setPath ( const std::string &  aPath)

Definition at line 125 of file ProtocolMmap.cpp.

References mPath.

◆ write()

void uhal::Mmap::File::write ( const uint32_t  aAddr,
const std::vector< std::pair< const uint8_t *, size_t > > &  aData 
)

Definition at line 184 of file ProtocolMmap.cpp.

References uhal::Integer(), mFd, mMmapBaseAddress, and open().

Referenced by uhal::Mmap::write().

Member Data Documentation

◆ mFd

int uhal::Mmap::File::mFd
private

Definition at line 111 of file ProtocolMmap.hpp.

Referenced by close(), open(), read(), and write().

◆ mFlags

int uhal::Mmap::File::mFlags
private

Definition at line 112 of file ProtocolMmap.hpp.

Referenced by open().

◆ mMmapBaseAddress

void* uhal::Mmap::File::mMmapBaseAddress
private

Definition at line 113 of file ProtocolMmap.hpp.

Referenced by close(), open(), read(), and write().

◆ mPath

std::string uhal::Mmap::File::mPath
private

Definition at line 110 of file ProtocolMmap.hpp.

Referenced by close(), getPath(), open(), and setPath().


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