Previous Next Contents Index


7


Definition of Management Information (DMI) API

The DMI API provides functions that offer a means to emit standard notifications and to simplify encoding and decoding of ASN.1 syntaxes.


ca_dmi_add_package()

Add an object identifier (OID) within a list of OIDs.

Synopsis

#include <cmip/xom.h>
#include <tmn_agent/usr_caDefs.h>
#include <tmn_agent/usr_caDmi.h>

OM_return_code ca_dmi_add_package(
ca_ident_t *id,
OM_string *encod
);

Description
Used for adding an OID within a list of OIDs. The function allows encoding of the syntax associated with the package attribute as defined in ITU-T X.721/ISO-10165-2 Definition of Management Information. The syntax is a set of object identifiers.

Arguments
id

The id parameter contains the OID to be added. The id parameter does not need to be encoded.

encod

The encod parameter contains the current encoded data. Before calling the ca_dmi_add_package() function for the first time, this parameter must be initialized to NULL.

Returns
The function returns OM_SUCCESS upon successful completion. If an error occurs, the function returns an XOM error code as defined in cmip/xom.h.


ca_dmi_attrValChngNotif()

Emit a notification of several attribute value changes.

Synopsis

#include <cmip/xom.h>
#include <tmn_agent/usr_caDefs.h>
#include <tmn_agent/usr_caDmi.h>

OM_return_code ca_dmi_attrValChngNotif(
ca_context_t *context,
void *usrRef,
OM_enumeration sourceIndicator,
OM_integer notificationIdentifier,
char *attributeValueChangeDef,
char *additionalText
);

Description
Used for emitting an attribute value change notification as specified in ITU-T X.730/ISO-10164-1 Object Management Function. This function must be used for notifications in which a list of attribute value changes is forwarded. To build the list of attribute value changes, use the ca_dmi_bldAttrChngLst() function. The function frees the memory previously allocated by the calls to ca_dmi_bldAttrChngLst() for building the attributeValueChangeDef parameter.

The function does not allow these elements, defined in ITU-T X.721/ISO-10165-2 Definition of Management Information, to be specified in the notification:

Arguments
context

Pointer to a structure of type ca_context_t, which is defined in the file tmn_agent/usr_caDefs.h and contains information that defines the behavior of the core agent.

usrRef

The usrRef parameter contains the user reference, which identifies the object instance emitting the notification. This is the identifier that was passed to the core agent when the instance was added to the management information tree (MIT). If no user reference was passed to the core agent when the instance was added to the MIT, this parameter must be set to NULL.

sourceIndicator

The sourceIndicator parameter indicates whether the source of the attribute value change is the managed resource, the manager or unknown. Predefined values are provided as follows:

#define CA_DMI_T_SOURCEINDICATOR_resource 0
#define CA_DMI_T_SOURCEINDICATOR_management 1
#define CA_DMI_T_SOURCEINDICATOR_unknown 2

notificationIdentifier

The notificationIdentifier parameter allows the caller to provide a notification identifier. If no value is required, notificationIdentifier should be set to -1.

attributeValueChangeDef

The attributeValueChangeDef parameter allows the caller to specify the list of attribute value changes to be included in the notification. As required in ITU-T X.730/ISO-10164-1 Object Management Function, at least one change needs to be reported. Therefore, attributeValueChangeDef must not be NULL. It must contain a value previously built by one or more calls to ca_dmi_bldAttrChngLst(). The memory required for storing attributeValueChangeDef is freed by the function.

additionalText

The additionalText parameter allows the caller to provide additional text to be added to the attribute value change notification as specified in ITU-T X.721/ISO-10165-2 Definition of Management Information. If no value is required, additionalText should be set to NULL.

Returns
The function returns OM_SUCCESS upon successful completion. If an error occurs, the function returns an XOM error code as defined in cmip/xom.h.


ca_dmi_attrValChngNotifSingle()

Emit a notification of a single attribute value change.

Synopsis

#include <cmip/xom.h>
#include <tmn_agent/usr_caDefs.h>
#include <tmn_agent/usr_caDmi.h>

OM_return_code ca_dmi_attrValChngNotifSingle(
ca_context_t *context,
void *usrRef,
OM_enumeration sourceIndicator,
OM_integer notificationIdentifier,
char *additionalText,
ca_ident_t *attributeIdentifier,
OM_descriptor *oldValue,
OM_descriptor *newValue
);

Description
Used for emitting an attribute value change notification as specified in ITU-T X.730/ISO-10164-1 Object Management Function. This function can be used only for notifications in which one attribute value change is forwarded. It does not allow these elements, defined in ITU-T X.721/ISO-10165-2 Definition of Management Information, to be specified in the notification:

Arguments
context

Pointer to a structure of type ca_context_t, which is defined in the file tmn_agent/usr_caDefs.h and contains information that defines the behavior of the core agent.

usrRef

The usrRef parameter contains the user reference, which identifies the object instance emitting the notification. This is the identifier that was passed to the core agent when the instance was added to the management information tree (MIT). If no user reference was passed to the core agent when the instance was added to the MIT, this parameter must be set to NULL.

sourceIndicator

The sourceIndicator parameter indicates whether the source of the attribute value change is the managed resource, the manager or unknown. Predefined values are provided as follows:

#define CA_DMI_T_SOURCEINDICATOR_resource 0
#define CA_DMI_T_SOURCEINDICATOR_management 1
#define CA_DMI_T_SOURCEINDICATOR_unknown 2

notificationIdentifier

The notificationIdentifier parameter allows the caller to provide a notification identifier. If no value is required, notificationIdentifier should be set to -1.

additionalText

The additionalText parameter allows the caller to provide additional text to be added to the attribute value change notification as specified in ITU-T X.721/ISO-10165-2 Definition of Management Information. If no value is required, additionalText should be set to NULL.

attributeIdentifier

The attributeIdentifier parameter provides the identification of the attribute that has changed in value. Use the pointer to the ca_ident_t structure used for declaring the attribute to the GO API.

oldValue

The oldValue parameter should contain the old value of the attribute that has been modified and for which a notification should be emitted. If you do not require the old value to be included in the notification, oldValue should be set to NULL.

newValue

The newValue parameter contains the new value of the attribute that has been modified and for which a notification should be emitted.

