onBoard()

The method checks whether an asset is valid (onboarding). The method connects to MindSphere.

Synopsis

int onBoard();

Return value

The method returns 0 when a connection to MindSphere Server could be established. The method returns -1 when the data point passed to the constructor is not an asset data point or the connection establishment fails.

Description

Starts the onboarding/connecting process for the MindSphere asset. This method does not have to be used to upload values by using the MindSphereAsset class. You can, however, check whether the internal state of the asset is valid.

Example

  1. #uses "classes/mindSphere/MindSphereAsset"
    
    void main()
    {
      string dp = "NameOfMindSphereAsset"; /* This MindSphere Asset must already exist in WinCC OA. */
      MindSphereAsset assetX = MindSphereAsset(dp);
      //shared_ptr can also be used
      //shared_ptr<MindSphereAsset> assetPtr = new MindSphereAsset(dp);
      int err = assetX.onBoard();
      DebugTN(err);
      //int errPtr = assetPtr.onBoard();
      //DebugTN(errPtr);
    }

Assignment

MindSphere

Availability

UI, CTRL

See also