4#include <cvb/device_factory.hpp>
5#include <cvb/driver/driver.hpp>
6#include <cvb/image.hpp>
7#include <cvb/utilities/utilities.hpp>
8#include <cvb/composite.hpp>
9#include <cvb/driver/multi_part_image.hpp>
10#include <cvb/plane_enumerator.hpp>
11#include <cvb/point_cloud.hpp>
19 Cvb::DiscoverFlags::IgnoreGevFD |
20 Cvb::DiscoverFlags::IgnoreVins |
21 Cvb::DiscoverFlags::UpToLevelInterface,
24 for (
int i = 0; i < interfaceInfoList.size(); i++)
27 interfaceInfoList[i].TryGetProperty(Cvb::DiscoveryProperties::InterfaceMac, mac);
28 std::cout << mac <<
" | Index: " << i << std::endl;
31 std::cout <<
"Please enter the index of the interface your device is connected to:" << std::endl;
32 std::cout <<
"(You can check the mac addresses in the GenICamBrowser)" << std::endl;
35 while (index < 0 || index > interfaceInfoList.size() ||
std::cin.fail())
39 std::cout <<
"Invalid index, please enter a valid number:" << std::endl;
43 auto& interfaceInfo = interfaceInfoList[index];
45 interfaceInfo.SetGenApiFeature(CVB_LIT(
"TLInterface"), CVB_LIT(
"Cust::DisableSubnetMatch"), CVB_LIT(
"1"));
46 interfaceInfo.SetGenApiFeature(CVB_LIT(
"TLInterface"), CVB_LIT(
"Cust::AllowBroadcastDiscoveryResponse"), CVB_LIT(
"1"));
51 Cvb::DiscoverFlags::IgnoreGevFD |
52 Cvb::DiscoverFlags::IgnoreVins |
53 Cvb::DiscoverFlags::UpToLevelDevice |
54 Cvb::DiscoverFlags::IncludeInaccessible,
58 auto interfaceNM = interfaceDevice->NodeMap(CVB_LIT(
"TLInterface"));
61 auto deviceUpdateListNode = interfaceNM->Node<
Cvb::CommandNode>(CVB_LIT(
"DeviceUpdateList"));
62 auto ipNode = interfaceNM->
Node<
Cvb::IntegerNode>(CVB_LIT(
"GevDeviceForceIPAddress"));
63 auto subnetNode = interfaceNM->Node<
Cvb::IntegerNode>(CVB_LIT(
"GevDeviceForceIPSubnetMask"));
64 auto forceIPNode = interfaceNM->Node<
Cvb::CommandNode>(CVB_LIT(
"GevDeviceForceIP"));
65 auto configurationStatusNode = interfaceNM->Node<
Cvb::EnumerationNode>(CVB_LIT(
"GevDeviceIPConfigurationStatus"));
68 deviceUpdateListNode->Execute();
71 configurationStatusNode->SetValue(
"TemporaryIP");
73 ipNode->SetValue(0x0A000002);
77 forceIPNode->Execute();
79 deviceUpdateListNode->Execute();
82 configurationStatusNode->SetValue(
"PersistentIP");
85 ipNode->SetValue(0x0A000002);
89 forceIPNode->Execute();
91 deviceUpdateListNode->Execute();
static std::vector< DiscoveryInformation > Discover()
Discovers available devices (not vins) with a default time span of 300ms.
Definition: decl_device_factory.hpp:221
static std::shared_ptr< T > Open(const String &provider, AcquisitionStack acquisitionStack=AcquisitionStack::PreferVin)
Opens a device with the given provider with its default board and port (if applicable).
Definition: decl_device_factory.hpp:55
A node that can be executed.
Definition: command_node.hpp:20
A node that presents a choice of values.
Definition: enumeration_node.hpp:18
Represents a integer number.
Definition: integer_node.hpp:20
void SetValue(std::int64_t value)
Sets the value of this integer node.
Definition: integer_node.hpp:46