omni_get_definition(3) — Subroutines
Name
omni_get_definition − The omni_get_definition procedure retrieves the value of a specified attribute of a specified definition and inserts the value in an address specified by the caller.
Omni_get_definition retrieves the values of both single-valued and multi-valued attributes. In the case of multi-valued attributes, omni_get_definition acts similar to omni_get_handle_list. Each call to either of the routines returns one value. The value of the ATTRIBUTE parameter should specify the address of the attribute on the first call, and should be NULL thereafter. A value of NULL for the ATTRIBUTE parameter indicates that the next value should be specified or retrieved. In the case of omni_get_definition, when the last value has been retrieved, omni_s_endoflist is returned as the status value. The omni_end_list routine should be called after a list of values has been retrieved.
Syntax
extern unsigned long int omni_get_definition (
omni_l_handle def_handle,
omni_l_attributes ∗attribute,
omni_l_context ∗context,
void ∗value,
unsigned long int value_length);
Arguments
def_handle
access: read only mechanism: by value Def_handle specifies the handle of the definition to modify. The value of this parameter is one of the following:
•VMD Handle
•Domain Handle
•PI Handle
•Named Variable Handle
•Unnamed Variable Handle
•MMS Named Type Handle
•Application Named Type Handle
•MMS Type Specification Handle
•Application Type Specification Handle
•MMS Structure Component
•Application Structure Component
•Message Handle
attributeaccess: read only mechanism: by reference Attribute specifies the address of a variable whose value is the attribute to retrieve.
contextaccess: read/write mechanism: by reference Context is the address of a variable. This parameter is used only if you retrieve the value of a multi-valued attribute.
The value of context should be initialized to NULL. In general, the value of the context should be modified when as many values as required have been retrieved from a multi-valued attribute. In this case, omni_end_list should be called to free any unneeded space allocated by DEComni. The value of the context should be then reset to zero.
valueaccess: write only mechanism: by reference Value is the address of a buffer in which the attribute value is returned.
value_lengthaccess: read only mechanism: by value The size of the value buffer in bytes.
The attributes supported for each definition class and the expected type of the buffer to receive the value are listed in the following tables.
The following table shows VMD data information.
| Attribute | Expected Data Type |
| omni_c_attr_name | omni_t_mms_id_nt |
| omni_c_attr_app_profile | Longword |
| omni_c_attr_logical_status | LongInteger |
| omni_c_attr_physical_status | LongInteger |
| omni_c_attr_local_detail | omni_a_local_detail |
| omni_c_attr_appl_simple_name | omni_t_appl_simple_name_wc |
| omni_c_attr_description | omni_t_description |
| omni_c_attr_vmd_segment | Longword |
| omni_c_attr_vmd_srv_called | Word |
| omni_c_attr_vmd_srv_calling | Word |
| omni_c_attr_model | omni_t_visible_str_127_nt |
| omni_c_attr_vmd_nesting | Byte |
| omni_c_attr_param_supported | omni_a_param_cbb |
| omni_c_attr_revision | omni_t_visible_str_127_nt |
| omni_c_attr_srv_supported | omni_a_services_supported |
| omni_c_attr_vendor | omni_t_visible_str_127_nt |
| omni_c_attr_version | Word |
| omni_c_attr_cls_dom | omni_t_mms_id_nt |
| omni_c_attr_cls_pi | omni_t_mms_id_nt |
| omni_c_attr_cls_named_var | omni_t_mms_id_nt |
| OMNI_c_attr_cls_unnamed_var | omni_t_mms_id_nt |
| OMNI_c_attr_cls_mms_named_type | omni_t_mms_id_nt |
| omni_c_attr_cls_app_named_type | omni_t_mms_id_nt |
| omni_c_attr_user_param | Longword |
The following table shows Domain data information.
| Attribute | Expected Data Type |
| omni_c_attr_name | omni_t_mms_id_nt |
| omni_c_attr_profile | Longword |
| omni_c_attr_capability_file | omni_t_visible_str_127_nt |
| omni_c_attr_deletable | omni_b_boolean |
| omni_c_attr_description | omni_t_description |
| omni_c_attr_dom_content_file | omni_t_file_name |
| omni_c_attr_scope | omni_l_handle |
| omni_c_attr_sharable | omni_b_boolean |
| omni_c_attr_cls_named_var | omni_t_app_id_nt |
| omni_c_attr_cls_mms_named_type | omni_t_mms_id_nt |
| omni_c_attr_cls_app_named_type | omni_t_app_id_nt |
| omni_c_attr_user_param | Longword |
The following table shows PI data information.
| Attribute | Expected Data Type |
| omni_c_attr_name | omni_t_mms_id_nt |
| omni_c_attr_app_profile | Longword |
| omni_c_attr_deletable | omni_b_boolean |
| omni_c_attr_description | omni_t_description |
| omni_c_attr_ref_dom_names | omni_t_mms_id_nt |
| omni_c_attr_exec_arg_str | omni_t_visible_str_255_nt |
| omni_c_attr_reusable | omni_b_boolean |
| omni_c_attr_monitor | omni_l_pi_monitor |
| omni_c_attr_scope | omni_l_handle |
| omni_c_attr_user_param | Longword |
The following table shows Named Variable data information.
| Attribute | Expected Data Type |
| omni_c_attr_name | omni_t_mms_id_nt |
| omni_c_attr_description | omni_t_description |
| omni_c_attr_mms_type_desc | omni_r_mms_type_spec |
| omni_c_attr_app_type_desc | omni_r_app_type_spec |
| omni_c_attr_scope | omni_l_handle |
| omni_c_attr_user_param | Longword |
| omni_c_attr_deletable | omni_b_boolean |
The following table shows Unnamed Variable data information.
| Attribute | Expected Data Type |
| omni_c_attr_name | omni_t_mms_id_nt |
| omni_c_attr_description | omni_t_description |
| omni_c_attr_mms_type_desc | omni_r_mms_type_spec |
| omni_c_attr_app_type_desc | omni_r_app_type_spec |
| omni_c_attr_scope | omni_l_handle |
| omni_c_attr_user_param | Longword |
| omni_c_attr_supply_type_spec | omni_b_boolean |
| omni_c_attr_address_type | omni_l_address_types |
| omni_c_attr_address_string | omni_t_address_str |
| omni_c_attr_address_number | Longword |
The following table shows MMS Named Type data information.
| Attribute | Expected Data Type |
| omni_c_attr_name | omni_t_mms_id_nt |
| omni_c_attr_desc | omni_t_description |
| omni_c_attr_mms_type_description | omni_r_mms_type_spec |
| omni_c_attr_scope | omni_l_handle |
| omni_c_attr_user_param | Longword |
| omni_c_attr_deletable | omni_b_boolean |
The following table shows MMS Type Specification data information.
| Attribute | Expected Data Type |
| omni_c_attr_mms_type_desc | omni_r_mms_type_spec |
| omni_c_attr_user_param | Longword |
| omni_c_attr_struct_comp | omni_l_handle |
| omni_c_attr_array_elem_mms_type | omni_l_handle |
| omni_c_attr_description | omni_t_description |
| omni_c_attr_scope | omni_l_handle |
Usage Notes
•The value of the scope attribute will be the handle of the only MMS definition or the last Application definition to refer to the MMS Type Specification definition.
The following table shows Application Named Type data information.
| Attribute | Expected Data Type |
| omni_c_attr_name | omni_t_mms_id_nt |
| omni_c_attr_desc | omni_t_description |
| omni_c_attr_app_type_description | omni_r_app_type_spec |
| omni_c_attr_mms_named_type | omni_l_handle |
| omni_c_attr_scope | omni_l_handle |
| omni_c_attr_user_param | Longword |
| omni_c_attr_alternate_access | omni_b_boolean |
The following table shows Application Type Specification data information.
| Attribute | Expected Data Type |
| omni_c_attr_app_type_desc | omni_r_app_type_spec |
| omni_c_attr_scope | omni_l_handle |
| omni_c_attr_user_param | Longword |
| omni_c_attr_description | omni_t_description |
| omni_c_attr_mms_type_spec | omni_l_handle |
| omni_c_attr_struct_comp | omni_l_handle |
| omni_c_attr_array_elem_app_type | omni_l_handle |
Usage Notes
•The value of the scope attribute is the handle of the definition that refers to the Application Type Specification definition.
The following table shows MMS Structure Component data information.
| Attribute | Expected Data Type |
| omni_c_attr_name | omni_t_mms_id_nt |
| omni_c_attr_desc | omni_t_description |
| omni_c_attr_mms_type_description | omni_r_mms_type_spec |
| omni_c_attr_scope | omni_l_handle |
| omni_c_attr_user_param | Longword |
The following table shows Application Structure Component data information.
| Attribute | Expected Data Type |
| omni_c_attr_name | omni_t_mms_id_nt |
| omni_c_attr_description | omni_t_description |
| omni_c_attr_mms_struct_comp | omni_l_handle |
| omni_c_attr_app_type_desc | omni_r_app_type_spec |
| omni_c_attr_user_param | Longword |
| omni_c_attr_byte_offset | Longword |
| omni_c_attr_alternate_access | omni_b_boolean |
| omni_c_attr_scope | omni_l_handle |