Snippet for enabling Turbodrive2 for the new Acquistion stack

Hi everyone,

here is a simple example how to enable Turbodrive2 (and 1 with slight modification) for the new acquisition stack.

NOTE: This only works iff you use the “Cvb::Driver::AcquisitionStack::GenTL” (i.e. the new stack) stack. See: https://help.commonvisionblox.com/NextGen/14.0/cvbpp/d0/d60/namespace_cvb_1_1_driver.html#a2ff63b2aa9be5bf31bbfaebba602c4e2

void setTurbuDrive2State(Cvb::Device &device, bool useTurboDrive)
{
  auto nm = device.NodeMap("VinDevice");
  {
    auto onNode = nm->Node<Cvb::GenApi::BooleanNode>("TurboDriveEnabled");
    auto modeNode = nm->Node<Cvb::GenApi::IntegerNode>("TurboDriveAlgorithm"); // which turbodrive version
    auto qualNode = nm->Node<Cvb::GenApi::IntegerNode>("Quality");             // this defines the compressionlevel (higher == more compressed)

    if (useTurboDrive)
    {
      onNode->SetValue(true);
      modeNode->SetValue(2);
      qualNode->SetValue(0);
    }
    else
    {
      onNode->SetValue(false);
    }
  }
}