Returns
The function returns OM_SUCCESS upon successful completion. If an error occurs, the function returns an XOM error code as defined in cmip/xom.h.


ca_dmi_bldAttrChngLst()

Build an attribute value change list.

Synopsis

#include <cmip/xom.h>
#include <tmn_agent/usr_caDefs.h>
#include <tmn_agent/usr_caDmi.h>

OM_return_code ca_dmi_bldAttrChngLst(
ca_context_t *context,
char **attributeValueChange,
ca_ident_t *attributeIdentifier,
OM_descriptor *oldValue,
OM_descriptor *newValue
);

Description
Used for building an AttributeValueChangeDefinition as specified in ITU-T X.730/ISO-10164-1 Object Management Function. The AttributeValueChangeDefinition is defined as a set of elements. The function allows an element to be added to the set of elements identified by the attributeValueChange parameter. For the first element of a particular set, attributeValueChange should be set to NULL before the function is called.

Arguments
context

Pointer to a structure of type ca_context_t, which is defined in the file tmn_agent/usr_caDefs.h and contains information that defines the behavior of the core agent.

attributeValueChange

Pointer to the set of attributeValueChange elements to which an element needs to be added.

attributeIdentifier

The attributeIdentifier parameter provides the identification of the attribute that has changed in value. Use the pointer to the ca_ident_t structure used for declaring the attribute to the GO API.

oldValue

The oldValue parameter should contain the old value of the attribute that has been modified and for which a notification should be emitted. If no value is required, oldValue should be set to NULL.

newValue

The newValue parameter should contain the new value of the attribute that has been modified and for which a notification should be emitted.

Returns
The function returns OM_SUCCESS upon successful completion. If an error occurs, the function returns an XOM error code as defined in cmip/xom.h.


ca_dmi_bldAttrLst()

Build an attribute value list.

Synopsis

#include <cmip/xom.h>
#include <tmn_agent/usr_caDefs.h>
#include <tmn_agent/usr_caDmi.h>

OM_return_code ca_dmi_bldAttrLst(
ca_context_t *context,
char **attributeList,
ca_ident_t *attributeIdentifier,
OM_descriptor *value
);

Description
Used for building an AttributeValueDefinition as specified in ITU-T X.730/ISO-10164-1 Object Management Function. The AttributeValueDefinition is defined as a set of elements. The function allows an element to be added to the set of elements identified by the attributeList parameter. For the first element of a particular set, attributeList should be set to NULL before the function is called.

Arguments
context

Pointer to a structure of type ca_context_t, which is defined in the file tmn_agent/usr_caDefs.h and contains information that defines the behavior of the core agent.

attributeList

Pointer to the set of attributeValue elements to which an element needs to be added.

attributeIdentifier

The attributeIdentifier parameter provides the identification of the attribute that is to be added to the list. Use the pointer to the ca_ident_t structure used for declaring the attribute to the GO API.

value

The value parameter should contain the value of the attribute for which a notification should be emitted.

Returns
The function returns OM_SUCCESS upon successful completion. If an error occurs, the function returns an XOM error code as defined in cmip/xom.h.


ca_dmi_commsAlrmNotif()

Emit a communications alarm notification.

Synopsis

#include <cmip/xom.h>
#include <tmn_agent/usr_caDefs.h>
#include <tmn_agent/usr_caDmi.h>

OM_return_code ca_dmi_commsAlrmNotif(
ca_context_t *context,
void *usrRef,
ca_dmi_alarmInfo_t *alarmInfo
);

Description
Used for emitting a communications alarm notification as specified in ITU-T X.733/ISO-10164-4 Alarm Reporting Function. The function can be used both for notifications that report a single alarm and for notifications that report more than one alarm. When it is used for notifications that report more than one alarm, the list of alarms must be built using calls to ca_dmi_bldAttrLst().

The function does not allow these elements, defined in ITU-T X.721/ISO-10165-2 Definition of Management Information, to be specified in the notification:

Arguments
context

Pointer to a structure of type ca_context_t, which is defined in the file tmn_agent/usr_caDefs.h and contains information that defines the behavior of the core agent.

usrRef

The usrRef parameter contains the user reference, which identifies the object instance emitting the notification. This is the identifier that was passed to the core agent when the instance was added to the management information tree (MIT). If no user reference was passed to the core agent when the instance was added to the MIT, this parameter must be set to NULL.

alarmInfo

Pointer to a structure of type ca_dmi_alarmInfo_t containing information to be included in the communications alarm.

Returns
The function returns OM_SUCCESS upon successful completion. If an error occurs, the function returns an XOM error code as defined in cmip/xom.h.


ca_dmi_encode_moi_usrRef()

Encode the distinguished name of a managed object instance.

Synopsis

#include <cmip/xom.h>
#include <tmn_agent/usr_caDefs.h>
#include <tmn_agent/usr_caDmi.h>

OM_return_code ca_dmi_encode_moi_usrRef(
ca_context_t *context,
void *usrRef,
OM_descriptor *encod
);

Description
Used for translating the distinguished name of a managed object instance into an ASN.1 encoded string. The managed object instance is identified by its user reference. If no user reference was passed to the core agent when the instance was added to the MIT, you cannot use this function. The ASN.1 syntax of the encoded string is ObjectInstance as defined in ITU-T X.711/ISO-9596-1 Common Management Information Protocol Specification. The caller must call the standard C function free to free the memory allocated for encoding the string.

Arguments
context

Pointer to a structure of type ca_context_t, which is defined in the file tmn_agent/usr_caDefs.h and contains information that defines the behavior of the core agent.

usrRef

The usrRef parameter contains the user reference, which identifies the managed object instance. This is the identifier that was passed to the core agent when the instance was added to the management information tree (MIT).

Output
encod

Pointer to an OM_descriptor structure that contains the encoded string representing the distinguished name of the managed object instance. The value member of the OM_descriptor structure is an OM_string structure. The length member of the OM_string structure contains the length of the encoded string. The elements member of the OM_string structure contains the encoded string.

Returns
The function returns OM_SUCCESS upon successful completion. If an error occurs, the function returns an XOM error code as defined in cmip/xom.h.


ca_dmi_encode_objectClass()

Encode the name of a managed object class.

Synopsis

