OptrisOptrisDocumentation

Documentation/OTC SDK/OTC SDK — legacy C++ API referencev12.0

These are the pre-v12 classes, kept so existing code keeps building. New code should use the modern API — see Migration Guide: v11 to v12.

optris::DeviceInfo

Instances of this class are provided by the EnumerationManager and can be used to establish an connection through an IRImager implementation.

Public static functions

determineDeviceType

static OTC_SDK_API DeviceType determineDeviceType(unsigned short hardwareRevision, unsigned short firmwareRevision) noexcept

Determines the device type based on the provided hardware and firmware revisions.

Returns: determined device type.

Public functions

DeviceInfo

OTC_SDK_API DeviceInfo() noexcept

Constructor.

setSerialNumber

OTC_SDK_API void setSerialNumber(unsigned long serialNumber) noexcept

Sets the serial number of the device.

Parameters

Name Description
serialNumber to set.

getSerialNumber

OTC_SDK_API unsigned long getSerialNumber() const noexcept

Returns the serial number of the device.

Returns: serial number of the device.

setConnectionInterface

OTC_SDK_API void setConnectionInterface(const std::string &connectionInterface) noexcept

Sets the connection interface of the device. This can, for example, be USB or Ethernet.

Parameters

Name Description
connectionInterface to set.

getConnectionInterface

OTC_SDK_API const std::string & getConnectionInterface() const noexcept

Returns the connection interface of the device. This can, for example, be USB or Ethernet.

Returns: connection interface of the device.

setConnectionInterfaceAddress

OTC_SDK_API void setConnectionInterfaceAddress(const std::string &address) noexcept

Sets the address of the local connection interface through which the camera is connected. This refers to the address of the local connection interface, e.g. the usb endpoint or address or IP address of the network interface.

Parameters

Name Description
address to set.

getConnectionInterfaceAddress

OTC_SDK_API const std::string & getConnectionInterfaceAddress() const noexcept

Returns the address of the local connection interface through which the camera is connected. This refers to the address of the local connection interface, e.g. the usb endpoint or address or IP address of the network interface.

Returns: Address of the connection interface.

setIpAddress

OTC_SDK_API void setIpAddress(const IpAddress &ipAddress) noexcept

Sets the IP address. For Ethernet connections this refers to the IP address of the device.

Parameters

Name Description
ipAddress address to set.

getIpAddress

OTC_SDK_API const IpAddress & getIpAddress() const noexcept

Returns the IP address. For Ethernet connections this refers to the IP address of the device.

Returns: IP address.

setTargetIpAddress

OTC_SDK_API void setTargetIpAddress(const IpAddress &ipAddress) noexcept

Sets the IP address of the streaming target. For Ethernet connections this refers to the IP address of the streaming target machine.

Parameters

Name Description
ipAddress address to set.

getTargetIpAddress

OTC_SDK_API const IpAddress & getTargetIpAddress() const noexcept

Returns the IP address of the streaming target. For Ethernet connections this refers to the IP address of the streaming target machine.

Returns: IP address.

setPort

OTC_SDK_API void setPort(const Port &port) noexcept

Sets the port. For Ethernet connections this refers to the port the device will send its data to.

Parameters

Name Description
port to set.

getPort

OTC_SDK_API const Port & getPort() const noexcept

Returns the port. For Ethernet connections this refers to the port the device will send its data to.

Returns: port.

getDeviceType

OTC_SDK_API DeviceType getDeviceType() const noexcept

Return the device type.

Returns: device type.

setRevisions

OTC_SDK_API void setRevisions(unsigned short hardware, unsigned short firmware) noexcept

Sets the hardware and firmware revisions.

Parameters

Name Description
hardware revision to set.
firmware revision to set.

getHardwareRevision

OTC_SDK_API unsigned short getHardwareRevision() const noexcept

Returns the hardware revision.

Returns: hardware revision.

getFirmwareRevision

OTC_SDK_API unsigned short getFirmwareRevision() const noexcept

Returns the firmware revision.

Returns: firmware revision.

setBusy

OTC_SDK_API void setBusy(bool busy) noexcept

Sets the device busy state.

Parameters

Name Description
busy true if device is busy. False otherwise.

isBusy

OTC_SDK_API bool isBusy() const noexcept

Returns whether the device is busy. A device is busy when it is already used by the SDK or the PixConnect.

Returns: true if device is busy. False otherwise.

setMacAddress

OTC_SDK_API void setMacAddress(const MacAddress &mac) noexcept

Sets the MAC address.

Parameters

Name Description
mac connection state.

getMacAddress

OTC_SDK_API const MacAddress & getMacAddress() const noexcept

Returns the MAC address.

Returns: MAC address.

operator==

bool operator==(const DeviceInfo &rhs) const noexcept

Equals operator.

operator!=

bool operator!=(const DeviceInfo &rhs) const noexcept

Unequals operator.

operator<

bool operator<(const DeviceInfo &rhs) const noexcept

Less than operator.