OpenHiva::Init

Description

Initializes framework resources, such as nodes and thread groups.

Prototype

uint32_t OpenHiva::Init(const int &argc, char **argv, const std::vector<ScheduleGroup> &schedGroupVec)

Parameters

Parameter

Input/Output

Description

argc

Input

Number of input parameters.

argv

Input

Address of the input string array.

schedGroupVec

Input

Thread group. The value is of the ScheduleGroup type. For details, see OpenHiva::ScheduleGroup.

Returns

The return value is of the uint32_t type. If the operation is successful, HIVA_SUCCESS (value being 0) is returned. If other values are returned, the operation fails.

Usage

The application calls the initialization interface to initialize the OpenHiva node, including applying for resources, reading data, and parsing parameters required for framework running.

Precautions

  • This interface cannot be reentrant. A process can invoke this interface only once.
  • Synchronous invocation is supported.
  • Invoke this interface before the node is instantiated.
  • If OpenHiva::Init is not invoked for initialization or OpenHiva::Init fails to be invoked, OpenHiva::Ready returns false. If OpenHiva::Init is invoked successfully, OpenHiva::Ready returns true.