FrontPanel API  5.2.12
Public Member Functions | List of all members
okCDeviceSensors Class Reference

Represents the set of read-only sensors available on certain devices. More...

Public Member Functions

int GetSensorCount () const
 Retrieve the number of sensors. More...
 
okTDeviceSensor GetSensor (int index) const
 Retrieve a single sensor. More...
 

Detailed Description

The okCDeviceSensors class is a container and accessor for multiple device sensors that are retrieved from the device (via the okCFrontPanel::GetDeviceSensors method). Each call to okCFrontPanel::GetDeviceSensors resets the list of sensors contained in this class. The sensors may then be individually retrieved by the okCDeviceSensors::GetSensor method.

Member Function Documentation

◆ GetSensor()

okTDeviceSensor okCDeviceSensors::GetSensor ( int  index) const
Parameters
[in]index- Index of the sensor to retrieve.
Returns
okTDeviceSensor - A sensor structure.

Use this method to retrieve a single sensor at a particular index. This index can be from 0 to N-1 where N is the number of sensors returned by GetSensorCount().

◆ GetSensorCount()

int okCDeviceSensors::GetSensorCount ( ) const
inline
Returns
int - Number of sensors

When okCFrontPanel::GetDeviceSensors is called, it fills an instance of okCDeviceSensors with the available sensors from the device. This method is used to get the sensor count so they may be queried using the GetSensor method.


Copyright (c) 2005-2023 Opal Kelly Incorporated