In the past, some functions returned a pointer to an object, which could later refer to a nonexistent object.
Currently, BaseDevice has a built-in shared pointer that eliminates this problem.
To maintain backward compatibility, BaseDevice has the operator-> which is used by various code snippets. BaseDevice and Property/PropertyXXX should be passed as values, not as pointers.
The "->" operator will be marked as deprecated in future versions of the library.

The example below follows the latest trends.

void IndiClient::newDevice(INDI::BaseDevice baseDevice)
{         
   IDLog("New Device: %s\n", baseDevice.getDeviceName());
   auto interface = baseDevice.getDriverInterface();
   if (interface & BaseDevice::TELESCOPE_INTERFACE)
   {
       IDLog("New Telescope: %s\n", baseDevice.getDeviceName());
   }
}


Read More...