#include <cmip/xom.h>
#include <tmn_agent/usr_caDefs.h>
#include <tmn_agent/usr_caDmi.h>

OM_return_code ca_dmi_encode_objectClass(
OM_descriptor *class,
OM_descriptor *encod
);

Description
Used for translating the name of a managed object class into an ASN.1 encoded string. The ASN.1 syntax of the encoded string is ObjectClass as defined in ITU-T X.711/ISO-9596-1 Common Management Information Protocol Specification. The caller must call the standard C function free to free the memory allocated for encoding the string.

Arguments
class

Pointer to a structure of type OM_descriptor, as defined by the XOM API. This structure contains the class name to be encoded. The type member of the OM_descriptor structure must correspond to the form in which you want the class name to be encoded; namely, MP_LOCAL_FORM if the form is local or MP_GLOBAL_FORM if the form is global.

Output
encod

Pointer to an OM_descriptor structure that contains the encoded string representing the name of the managed object class. The value member of the OM_descriptor structure is an OM_string structure. The length member of the OM_string structure contains the length of the encoded string. The elements member of the OM_string structure contains the encoded string.

Returns
The function returns OM_SUCCESS upon successful completion. If an error occurs, the function returns an XOM error code as defined in cmip/xom.h.


ca_dmi_envAlrmNotif()

Emit an environmental alarm notification.

Synopsis

#include <cmip/xom.h>
#include <tmn_agent/usr_caDefs.h>
#include <tmn_agent/usr_caDmi.h>

OM_return_code ca_dmi_envAlrmNotif(
ca_context_t *context,
void *usrRef,
ca_dmi_alarmInfo_t *alarmInfo
);

Description
Used for emitting an environmental alarm notification as specified in ITU-T X.733/ISO-10164-4 Alarm Reporting Function. The function can be used both for notifications that report a single alarm and for notifications that report more than one alarm. When it is used for notifications that report more than one alarm, the list of alarms must be built using calls to ca_dmi_bldAttrLst().

The function does not allow these elements, defined in ITU-T X.721/ISO-10165-2 Definition of Management Information, to be specified in the notification:

Arguments
context

Pointer to a structure of type ca_context_t, which is defined in the file tmn_agent/usr_caDefs.h and contains information that defines the behavior of the core agent.

usrRef

The usrRef parameter contains the user reference, which identifies the object instance emitting the notification. This is the identifier that was passed to the core agent when the instance was added to the management information tree (MIT). If no user reference was passed to the core agent when the instance was added to the MIT, this parameter must be set to NULL.

alarmInfo

Pointer to a structure of type ca_dmi_alarmInfo_t containing information to be included in the environmental alarm.

Returns
The function returns OM_SUCCESS upon successful completion. If an error occurs, the function returns an XOM error code as defined in cmip/xom.h.


ca_dmi_equipAlrmNotif()

Emit an equipment alarm notification.

Synopsis

#include <cmip/xom.h>
#include <tmn_agent/usr_caDefs.h>
#include <tmn_agent/usr_caDmi.h>

OM_return_code ca_dmi_equipAlrmNotif(
ca_context_t *context,
void *usrRef,
ca_dmi_alarmInfo_t *alarmInfo
);

Description
Used for emitting an equipment alarm notification as specified in ITU-T X.733/ISO-10164-4 Alarm Reporting Function. The function can be used both for notifications that report a single alarm and for notifications that report more than one alarm. When it is used for notifications that report more than one alarm, the list of alarms must be built using calls to ca_dmi_bldAttrLst().

The function does not allow these elements, defined in ITU-T X.721/ISO-10165-2 Definition of Management Information, to be specified in the notification:

Arguments
context

Pointer to a structure of type ca_context_t, which is defined in the file tmn_agent/usr_caDefs.h and contains information that defines the behavior of the core agent.

usrRef

The usrRef parameter contains the user reference, which identifies the object instance emitting the notification. This is the identifier that was passed to the core agent when the instance was added to the management information tree (MIT). If no user reference was passed to the core agent when the instance was added to the MIT, this parameter must be set to NULL.

alarmInfo

Pointer to a structure of type ca_dmi_alarmInfo_t containing information to be included in the equipment alarm.

Returns
The function returns OM_SUCCESS upon successful completion. If an error occurs, the function returns an XOM error code as defined in cmip/xom.h.


ca_dmi_freeAttrChngLst()

Free a set of attribute value changes.

Synopsis

#include <cmip/xom.h>
#include <tmn_agent/usr_caDefs.h>
#include <tmn_agent/usr_caDmi.h>

OM_return_code ca_dmi_freeAttrChngLst(
ca_context_t *context,
char *attributeValueChange
);

Description
Used for freeing a set of attribute value changes built through calls to ca_dmi_bldAttrChngLst().

Arguments
context

Pointer to a structure of type ca_context_t, which is defined in the file tmn_agent/usr_caDefs.h and contains information that defines the behavior of the core agent.

attributeValueChange

Pointer to the set of attribute value changes to be freed.

Returns
The function returns OM_SUCCESS upon successful completion. If an error occurs, the function returns an XOM error code as defined in cmip/xom.h.


ca_dmi_freeAttrLst()

Free a set of attribute values.

Synopsis

#include <cmip/xom.h>
#include <tmn_agent/usr_caDefs.h>
#include <tmn_agent/usr_caDmi.h>

OM_return_code ca_dmi_freeAttrLst(
ca_context_t *context,
char *attributeList
);

Description
Used for freeing a set of attribute values built through calls to ca_dmi_bldAttrLst().

Arguments
context

Pointer to a structure of type ca_context_t, which is defined in the file tmn_agent/usr_caDefs.h and contains information that defines the behavior of the core agent.

attributeList

Pointer to the set of attribute values to be freed.

Returns
The function returns OM_SUCCESS upon successful completion. If an error occurs, the function returns an XOM error code as defined in cmip/xom.h.


ca_dmi_init()

Initialize the DMI library.

Synopsis

#include <cmip/xom.h>
#include <tmn_agent/usr_caDefs.h>
#include <tmn_agent/usr_caDmi.h>

OM_return_code ca_dmi_init(
ca_context_t *context
);

Description
Used for initializing the DMI library. The function initializes routines for encoding and decoding ASN.1 syntaxes.

