op_apptrack_instance_create()
Abstract
Creates a new application instance.
Syntax
op_apptrack_instance_create (apptrack_hndl, source, app_type_id, app_instance_name)
| Argument | Type | Description |
|---|---|---|
apptrack_hndl |
Apptrackhandle |
ADT state of interest. |
source |
Objid |
Object ID of the node containing the application to be tracked. |
app_type_id |
OpT_uInt32 |
An application type ID obtained with op_apptrack_type_register(). |
app_instance_name |
const char * |
Name for this application instance. |
Return Type
OpT_uInt32
Globally unique application instance ID, or OPC_APPTRACK_APP_INSTANCE_INVALID if an error occurred.
Details
Application instance IDs begin with 0. Duplicate calls return new application instance IDs.
Purpose
This KP creates a new application instance and initializes its start time.
Errors
- Recoverable Error: Argument (
apptrack_hndl) is NIL. - Recoverable Error: Object ID (
<source>) is out-of-range. - Recoverable Error: Source object ID (
<source>) refers to a restricted object. - Recoverable Error: Object (
<source>) has incorrect type (<type>); node objects are expected. - Recoverable Error: Argument app_type_id (
<app_type_id>) is invalid. - Recoverable Error: Argument (
app_instance_name) is NIL.
Reference
- Use the KP op_apptrack_instance_complete() to record that an application instance is completed.
- Use the KP op_apptrack_create() to create
apptrack_hndl. - Use the KP op_apptrack_type_register() to create an application type ID.