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::ProcessInterface

Each PIF can have up to five different channel type. The API uses the following abbreviations to mark resources specific to a channel type:

  • Ai - analog inputs
  • Di - digital inputs
  • Ao - analog outputs
  • Do - digital outputs
  • Fs - fail safe In case of stackable PIFs the number of configurable PIFs can deviate from the number of actually connected PIFs. To reflect this the API features different count methods for PIF devices and PIF channels: Devices
  • getActualDeviceCount() returns the number of actually connected devices.
  • getConfigurableDeviceCount() returns the number configurable devices. Note: On non-stackable PIFs these methods yield the same values. Channels (XX denotes the channel type)
  • getActualXXCount() returns the count of all XX channels on actually connected devices.
  • getConfigurableXXCount() returns the count of all XX channels on configurable devices.
  • getXXCountPerDevice() returns the count of XX channels per individual device. Note: The actual PIF device count can never exceed the configurable device count. For more details and an overview of the process interface capabilities please refer to the Process Interface (PIF) chapter.

Public functions

ProcessInterface

ProcessInterface()=default

Constructor.

ProcessInterface

ProcessInterface(const ProcessInterface &)=delete

No copy constructor.

operator=

ProcessInterface & operator=(const ProcessInterface &)=delete

No copy assignment.

ProcessInterface

ProcessInterface(ProcessInterface &&)=delete

No move constructor.

operator=

ProcessInterface & operator=(ProcessInterface &&)=delete

No move assignment.

~ProcessInterface

~ProcessInterface()=default

Destructor.

getDeviceType

PifDeviceType getDeviceType() const noexcept=0

Returns the PIF device type.

Returns: PIF device type.

getSupportedDeviceTypes

std::vector< PifDeviceType > getSupportedDeviceTypes() const noexcept=0

Returns the list of PIF device types this camera model accepts in setConfig(). Cameras are categorized into three groups (autonomous, PI1, non-autonomous), each accepting a different subset of PifDeviceType values. This method reports the subset for the connected camera so clients can build a UI that only offers valid choices.

Returns: supported PIF device types for this camera.

getActualDeviceCount

int getActualDeviceCount() const noexcept=0

Returns the count of actually connected PIFs. The method only returns count of connected PIFs whose type equals the one returned by getDeviceType().

Attention: This count can never exceed the configurable device count returned by getConfigurableDeviceCount().

Returns: count of actually connected PIFs.

getConfigurableDeviceCount

int getConfigurableDeviceCount() const noexcept=0

Returns the count of configurable PIFs.

Returns: count of configurable PIFs.

isActualConnected

bool isActualConnected() const noexcept=0

Returns whether a PIF is actually connected.

Returns: false if the actual device count is 0. True otherwise.

getDeviceSerialNumber

unsigned long getDeviceSerialNumber(int deviceIndex) const =0

Returns the serial number of the PIF with the given device index.

Parameters

Name Description
deviceIndex identifying the PIF device.

Returns: serial number of the PIF with the given device index.

Exceptions

Name Description
SDKException if the device index is out of range.

getDeviceFirmwareRevision

unsigned short getDeviceFirmwareRevision(int deviceIndex) const =0

Returns the firmware revision of the PIF with the given device index.

Parameters

Name Description
deviceIndex identifying the PIF device.

Returns: firmware revision of the PIF with the given device index.

Exceptions

Name Description
SDKException if the device index is out of range.

setConfig

void setConfig(const PifConfig &config)=0

Sets the given configuration for the entire process interface.

Parameters

Name Description
config to set.

Exceptions

Name Description
SDKException if the provided configuration could not be applied.

getConfig

PifConfig getConfig() const noexcept=0

Returns the current configuration of the entire process interface.

Returns: the current configuration of the entire process interface.

getActualAiCount

int getActualAiCount() const noexcept=0

Returns the count of all analog input channels on actually connected PIFs.

Returns: count of all analog input channels on actually connected PIFs.

getConfigurableAiCount

int getConfigurableAiCount() const noexcept=0

Returns the count of all analog input channels on configurable PIFs.

Returns: count of all analog input channels on configurable PIFs.

getAiCountPerDevice

int getAiCountPerDevice() const noexcept=0

Returns the count of all analog input channels on a single PIF.

Returns: count of all analog input channels on a single PIF.

setAiConfig

void setAiConfig(const PifAiConfig &config)=0

Sets the configuration for a single analog input channel. If an analog input channel that generates an uncommitted value is switch to a different mode, dependent alarm channel turn orphaned and are subsequently removed.

Parameters

Name Description
config to set.

Exceptions

Name Description
SDKExceptions if the provided configuration could not be applied.

getAiConfig

PifAiConfig getAiConfig(int deviceIndex, int pinIndex) const =0

Returns the current configuration of the specified analog input channel.

Parameters

Name Description
deviceIndex identifying the channel.
pinIndex identifying the channel.

Returns: current configuration of the specified analog input channel.

Exceptions