Arguments
context

Pointer to a structure of type ca_context_t, which is defined in the file tmn_agent/usr_caDefs.h and contains information that defines the behavior of the core agent.

Returns
The function returns OM_SUCCESS upon successful completion. If an error occurs, the function returns an XOM error code as defined in cmip/xom.h.


ca_dmi_objCreNotif()

Emit an object creation notification.

Synopsis

#include <cmip/xom.h>
#include <tmn_agent/usr_caDefs.h>
#include <tmn_agent/usr_caDmi.h>

OM_return_code ca_dmi_objCreNotif(
ca_context_t *context,
void *usrRef,
OM_enumeration sourceIndicator,
OM_boolean attributeList,
OM_integer notificationIdentifier,
char *additionalText
);

Description
Used for emitting an object creation notification as specified in ITU-T X.730/ISO-10164-1 Object Management Function. The function does not allow these elements, defined in ITU-T X.721/ISO-10165-2 Definition of Management Information, to be specified in the notification:

Arguments
context

Pointer to a structure of type ca_context_t, which is defined in the file tmn_agent/usr_caDefs.h and contains information that defines the behavior of the core agent.

usrRef

The usrRef parameter contains the user reference, which identifies the object instance emitting the notification. This is the identifier that was passed to the core agent when the instance was added to the management information tree (MIT). If no user reference was passed to the core agent when the instance was added to the MIT, this parameter must be set to NULL.

sourceIndicator

The sourceIndicator parameter indicates whether the source of the creation is the managed resource, the manager or unknown. Predefined values are provided as follows:

#define CA_DMI_T_SOURCEINDICATOR_resource 0
#define CA_DMI_T_SOURCEINDICATOR_management 1
#define CA_DMI_T_SOURCEINDICATOR_unknown 2

attributeList

The attributeList parameter is not supported currently. It is always set to OM_FALSE.

notificationIdentifier

The notificationIdentifier parameter allows the caller to provide a notification identifier. If no value is required, notificationIdentifier should be set to -1.

additionalText

The additionalText parameter allows the caller to provide additional text to be added to the object creation notification as specified in ITU-T X.721/ISO-10165-2 Definition of Management Information. If no value is required, additionalText should be set to NULL.

Returns
The function returns OM_SUCCESS upon successful completion. If an error occurs, the function returns an XOM error code as defined in cmip/xom.h.


ca_dmi_objDelNotif()

Emit an object deletion notification.

Synopsis

#include <cmip/xom.h>
#include <tmn_agent/usr_caDefs.h>
#include <tmn_agent/usr_caDmi.h>

OM_return_code ca_dmi_objDelNotif(
ca_context_t *context,
void *usrRef,
OM_enumeration sourceIndicator,
OM_boolean attributeList,
OM_integer notificationIdentifier,
char *additionalText
);

Description
Used for emitting an object deletion notification as specified in ITU-T X.730/ISO-10164-1 Object Management Function. The function does not allow these elements, defined in ITU-T X.721/ISO-10165-2 Definition of Management Information, to be specified in the notification:

Arguments
context

Pointer to a structure of type ca_context_t, which is defined in the file tmn_agent/usr_caDefs.h and contains information that defines the behavior of the core agent.

usrRef

The usrRef parameter contains the user reference, which identifies the object instance emitting the notification. This is the identifier that was passed to the core agent when the instance was added to the management information tree (MIT). If no user reference was passed to the core agent when the instance was added to the MIT, this parameter must be set to NULL.

sourceIndicator

The sourceIndicator parameter indicates whether the source of the deletion is the managed resource, the manager or unknown. Predefined values are provided as follows:

#define CA_DMI_T_SOURCEINDICATOR_resource 0
#define CA_DMI_T_SOURCEINDICATOR_management 1
#define CA_DMI_T_SOURCEINDICATOR_unknown 2

attributeList

The attributeList parameter specifies whether or not the object deletion notification should contain the attribute list element. If the attributeList parameter is set to OM_TRUE, the function adds the list of attributes from the object instance identified by usrRef to the object deletion notification.

notificationIdentifier

The notificationIdentifier parameter allows the caller to provide a notification identifier. If no value is required, notificationIdentifier should be set to -1.

additionalText

The additionalText parameter allows the caller to provide additional text to be added to the object deletion notification as specified in ITU-T X.721/ISO-10165-2 Definition of Management Information. If no value is required, additionalText should be set to NULL.

Returns
The function returns OM_SUCCESS upon successful completion. If an error occurs, the function returns an XOM error code as defined in cmip/xom.h.


ca_dmi_object_init()

Initialize the metadata required for the discrimination mechanism.

Synopsis

#include <cmip/xom.h>
#include <tmn_agent/usr_caDefs.h>
#include <tmn_agent/usr_caDmi.h>
#include <tmn_agent/usr_caNoti.h>
#include <tmn_agent/usr_caEfd.h>

OM_return_code ca_dmi_object_init(
ca_context_t *context,
ca_generic_attribute_t *listOfAttribute[],
ca_gdmo_notif_t *listOfNotification[],
ca_ident_t *bindingName,
ca_class_t *superiorClass,
char scheduling
);

Description
This function is a core agent API function. It is used for initializing metadata required for the discrimination mechanism. The discrimination mechanism is common to the EFD and log objects, and is described in "Event-Forwarding Discriminator (EFD) and Log Object" on page 5. It requires these types of metadata information:

You can also use the function to configure the name binding for naming the EFD object and, if you have implemented it, the log object. The naming attribute of the EFD is always discriminatorId. By specifying the superior object class to be used for naming, you set up the name binding to be used when an instance of EFD is created. In the ISO model, the superior object class to be used for naming is System; in the TMN model, it is ManagedElement. You can also provide the registration of the name binding you decide to use.

Arguments
context

Pointer to a structure of type ca_context_t, which is defined in the file tmn_agent/usr_caDefs.h and contains information that defines the behavior of the core agent.

listOfAttribute

The listOfAttribute parameter corresponds to the list of generic attributes. Providing a generic description of attributes allows the EFD to validate filter items applying to the attribute when the discriminator construct attribute is created or modified.

listOfNotification

