Closed g40 closed 8 months ago
Any suggestions and questions are welcome.
The Qt device selection dialog example shows how to extract the IP Address for a device:
It is a little cumbersome with setting DeviceSelector to the index of the device in the list of devices and then querying GevDeviceIPAddress, but should do the trick.
May I ask what your use case for getting the IP Address is? If you want to remember a unique identifier for a device, DeviceInfo::uniqueName()
should be safer, since an IP address might change.
Hello Tim
Thank you for the quick response.
I'd not seen the QT code. I'll check that out.
re the address itself, the use case is one where we might be switching between cameras where all cameras have fixed IP addresses. (set up using the ipconfig_cmd
tool)
If you know the camera's fixed IP address, you can just pass it to deviceOpen
(which tries to be smart about the string you pass), e.g.
grabber.deviceOpen("192.168.0.27")
However, in my opinion, using DeviceUserId
is often the cleanest solution for that scenario.
Thanks for the tip. I'm using the serial number to open, did not realize IP address worked as well.
Hello,
Is this the right place to ask questions? Using the IC4 SDK with some GigE cameras.
Assuming yes then can I get the IP address of a connected unit?
ic4::DeviceInfo
provides some details but less than I'd expect.