Developer Application Interface (ARC API) v3.6.2
ARC, Inc. GenII/III Application Interface
arc::gen3::CArcSystem Class Reference

#include <CArcSystem.h>

Inheritance diagram for arc::gen3::CArcSystem:
arc::gen3::CArcBase

Static Public Member Functions

static bool open (arc::gen3::arcDevHandle_t &hDevice, const arcDev_t &tDevice, const std::uint64_t uiFlags=0) noexcept
 
static bool close (arc::gen3::arcDevHandle_t &hDevice) noexcept
 
static bool ioctl (const arcDevHandle_t hDevice, const std::uint32_t uiCommand, void *pIn, const std::uint32_t uiInSize, void *pOut=nullptr, const std::uint32_t uiOutSize=0) noexcept
 
static void * mmap (const arcDevHandle_t hDevice, const std::int32_t iMapCommand, const std::uint32_t uiSize) noexcept
 
static bool munmap (const arcDevHandle_t hDevice, const std::int32_t iMapCommand, void *pAddress, const std::size_t uiSize) noexcept
 
- Static Public Member Functions inherited from arc::gen3::CArcBase
static const std::string version (void)
 
static void zeroMemory (void *pDest, const std::size_t uiSize)
 
static void copyMemory (void *pDest, void *pSrc, const std::size_t uiSize)
 
static void throwOutOfRange (const std::string &sMethodName, const std::int32_t iLine, const std::uint32_t uiElement, std::pair< std::uint32_t, std::uint32_t > range)
 
static void throwOutOfRange (const std::string &sMethodName, const std::int32_t iLine, const std::string &sElement, const std::size_t uiSize)
 
static void throwNoDeviceError (const std::string &sMethodName, const std::int32_t iLine, const std::string &sMsg="")
 
template<typename T = std::runtime_error>
static void throwException (const std::string &sMethodName, const std::int32_t iLine, const std::string &sMsg)
 
template<typename T = std::runtime_error>
static void throwException (const std::string &sMethodName, const std::int32_t iLine, const char *pszFmt,...)
 
template<typename ErrCode >
requires std::is_integral_v<ErrCode>
static const std::string getSystemMessage (ErrCode iCode)
 
static std::int32_t getSystemError (void) noexcept
 
static std::unique_ptr< CArcStringListsplitString (const std::string &sString, const char &zDelim=' ')
 
static std::string formatString (const char *pszFmt,...)
 
static std::string convertWideToAnsi (wchar_t wzString[]) noexcept
 
static std::string convertWideToAnsi (const std::wstring &wsString)
 
static std::wstring convertAnsiToWide (const char *pszString)
 
static std::string cmdToString (const std::uint32_t uiCmd)
 
static std::string cmdToString (const std::uint32_t uiReply, const std::initializer_list< std::uint32_t > &tCmdList)
 
static std::string setDots (std::string_view svText, const std::size_t uiMaxLength, const char szDot='.')
 
template<typename T >
static std::string iterToString (T *pBegin, T *pEnd, char zSeperator=' ')
 

Protected Member Functions

 CArcSystem (void)=default
 
 ~CArcSystem (void)=default
 
- Protected Member Functions inherited from arc::gen3::CArcBase
 CArcBase (void)=default
 
 CArcBase (const CArcBase &)=delete
 
 CArcBase (CArcBase &&)=delete
 
CArcBaseoperator= (const CArcBase &)=delete
 
CArcBaseoperator= (CArcBase &&)=delete
 

Additional Inherited Members

- Public Member Functions inherited from arc::gen3::CArcBase
virtual ~CArcBase (void)
 
- Static Protected Attributes inherited from arc::gen3::CArcBase
static const std::string m_sVersion
 

Detailed Description

ARC operating system class.

See also
arc::gen3::CArcDevice

Constructor & Destructor Documentation

◆ CArcSystem()

arc::gen3::CArcSystem::CArcSystem ( void  )
protecteddefault

Default constructor

◆ ~CArcSystem()

arc::gen3::CArcSystem::~CArcSystem ( void  )
protecteddefault

Default destructor

Member Function Documentation

◆ close()

bool arc::gen3::CArcSystem::close ( arc::gen3::arcDevHandle_t &  hDevice)
staticnoexcept

Closes a connection to the specified system device.

Parameters
hDevice- A handle reference to the device.
Returns
Returns true</> if the device closed successfully; false otherwise.

◆ ioctl()

bool arc::gen3::CArcSystem::ioctl ( const arcDevHandle_t  hDevice,
const std::uint32_t  uiCommand,
void *  pIn,
const std::uint32_t  uiInSize,
void *  pOut = nullptr,
const std::uint32_t  uiOutSize = 0 
)
staticnoexcept

Sends a control code directly to a specified device driver, causing the corresponding device to perform the corresponding operation.

Parameters
hDevice- A handle reference to the device.
uiCommand- The device driver control code.
pIn- A pointer to an input buffer.
uiInSize- The size of the input buffer, in bytes.
pOut- A pointer to an output buffer.
uiOutSize- The size of the output buffer, in bytes.
Returns
Returns true</> if the operation completed successfully; false otherwise.

◆ mmap()

void * arc::gen3::CArcSystem::mmap ( const arcDevHandle_t  hDevice,
const std::int32_t  iMapCommand,
const std::uint32_t  uiSize 
)
staticnoexcept

Map a device into memory.

Parameters
hDevice- A handle reference to the device.
iMapCommand- The device driver map code.
uiSize- The length of the mapping ( which must be greater than 0 ). Not used on Windows.
Returns
Returns a pointer to the mapped area.

◆ munmap()

bool arc::gen3::CArcSystem::munmap ( const arcDevHandle_t  hDevice,
const std::int32_t  iMapCommand,
void *  pAddress,
const std::size_t  uiSize 
)
staticnoexcept

Un-map a device from memory.

Parameters
hDevice- A handle reference to the device.
iMapCommand- The device driver map code.
pAddress- A pointer to the mapped area.
uiSize- The length of the mapping ( which must be greater than 0 ).

◆ open()

bool arc::gen3::CArcSystem::open ( arc::gen3::arcDevHandle_t &  hDevice,
const arcDev_t tDevice,
const std::uint64_t  uiFlags = 0 
)
staticnoexcept

Opens a connection to the specified system device.

Parameters
hDevice- A reference to a device handle storage location.
tDevice- A string reference to the name of the device to open.
uiFlags- Any device specific flags.
Returns
Returns true</> if the device closed successfully; false otherwise.

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