The listOfNotification parameter identifies the list of notifications and their attributes. By providing such information, the EFD can filter on all the attributes associated with a specific notification. For notifications not described in the listOfNotification parameter, the EFD can still filter on the managed object class, managed object instance, event time and event type attributes.

bindingName

The bindingName parameter specifies which registration of the name binding to use. If the name binding corresponds to the TMN or the ISO model, bindingName should be set to NULL. In this case, the function uses the registration associated with the model.

superiorClass

The superiorClass parameter identifies the superior object class to be used for creating instances of the EFD or log object classes. The parameter must correspond to the address of the class description provided within the list of all classes supported by the agent.

scheduling

The scheduling parameter is a bitmask which enables you to restrict the support of scheduling packages for the EFD and the log. The values of the bitmask are:

#define CA_EFD_DURATION_PACKAGE 0x01
#define CA_EFD_DAILY_SCHEDULING_PACKAGE 0x02
#define CA_EFD_WEEKLY_SCHEDULING_PACKAGE 0x04
#define CA_LOG_DURATION_PACKAGE 0x10
#define CA_LOG_DAILY_SCHEDULING_PACKAGE 0x20
#define CA_LOG_WEEKLY_SCHEDULING_PACKAGE 0x40

Returns
The function returns OM_SUCCESS upon successful completion. If an error occurs, the function returns an XOM error code as defined in cmip/xom.h.


ca_dmi_procErrAlrmNotif()

Emit a processing error alarm notification.

Synopsis

#include <cmip/xom.h>
#include <tmn_agent/usr_caDefs.h>
#include <tmn_agent/usr_caDmi.h>

OM_return_code ca_dmi_procErrAlrmNotif(
ca_context_t *context,
void *usrRef,
ca_dmi_alarmInfo_t *alarmInfo
);

Description
Used for emitting a processing error alarm notification as specified in ITU-T X.733/ISO-10164-4 Alarm Reporting Function. The function can be used both for notifications that report a single alarm and for notifications that report more than one alarm. When it is used for notifications that report more than one alarm, the list of alarms must be built using calls to ca_dmi_bldAttrLst().

The function does not allow these elements, defined in ITU-T X.721/ISO-10165-2 Definition of Management Information, to be specified in the notification:

Arguments
context

Pointer to a structure of type ca_context_t, which is defined in the file tmn_agent/usr_caDefs.h and contains information that defines the behavior of the core agent.

usrRef

The usrRef parameter contains the user reference, which identifies the object instance emitting the notification. This is the identifier that was passed to the core agent when the instance was added to the management information tree (MIT). If no user reference was passed to the core agent when the instance was added to the MIT, this parameter must be set to NULL.

alarmInfo

Pointer to a structure of type ca_dmi_alarmInfo_t containing information to be included in the processing error alarm.

Returns
The function returns OM_SUCCESS upon successful completion. If an error occurs, the function returns an XOM error code as defined in cmip/xom.h.


ca_dmi_qualOfSvceAlrmNotif()

Emit a quality of service alarm notification.

Synopsis

#include <cmip/xom.h>
#include <tmn_agent/usr_caDefs.h>
#include <tmn_agent/usr_caDmi.h>

OM_return_code ca_dmi_qualOfSvceAlrmNotif(
ca_context_t *context,
void *usrRef,
ca_dmi_alarmInfo_t *alarmInfo
);

Description
Used for emitting a quality of service alarm notification as specified in ITU-T X.733/ISO-10164-4 Alarm Reporting Function. The function can be used both for notifications that report a single alarm and for notifications that report more than one alarm. When it is used for notifications that report more than one alarm, the list of alarms must be built using calls to ca_dmi_bldAttrLst().

The function does not allow these elements, defined in ITU-T X.721/ISO-10165-2 Definition of Management Information, to be specified in the notification:

Arguments
context

Pointer to a structure of type ca_context_t, which is defined in the file tmn_agent/usr_caDefs.h and contains information that defines the behavior of the core agent.

usrRef

The usrRef parameter contains the user reference, which identifies the object instance emitting the notification. This is the identifier that was passed to the core agent when the instance was added to the management information tree (MIT). If no user reference was passed to the core agent when the instance was added to the MIT, this parameter must be set to NULL.

alarmInfo

Pointer to a structure of type ca_dmi_alarmInfo_t containing information to be included in the quality of service alarm.

Returns
The function returns OM_SUCCESS upon successful completion. If an error occurs, the function returns an XOM error code as defined in cmip/xom.h.


ca_dmi_relChngNotif()

Emit a notification of several relationship changes.

Synopsis

#include <cmip/xom.h>
#include <tmn_agent/usr_caDefs.h>
#include <tmn_agent/usr_caDmi.h>

OM_return_code ca_dmi_relChngNotif(
ca_context_t *context,
void *usrRef,
OM_enumeration sourceIndicator,
OM_integer notificationIdentifier,
char *attributeValueChangeDef,
char *additionalText
);

Description
Used for emitting a relationship change notification as specified in ITU-T X.732/ISO-10164-3 Attributes for Representing Relationships. This function must be used for notifications in which a list of relationship changes is forwarded. To build the list of relationship changes, use the ca_dmi_bldAttrChngLst() function. The function frees the memory previously allocated by the calls to ca_dmi_bldAttrChngLst() for building the attributeValueChangeDef parameter.

The function does not allow these elements, defined in ITU-T X.721/ISO-10165-2 Definition of Management Information, to be specified in the notification:

Arguments
context

Pointer to a structure of type ca_context_t, which is defined in the file tmn_agent/usr_caDefs.h and contains information that defines the behavior of the core agent.

usrRef

The usrRef parameter contains the user reference, which identifies the object instance emitting the notification. This is the identifier that was passed to the core agent when the instance was added to the management information tree (MIT). If no user reference was passed to the core agent when the instance was added to the MIT, this parameter must be set to NULL.

sourceIndicator

The sourceIndicator parameter indicates whether the source of the relationship change is the managed resource, the manager or unknown. Predefined values are provided as follows:

#define CA_DMI_T_SOURCEINDICATOR_resource 0
#define CA_DMI_T_SOURCEINDICATOR_management 1
#define CA_DMI_T_SOURCEINDICATOR_unknown 2

notificationIdentifier

The notificationIdentifier parameter allows the caller to provide a notification identifier. If no value is required, notificationIdentifier should be set to -1.