Name Description
SDKException if the given indices are out of range.

getActualDiCount

int getActualDiCount() const noexcept=0

Returns the count of all digital input channels on actually connected PIFs.

Returns: count of all digital input channels on actually connected PIFs.

getConfigurableDiCount

int getConfigurableDiCount() const noexcept=0

Returns the count of all digital input channels on configurable PIFs.

Returns: count of all digital input channels on configurable PIFs.

getDiCountPerDevice

int getDiCountPerDevice() const noexcept=0

Returns the count of all digital input channels on a single PIF.

Returns: count of all digital input channels on a single PIF.

setDiConfig

void setDiConfig(const PifDiConfig &config)=0

Sets the configuration for a single digital input channel.

Parameters

Name Description
config to set.

Exceptions

Name Description
SDKExceptions if the provided configuration could not be applied.

getDiConfig

PifDiConfig getDiConfig(int deviceIndex, int pinIndex)=0

Returns the current configuration of the specified digital input channel.

Parameters

Name Description
deviceIndex identifying the channel.
pinIndex identifying the channel.

Returns: current configuration of the specified digital input channel.

Exceptions

Name Description
SDKException if the given indices are out of range.

getActualAoCount

int getActualAoCount() const noexcept=0

Returns the count of all analog output channels on actually connected PIFs.

Returns: count of all analog output channels on actually connected PIFs.

getConfigurableAoCount

int getConfigurableAoCount() const noexcept=0

Returns the count of all analog output channels on configurable PIFs.

Returns: count of all analog output channels on configurable PIFs.

getAoCountPerDevice

int getAoCountPerDevice() const noexcept=0

Returns the count of all analog output channels on a single PIF.

Returns: count of all analog output channels on a single PIF.

getDefaultAoOutputMode

PifAoOutputMode getDefaultAoOutputMode() const noexcept=0

Returns the default analog output mode of the PIF.

Returns: default analog output mode of the PIF.

setAoConfig

void setAoConfig(const PifAoConfig &config)=0

Sets the configuration for a single analog output channel.

Parameters

Name Description
config to set.

Exceptions

Name Description
SDKExceptions if the provided configuration could not be applied.

getAoConfig

PifAoConfig getAoConfig(int deviceIndex, int pinIndex)=0

Returns the current configuration of the specified analog output channel.

Parameters

Name Description
deviceIndex identifying the channel.
pinIndex identifying the channel.

Returns: current configuration of the specified analog output channel.

Exceptions

Name Description
SDKException if the given indices are out of range.

setAoValue

void setAoValue(int deviceIndex, int pinIndex, float value)=0

Sets the output value of the specified analog output channel. The provided value is automatically clipped to the set output mode limits.

Parameters

Name Description
deviceIndex identifying the channel.
pinIndex identifying the channel.
value to output.

Exceptions

Name Description
SDKException if the indices are out of range or if the channel is not set to PifAoMode::ExternalCommunication.

getActualDoCount

int getActualDoCount() const noexcept=0

Returns the count of all digital output channels on actually connected PIFs.

Returns: count of all digital output channels on actually connected PIFs.

getConfigurableDoCount

int getConfigurableDoCount() const noexcept=0

Returns the count of all digital output channels on configurable PIFs.

Returns: count of all digital output channels on configurable PIFs.

getDoCountPerDevice

int getDoCountPerDevice() const noexcept=0

Returns the count of all digital output channels on a single PIF.

Returns: count of all digital output channels on a single PIF.

setDoConfig

void setDoConfig(const PifDoConfig &config)=0

Sets the configuration for a single digital output channel.

Parameters

Name Description
config to set.

Exceptions

Name Description
SDKExceptions if the provided configuration could not be applied.

getDoConfig

PifDoConfig getDoConfig(int deviceIndex, int pinIndex)=0

Returns the current configuration of the specified digital output channel.

Parameters

Name Description
deviceIndex identifying the channel.
pinIndex identifying the channel.

Returns: current configuration of the specified digital output channel.

Exceptions

Name Description
SDKException if the given indices are out of range.

setDoValue

void setDoValue(int deviceIndex, int pinIndex, bool value)=0

Sets the output value of the specified digital output channel.

Parameters

Name Description
deviceIndex identifying the channel.
pinIndex identifying the channel.
value to output.

Exceptions

Name Description
SDKException if the indices are out of range or if the channel is not set to PifDoMode::ExternalCommunication.

hasFs

bool hasFs() const noexcept=0

Returns wether the PIF has a fail safe channel.

Returns: true if the PIF has a fail safe channel. False otherwise.

setFsConfig

void setFsConfig(const PifFsConfig &config)=0

Sets the configuration for the fail safe channel.

Parameters

Name Description
config to set.

Exceptions

Name Description
SDKException if no fail safe channel is available.

getFsConfig

PifFsConfig getFsConfig()=0

Returns the current fail safe channel configuration.

Returns: current fail safe channel configuration.

Exceptions

Name Description
SDKException if no fail safe channel is available.