I have the following piece of code:
auto stream = activeLineScanDevice->Stream<Cvb::ImageStream>(0);
// Set rigbuffer size
//stream->RingBuffer()->ChangeCount(nbrOfLines, Cvb::DeviceUpdateMode::NewDeviceImage);
// Define the softwareTrigger
auto softwareTrigger = activeDeviceNodemap->Node<Cvb::CommandNode>CVB_LIT("TriggerSoftware"));
std::vector<Cvb::ImagePtr> imgVec;
imgVec.reserve(nbrOfLines);
stream->Start();
for (const auto index = 0; index < nbrOfLines; ++index)
{
softwareTrigger->Execute(); // grab data
auto [multiPartImage, waitStatus, enumerator] = stream->WaitFor(std::chrono::milliseconds(millisecondsTimeOut));
/* ... */
auto image = Cvb::get<Cvb::ImagePtr>(firstElement);
auto linearAccess = image->Plane(0).LinearAccess();
std::cout << "acquired line: " << index << " at memory location: " << linearAccess.BasePtr() << "\n";
imgVec.push_back(image);
}
stream->Stop();
I would like to set the camera ringbuffer size to e.g. nbrOfLines (line 3), but the command
auto stream = activeLineScanDevice->Stream();
stream->RingBuffer()->ChangeCount(...)
throws an exception: […] does not support legacy streams, and I don’t know how to set the ringbuffer size with the new c++ templated api, e.g.
auto stream = activeLineScanDevice->Stream<Cvb::ImageStream>(0);
stream->????
… as I cannot access the Ringbuffer there. Anyone has an idea? - thanks in advance!