attributeValueChangeDef

The attributeValueChangeDef parameter allows the caller to specify the list of relationship changes to be notified. As required in ITU-T X.732/ISO-10164-3 Attributes for Representing Relationships, at least one change needs to be reported. Therefore, attributeValueChangeDef must not be NULL. It must contain a value previously built by one or more calls to ca_dmi_bldAttrChngLst(). The memory required for storing attributeValueChangeDef is freed by the function.

additionalText

The additionalText parameter allows the caller to provide additional text to be added to the relationship change notification as specified in ITU-T X.721/ISO-10165-2 Definition of Management Information. If no value is required, additionalText should be set to NULL.

Returns
The function returns OM_SUCCESS upon successful completion. If an error occurs, the function returns an XOM error code as defined in cmip/xom.h.


ca_dmi_relChngNotifSingle()

Emit a notification of a single relationship change.

Synopsis

#include <cmip/xom.h>
#include <tmn_agent/usr_caDefs.h>
#include <tmn_agent/usr_caDmi.h>

OM_return_code ca_dmi_relChngNotifSingle(
ca_context_t *context,
void *usrRef,
OM_enumeration sourceIndicator,
OM_integer notificationIdentifier,
char *additionalText,
ca_ident_t *attributeIdentifier,
OM_descriptor *oldValue,
OM_descriptor *newValue
);

Description
Used for emitting a relationship change notification as specified in ITU-T X.732/ISO-10164-3 Attributes for Representing Relationships. This function can be used only for notifications in which one relationship change is forwarded. It does not allow these elements, defined in ITU-T X.721/ISO-10165-2 Definition of Management Information, to be specified in the notification:

Arguments
context

Pointer to a structure of type ca_context_t, which is defined in the file tmn_agent/usr_caDefs.h and contains information that defines the behavior of the core agent.

usrRef

The usrRef parameter contains the user reference, which identifies the object instance emitting the notification. This is the identifier that was passed to the core agent when the instance was added to the management information tree (MIT). If no user reference was passed to the core agent when the instance was added to the MIT, this parameter must be set to NULL.

sourceIndicator

The sourceIndicator parameter indicates whether the source of the relationship change is the managed resource, the manager or unknown. Predefined values are provided as follows:

#define CA_DMI_T_SOURCEINDICATOR_resource 0
#define CA_DMI_T_SOURCEINDICATOR_management 1
#define CA_DMI_T_SOURCEINDICATOR_unknown 2

notificationIdentifier

The notificationIdentifier parameter allows the caller to provide a notification identifier. If no value is required, notificationIdentifier should be set to -1.

additionalText

The additionalText parameter allows the caller to provide additional text to be added to the relationship change notification as specified in ITU-T X.721/ISO-10165-2 Definition of Management Information. If no value is required, additionalText should be set to NULL.

attributeIdentifier

The attributeIdentifier parameter provides the identification of the attribute for which a relationship change has occurred. Use the pointer to the ca_ident_t structure for declaring the attribute to the GO API.

oldValue

The oldValue parameter should contain the old value of the attribute that has been modified and for which a notification should be emitted. If no value is required, oldValue should be set to NULL.

newValue

The newValue parameter should contain the new value of the attribute that has been modified and for which a notification should be emitted.

Returns
The function returns OM_SUCCESS upon successful completion. If an error occurs, the function returns an XOM error code as defined in cmip/xom.h.


ca_dmi_stateChngNotif()

Emit a notification of several state changes.

Synopsis

#include <cmip/xom.h>
#include <tmn_agent/usr_caDefs.h>
#include <tmn_agent/usr_caDmi.h>

OM_return_code ca_dmi_stateChngNotif(
ca_context_t *context,
void *usrRef,
OM_enumeration sourceIndicator,
OM_integer notificationIdentifier,
char *attributeValueChangeDef,
char *additionalText
);

Description
Used for emitting a state change notification as specified in ITU-T X.731/ISO-10164-2 State Management Function. This function must be used for notifications in which a list of state changes is forwarded. To build the list of state changes, use the ca_dmi_bldAttrChngLst() function. The function frees the memory previously allocated by the calls to ca_dmi_bldAttrChngLst() for building the attributeValueChangeDef parameter.

The function does not allow these elements, defined in ITU-T X.721/ISO-10165-2 Definition of Management Information, to be specified in the notification:

Arguments
context

Pointer to a structure of type ca_context_t, which is defined in the file tmn_agent/usr_caDefs.h and contains information that defines the behavior of the core agent.

usrRef

The usrRef parameter contains the user reference, which identifies the object instance emitting the notification. This is the identifier that was passed to the core agent when the instance was added to the management information tree (MIT). If no user reference was passed to the core agent when the instance was added to the MIT, this parameter must be set to NULL.

sourceIndicator

The sourceIndicator parameter indicates whether the source of the state change is the managed resource, the manager or unknown. Predefined values are provided as follows:

#define CA_DMI_T_SOURCEINDICATOR_resource 0
#define CA_DMI_T_SOURCEINDICATOR_management 1
#define CA_DMI_T_SOURCEINDICATOR_unknown 2

notificationIdentifier

The notificationIdentifier parameter allows the caller to provide a notification identifier. If no value is required, notificationIdentifier should be set to -1.

attributeValueChangeDef

The attributeValueChangeDef parameter allows the caller to specify the list of state changes to be notified. As required in ITU-T X.731/ISO-10164-2 State Management Function, at least one change needs to be reported. Therefore, attributeValueChangeDef must not be NULL. It must contain a value previously built by one or more calls to ca_dmi_bldAttrChngLst(). The memory required for storing attributeValueChangeDef is freed by the function.

additionalText

The additionalText parameter allows the caller to provide additional text to be added to the state change notification as specified in ITU-T X.721/ISO-10165-2 Definition of Management Information. If no value is required, additionalText should be set to NULL.

Returns
The function returns OM_SUCCESS upon successful completion. If an error occurs, the function returns an XOM error code as defined in cmip/xom.h.


ca_dmi_stateChngNotifSingle()

Emit a notification of a single state change.

Synopsis

#include <cmip/xom.h>
#include <tmn_agent/usr_caDefs.h>
#include <tmn_agent/usr_caDmi.h>

