oms_pr_attr_set()
Abstract
Sets attributes and/or its value for the processes registered in the process registry.
Syntax
oms_pr_attr_set (pr_handle, attr0_name, attr0_type, attr0_value,…, OPC_NIL)
| Argument | Type | Description |
|---|---|---|
pr_handle |
OmsT_Pr_Handle |
process registry process record handle for the process publishing attributes. [A process registry process record handle may be obtained by using the procedure oms_pr_process_register(), or as a result of process discovery mechanism.] |
attr0_name |
char * |
name of the attribute to be set. |
attr0_type |
int |
data type of the attribute to be set (see Details). |
attr0_value |
Vartype |
value of the attribute to be set. |
OPC_NIL |
sequence terminator. |
Return Type
Compcode
Completion code indicating whether the attribute setting procedure succeeded.
[This return code can be compared to constants OPC_COMPCODE_SUCCESS and OPC_COMPCODE_FAILURE to determine the outcome.]
Details
This procedure assigns an attribute of a given registered process a value. The attribute is created for the process if it does not already exist. If it does exist and the type does not match, its type and value are changed.
The arguments to this procedure form a variable length sequence of name-type-value triplets terminated by the symbolic constant OPC_NIL. The following attribute types can be set:
- OMSC_PR_OBJID
- OMSC_PR_STRING
- OMSC_PR_NUMBER
- OMSC_PR_STRINGLIST
- OMSC_PR_PROHANDLE
- OMSC_PR_ADDRESS
For more details on these attribute types, see Additional Attributes.