GetDataDouble

Description

GetDataDouble returns the parameters and their values and displays them in the tree.

Syntax

GetDataDouble(const unsigned int iunIndex, COptString& owszParameterName, COptString& owszParameterType, double& odValue) const;

Parameters

Input

iunIndex: index of the parameter returned unique for each one.

owszParameterName: name of the parameter to be displayed in the tree.

owszParameterType: type of the parameter to be displayed in the tree:

  • Length (meter)
  • Plane angle (radian)

odValue: value of the parameter to be displayed in the tree.

Example

To get a full example of the API use, download the .Plugin

#define OPT_PLUGIN_NO_ERROR 0
#define OPT_PLUGIN_ERROR_UNKNOWN_TEST 3
std::vector
int GetDataDouble(const unsigned int iunIndex, wchar_t*& iwszParameterName, wchar_t*& iwszParameterType, double& odValue)
{
   // Check if the test index is not outside of the test vector
   if (iunIndex < gvDisplayData.size())
   {
      DisplayData& temp = gvDisplayData.at(iunIndex);
      iwszParameterName = const_cast<wchar_t*>(temp.Name.c_str());
      iwszParameterType = const_cast<wchar_t*>(temp.Unit.c_str());
      odValue = temp.Value;
   }
   else
   {
      return OPT_PLUGIN_ERROR_UNKNOWN_TEST;
   }
   return OPT_PLUGIN_NO_ERROR;
}