OM_return_code ca_dmi_stateChngNotifSingle(
ca_context_t *context,
void *usrRef,
OM_enumeration sourceIndicator,
OM_integer notificationIdentifier,
char *additionalText,
ca_ident_t *attributeIdentifier,
OM_descriptor *oldValue,
OM_descriptor *newValue
);

Description
Used for emitting a state change notification as specified in ITU-T X.731/ISO-10164-2 State Management Function. This function can be used only for notifications in which one state change is forwarded. It does not allow these elements, defined in ITU-T X.721/ISO-10165-2 Definition of Management Information, to be specified in the notification:

Arguments
context

Pointer to a structure of type ca_context_t, which is defined in the file tmn_agent/usr_caDefs.h and contains information that defines the behavior of the core agent.

usrRef

The usrRef parameter contains the user reference, which identifies the object instance emitting the notification. This is the identifier that was passed to the core agent when the instance was added to the management information tree (MIT). If no user reference was passed to the core agent when the instance was added to the MIT, this parameter must be set to NULL.

sourceIndicator

The sourceIndicator parameter indicates whether the source of the state change is the managed resource, the manager or unknown. Predefined values are provided as follows:

#define CA_DMI_T_SOURCEINDICATOR_resource 0
#define CA_DMI_T_SOURCEINDICATOR_management 1
#define CA_DMI_T_SOURCEINDICATOR_unknown 2

notificationIdentifier

The notificationIdentifier parameter allows the caller to provide a notification identifier. If no value is required, notificationIdentifier should be set to -1.

additionalText

The additionalText parameter allows the caller to provide additional text to be added to the state change notification as specified in ITU-T X.721/ISO-10165-2 Definition of Management Information. If no value is required, additionalText should be set to NULL.

attributeIdentifier

The attributeIdentifier parameter provides the identification of the attribute that has changed state. Use the pointer to the ca_ident_t structure used for declaring the attribute to the GO API.

oldValue

The oldValue parameter should contain the old state of the attribute that has changed state and for which a notification should be emitted. If no state is required, oldValue should be set to NULL.

newValue

The newValue parameter should contain the new state of the attribute that has changed state and for which a notification should be emitted.

Returns
The function returns OM_SUCCESS upon successful completion. If an error occurs, the function returns an XOM error code as defined in cmip/xom.h.


ca_dmi_tick()

Update the DMI library's internal clock.

Synopsis

#include <cmip/xom.h>
#include <tmn_agent/usr_caDefs.h>
#include <tmn_agent/usr_caDmi.h>

OM_return_code ca_dmi_tick(
ca_context_t *context
);

Description
This function is a core agent API function. Both the log and EFD objects, which are part of the DMI library, implement the optional scheduling packages. The scheduling operations are time dependent, and as a result the DMI library's internal clock needs to be continually updated, so that log and EFD instances can be enabled and disabled at the correct times.

The ca_dmi_tick() function is used to update the DMI library's internal clock. This function needs to be called regularly by the agent to ensure that scheduling operations occur as expected. The granularity of time used in the scheduling attributes is one minute, therefore, calling this function at the minimum every 30 seconds is sufficient to maintain synchronization with a manager.

When ca_dmi_tick() is called, the operational state and availability status attribute values are checked for all EFD and log instances in the system, and updated if necessary.

Arguments
context

Pointer to a structure of type ca_context_t, which is defined in the file tmn_agent/usr_caDefs.h and contains information that defines the behavior of the core agent.

Returns
The function returns OM_SUCCESS upon successful completion. If an error occurs, the function returns an XOM error code as defined in cmip/xom.h.


Structures for Formatting Alarm Notifications

Use the following C structures for formatting information contained in alarm notifications emitted using the DMI API:

ca_dmi_alarmInfo_t

Represent alarm information.

Declaration

typedef struct ca_dmi_alarmInfo_t {
char *probableCause;
OM_string encod_oid;
int perceivedSeverity;
int backedUpStatusPresent;
OM_boolean backedUpStatus;
void *backUpObject;
OM_string encod_moi;
int trendIndication;
int thresPresent;
ca_dmi_thresholdInfo_t thresholdInfo;
void *stateChangeDef;
void *monitoredAttributes;
char *additionalText;
} ca_dmi_alarmInfo_t;


Description
Structures of type ca_dmi_alarmInfo_t contain alarm information as specified in ITU-T X.721/ISO-10165-2 Definition of Management Information.

Some members of this structure have a name that ends in Present. They indicate whether the optional member that follows them is present in a particular instance of the structure. For example, the member thresPresent is followed by the optional member thresholdInfo. If the thresholdInfo member is present, the thresPresent member must be set to CA_DMI_OPTIONAL_PRESENT. Otherwise, the thresPresent member must be set to CA_DMI_OPTIONAL_NOT_PRESENT.

Members
probableCause

The probableCause member identifies the probable cause of the alarm. It must contain a string which can be either an object identifier or an integer. For an object identifier, the value should be given in the decoded form. Predefined values are provided in the file tmn_agent/usr_caDmi.h. for all the probable causes defined in ITU-T X.733/ISO-10164-4 Alarm Reporting Function and ITU-T X.721/ISO-10165-2 Definition of Management Information are provided.

encod_oid

The encod_oid member is used by the DMI API for storing the encoded value of the probable cause of the alarm.

perceivedSeverity

The perceivedSeverity member indicates the severity of the alarm. It must be set to one of the values predefined as follows:

#define CA_DMI_T_PERCEIVEDSEVERITY_indeterminate 0
#define CA_DMI_T_PERCEIVEDSEVERITY_critical 1
#define CA_DMI_T_PERCEIVEDSEVERITY_major 2
#define CA_DMI_T_PERCEIVEDSEVERITY_minor 3
#define CA_DMI_T_PERCEIVEDSEVERITY_warning 4
#define CA_DMI_T_PERCEIVEDSEVERITY_cleared 5

backedUpStatusPresent

The backedUpStatusPresent member indicates whether the backedUpStatus member is present. It must be set to one of the values predefined as follows:

#define CA_DMI_OPTIONAL_NOT_PRESENT 0
#define CA_DMI_OPTIONAL_PRESENT 1

backedUpStatus

