Function rcg::getString

Function Documentation

std::string rcg::getString(const std::shared_ptr<GenApi::CNodeMapRef> &nodemap, const char *name, bool exception = false, bool igncache = false)

Get the value of a feature of the given nodemap. The datatype of the feature can be boolean, integer, float, enum, register or string. The given value will be converted depending on the datatype and representation of the feature, which can be hex, ip4v or mac for an integer feature.

Note: Only the first 32 bytes of registers will be converted and represented in hex.

Parameters:
  • nodemap – Initialized nodemap.

  • name – Name of feature.

  • exception – True if an error should be signaled via exception.

  • igncache – True if value is always read from the device, even if cached.

Returns:

Value or an empty string if the feature does not exist, has a different datatype or is not readable.