ChimeraTK-DeviceAccess 03.25.00
Loading...
Searching...
No Matches
Utilities.h File Reference
#include "DeviceInfoMap.h"
#include "Exception.h"
#include <list>
#include <map>
+ Include dependency graph for Utilities.h:
+ This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  ChimeraTK::DeviceDescriptor
 This structure holds the information of an ChimeraTK device descriptor. More...
 
struct  ChimeraTK::Sdm
 This structure holds the information of an SDM. More...
 

Namespaces

namespace  ChimeraTK
 
namespace  ChimeraTK::Utilities
 

Functions

std::string ChimeraTK::getDMapFilePath ()
 Returns the dmap file name which the library currently uses for looking up device(alias) names.
 
void ChimeraTK::setDMapFilePath (std::string dmapFilePath)
 Set the location of the dmap file.
 
DeviceDescriptor ChimeraTK::Utilities::parseDeviceDesciptor (std::string cddString)
 Parse a ChimeraTK device descriptor (CDD) and return the information in the DeviceDescriptor struct.
 
bool ChimeraTK::Utilities::isDeviceDescriptor (std::string theString)
 Check whether the given string seems to be a CDD.
 
Sdm ChimeraTK::Utilities::parseSdm (const std::string &sdmString)
 Parse an SDM URI and return the device information in the Sdm struct.
 
Sdm ChimeraTK::Utilities::parseDeviceString (const std::string &deviceString)
 Parse an old-style device string (either path to device node or map file name for dummies)
 
std::size_t ChimeraTK::Utilities::shmDummyInstanceIdHash (const std::string &address, const std::map< std::string, std::string > &parameters)
 Generates shm dummy instanceId hash from address and parameter map, Intended for use with parseDeviceDesciptor return value.
 
std::string ChimeraTK::Utilities::createShmName (std::size_t instanceIdHash, const std::string &mapFileName, const std::string &userName)
 Generates shm dummy name from parameter hashes.
 
bool ChimeraTK::Utilities::isSdm (const std::string &theString)
 Check wehter the given string seems to be an SDM.
 
size_t ChimeraTK::Utilities::countOccurence (std::string theString, char delimiter)
 Check if the given string only contains alphanumeric characters.
 
DeviceInfoMap::DeviceInfo ChimeraTK::Utilities::aliasLookUp (const std::string &aliasName, const std::string &dmapFilePath)
 Search for an alias in a given DMap file and return the DeviceInfo entry.
 
std::vector< std::string > ChimeraTK::Utilities::getAliasList ()
 Returns the list of device aliases from the DMap file set using BackendFactory::setDMapFilePath.
 
void ChimeraTK::Utilities::printStackTrace ()
 Print a call stack trace (but continue executing the process normally).