OptrisOptrisDocumentation

Documentation/OTC SDK/Optris.Sdk — C# API referencev12.0

NetworkConfiguration

public readonly record struct NetworkConfiguration : IEquatable<NetworkConfiguration>

How a camera is addressed on the network.

These are the camera's own settings, stored in the camera, and they are all it has. Changing them changes where that camera is for every program on the network, and the change survives a power cycle.

Two fields that the older Optris.OtcSdk binding had are deliberately absent, because neither was ever real:

  • DHCP. An Optris camera has no DHCP client. The old dhcp_enabled flag was never read when writing and never filled in when reading, so it reported "off" for every camera whatever its state, and setting it did nothing at all.
  • Gateway. The camera has no default gateway and cannot route. The field the old binding called Gateway was in fact the address the camera streams its frames to, which is NetworkConfiguration.StreamDestination here. An application with a "Gateway" box in its dialog is editing the stream destination and should relabel it.

NetworkConfiguration: constructors

public NetworkConfiguration(string Address, string SubnetMask, string StreamDestination, ushort Port)

How a camera is addressed on the network.

  • Address: The camera's own address, for example 10.0.0.21.
  • SubnetMask: The mask for that address, for example 255.255.248.0. It has to cover StreamDestination: the camera cannot route, so a destination outside this mask never receives a frame.
  • StreamDestination: Where the camera sends its frames, normally the host running the SDK. It must differ from Address. The SDK checks that itself and throws before it writes anything, so the camera never sees a configuration in which the two are equal: the whole configuration is rejected rather than the one field, and the rejection is the SDK's, not the device's. Do not surface it to an operator as the camera refusing the settings; it never saw them.
  • Port: The UDP port the camera streams to; 50101 from the factory. The port belongs to the camera rather than to your program, so two cameras streaming to one host must not share it.

These are the camera's own settings, stored in the camera, and they are all it has. Changing them changes where that camera is for every program on the network, and the change survives a power cycle.

Two fields that the older Optris.OtcSdk binding had are deliberately absent, because neither was ever real:

  • DHCP. An Optris camera has no DHCP client. The old dhcp_enabled flag was never read when writing and never filled in when reading, so it reported "off" for every camera whatever its state, and setting it did nothing at all.
  • Gateway. The camera has no default gateway and cannot route. The field the old binding called Gateway was in fact the address the camera streams its frames to, which is NetworkConfiguration.StreamDestination here. An application with a "Gateway" box in its dialog is editing the stream destination and should relabel it.

NetworkConfiguration: properties

public string Address { get; init; }

The camera's own address, for example 10.0.0.21.

public ushort Port { get; init; }

The UDP port the camera streams to; 50101 from the factory. The port belongs to the camera rather than to your program, so two cameras streaming to one host must not share it.

public string StreamDestination { get; init; }

Where the camera sends its frames, normally the host running the SDK. It must differ from Address. The SDK checks that itself and throws before it writes anything, so the camera never sees a configuration in which the two are equal: the whole configuration is rejected rather than the one field, and the rejection is the SDK's, not the device's. Do not surface it to an operator as the camera refusing the settings; it never saw them.

public string SubnetMask { get; init; }

The mask for that address, for example 255.255.248.0. It has to cover StreamDestination: the camera cannot route, so a destination outside this mask never receives a frame.