ChimeraTK-DeviceAccess  03.18.00
ChimeraTK::Utilities Namespace Reference

Functions

DeviceDescriptor parseDeviceDesciptor (std::string cddString)
 Parse a ChimeraTK device descriptor (CDD) and return the information in the DeviceDescriptor struct. More...
 
bool isDeviceDescriptor (std::string theString)
 Check whether the given string seems to be a CDD. More...
 
Sdm parseSdm (const std::string &sdmString)
 Parse an SDM URI and return the device information in the Sdm struct. More...
 
Sdm parseDeviceString (const std::string &deviceString)
 Parse an old-style device string (either path to device node or map file name for dummies) More...
 
bool isSdm (const std::string &theString)
 Check wehter the given string seems to be an SDM. More...
 
size_t countOccurence (std::string theString, char delimiter)
 Check if the given string only contains alphanumeric characters. More...
 
DeviceInfoMap::DeviceInfo aliasLookUp (const std::string &aliasName, const std::string &dmapFilePath)
 Search for an alias in a given DMap file and return the DeviceInfo entry. More...
 
std::vector< std::string > getAliasList ()
 Returns the list of device aliases from the DMap file set using BackendFactory::setDMapFilePath. More...
 
void printStackTrace ()
 Print a call stack trace (but continue executing the process normally). More...
 

Function Documentation

◆ aliasLookUp()

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.

If the alias is not found, the DeviceInfo will have empty strings.

Definition at line 286 of file Utilities.cpp.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ countOccurence()

size_t ChimeraTK::Utilities::countOccurence ( std::string  theString,
char  delimiter 
)

Check if the given string only contains alphanumeric characters.

Definition at line 21 of file Utilities.cpp.

+ Here is the caller graph for this function:

◆ getAliasList()

std::vector< std::string > ChimeraTK::Utilities::getAliasList ( )

Returns the list of device aliases from the DMap file set using BackendFactory::setDMapFilePath.

Definition at line 295 of file Utilities.cpp.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ isDeviceDescriptor()

bool ChimeraTK::Utilities::isDeviceDescriptor ( std::string  theString)

Check whether the given string seems to be a CDD.

There is no guarantee that the CDD is well-formed, the function just looks for the signature of a CDD.

Definition at line 37 of file Utilities.cpp.

+ Here is the caller graph for this function:

◆ isSdm()

bool ChimeraTK::Utilities::isSdm ( const std::string &  theString)

Check wehter the given string seems to be an SDM.

There is no guarantee that the SDM is well-formed, the finction just looks for the signatore of an SDM.

Definition at line 28 of file Utilities.cpp.

+ Here is the caller graph for this function:

◆ parseDeviceDesciptor()

DeviceDescriptor ChimeraTK::Utilities::parseDeviceDesciptor ( std::string  cddString)

Parse a ChimeraTK device descriptor (CDD) and return the information in the DeviceDescriptor struct.

Definition at line 47 of file Utilities.cpp.

+ Here is the caller graph for this function:

◆ parseDeviceString()

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)

Definition at line 260 of file Utilities.cpp.

+ Here is the caller graph for this function:

◆ parseSdm()

Sdm ChimeraTK::Utilities::parseSdm ( const std::string &  sdmString)

Parse an SDM URI and return the device information in the Sdm struct.

Definition at line 189 of file Utilities.cpp.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ printStackTrace()

void ChimeraTK::Utilities::printStackTrace ( )

Print a call stack trace (but continue executing the process normally).

Can be used for debugging. C++ names will be demangled, if possible.

Definition at line 333 of file Utilities.cpp.