The backedUpStatus member specifies whether the object emitting the alarm has been backed up. If backedUpStatus is OM_TRUE, the object has been backed up. If backedUpStatus is OM_FALSE, the object has not been backed up. The backedUpStatus member is optional.

backUpObject

If backedUpStatus is OM_TRUE, the backUpObject member provides a pointer to the user reference of the back-up object. Otherwise, the backUpObject member should be set to NULL.

encod_moi

If there is a back-up object, the encod_moi member is used by the DMI API for storing the encoded value of the back-up object.

trendIndication

The trendIndication member indicates whether the severity of the alarm is decreasing, increasing or not changed. If no trend indication is to be given, the trendIndication member should be set to -1. Otherwise, it should be set to one of the values predefined as follows:

#define CA_DMI_T_TRENDINDICATION_lessSevere 0
#define CA_DMI_T_TRENDINDICATION_noChange 1
#define CA_DMI_T_TRENDINDICATION_moreSevere 2

thresPresent

The thresPresent member indicates whether the thresholdInfo member is present. It must be set to one of the values predefined as follows:

#define CA_DMI_OPTIONAL_NOT_PRESENT 0
#define CA_DMI_OPTIONAL_PRESENT 1

thresholdInfo

The thresholdInfo member contains threshold information expressed as a structure of type ca_dmi_thresholdInfo_t. The thresholdInfo member is optional.

stateChangeDef

The stateChangeDef member optionally contains a pointer to a list of state changes to be reported. To build the list of state changes, use the ca_dmi_bldAttrChngLst() function. If no state changes are to be reported, the stateChangeDef member should be set to NULL.

monitoredAttributes

The monitoredAttributes member optionally contains a pointer to a list of monitored attributes. To build the list of attributes, use the ca_dmi_bldAttrLst() function. If no attributes are to be monitored, the monitoredAttributes member should be set to NULL.

additionalText

The additionalText optionally contains a pointer to a text string to be added to the notification. If no additional text is to be added to the notification, the additionalText member should be set to NULL.

ca_dmi_observedValue_t

Represent observed value information.

Declaration

typedef struct ca_dmi_observedValue_t {
int choice;
union {
int integer;
double real;
} alt;
} ca_dmi_observedValue_t;

Description
Structures of type ca_dmi_observedValue_t contain observed value information as specified in ITU-T X.721/ISO-10165-2 Definition of Management Information.

Members
choice

The choice member specifies the syntax of the observed value. If the observed value is an integer, the choice member must be set to OM_S_INTEGER. Otherwise, the choice member can be set to any other value.

integer

The integer member contains the observed value if the choice member is set to OM_S_INTEGER.

real

The real member contains the observed value if the choice member specifies a syntax other than integer.

ca_dmi_thresholdInfo_t

Represent threshold information.

Declaration

typedef struct ca_dmi_thresholdInfo_t {
ca_ident_t *id;
ca_dmi_observedValue_t val;
int thresPresent;
ca_dmi_thresholdLevelInd_t thres;
int armTimePresent;
char armTime[24];
} ca_dmi_thresholdInfo_t;

Description
Structures of type ca_dmi_thresholdInfo_t contain threshold information as specified in ITU-T X.721/ISO-10165-2 Definition of Management Information.

Some members of this structure have a name that ends in Present. They indicate whether the optional member that follows them is present in a particular instance of the structure. For example, the member thresPresent is followed by the optional member thres. If the thres member is present, the thresPresent member must be set to CA_DMI_OPTIONAL_PRESENT. Otherwise, the thresPresent member must be set to CA_DMI_OPTIONAL_NOT_PRESENT.

Members
id

The id member contains a pointer to a structure of type ca_ident_t that contains information about the threshold that triggered the alarm.

val

The val member contains the observed value that triggered the alarm. It is expressed as a structure of type ca_dmi_observedValue_t.

thresPresent

The thresPresent member indicates whether the thres member is present. It must be set to one of the values predefined as follows:

#define CA_DMI_OPTIONAL_NOT_PRESENT 0
#define CA_DMI_OPTIONAL_PRESENT 1

thres

The thres member contains the value of the threshold limit for triggering alarms. It is expressed as a structure of type ca_dmi_thresholdLevelInd_t. The thres member is optional.

armTimePresent

The armTimePresent member indicates whether the armTime member is present. It must be set to one of the values predefined as follows:

#define CA_DMI_OPTIONAL_NOT_PRESENT 0
#define CA_DMI_OPTIONAL_PRESENT 1

armTime

The armTime member indicates the Generalized Time at which the threshold was reached. The armTime member is optional.

ca_dmi_thresholdLevelInd_t

Represent threshold level indicator information.

Declaration

typedef struct ca_dmi_thresholdLevelInd_t {
int type;
ca_dmi_observedValue_t high;
int lowPresent;
ca_dmi_observedValue_t low;
} ca_dmi_thresholdLevelInd_t;

Description
Structures of type ca_dmi_thresholdLevelInd_t contain information on the threshold level indicator as specified in ITU-T X.721/ISO-10165-2 Definition of Management Information.

Some members of this structure have a name that ends in Present. They indicate whether the optional member that follows them is present in a particular instance of the structure. For example, the member lowPresent is followed by the optional member low. If the low member is present, the lowPresent member must be set to CA_DMI_OPTIONAL_PRESENT. Otherwise, the lowPresent member must be set to CA_DMI_OPTIONAL_NOT_PRESENT.

Members
type

The type member indicates whether the threshold level indicator is up or down. It must be set to one of the values predefined as follows

#define CA_DMI_THRESHOLDLEVELIND_UP 1
#define CA_DMI_THRESHOLDLEVELIND_DOWN 2

high

The high member contains the high observed value expressed as a structure of type ca_dmi_observedValue_t. The high member is mandatory.

lowPresent

The lowPresent member indicates whether the low member is present. It must be set to one of the values predefined as follows:

#define CA_DMI_OPTIONAL_NOT_PRESENT 0
#define CA_DMI_OPTIONAL_PRESENT 1

low

The low member contains the low observed value expressed as a structure of type ca_dmi_observedValue_t. The low member is optional.



Copyright 1998 Sun Microsystems, Inc. 901 San Antonio Road, Palo Alto, California 94303 U.S.A.
Copyright in French

Previous Next Contents Index