HP Operations Manager for Windows

opcagtmsg_send()


   #include opcapi.h

   int opcagtmsg_send (
        opcdata     message     /* in/out */
                      );

Parameters

message
Message of type OPCDTYPE_MESSAGE.

Description

Use the function opcagtmsg_send() to send a message, created on the managed node, to its responsible manager. The message must be of type OPCDTYPE_MESSAGE. The message ID can be retrieved from the message object using opcdata_get_str() immediately after the send call was executed.

Only the message attributes Severity, Application, Message Group, Object, Message Text, Option Strings and Node are used in opcagtmsg_send().

If you want to save the information about the responsible manager, remark the message to be acknowledged later. To do this, set OPCDATA_DATA_INFO to OPC_REMARK_FOR_ACK.

After opcagtmsg_send() was called with OPC_REMARK_FOR_ACK it is possible to get the ID of the sent message using:

opcdata_get_str()(message, OPCDATA_MSGID)

Return Values

OPC_ERR_OK:
OK

OPC_ERR_APPL_REQUIRED:
attribute OPCDATA_APPLICATION not set

OPC_ERR_OBJ_REQUIRED:
attribute OPCDATA_OBJECT not set

OPC_ERR_TEXT_REQUIRED:
attribute OPCDATA_MSGTEXT not set

OPC_ERR_INVAL_SEVERITY:
set severity invalid

OPC_ERR_MISC_NOT_ALLOWED:
message group 'misc' not allowed

OPC_ERR_INVALID_INPARAM:
message is NULL
message is not of type OPCDTYPE_MESSAGE

OPC_ERR_WRONG_OPTION_VARS:
The field OPCDATA_OPTION_VAR of the message has an incorrect format. It can only contain assignments separated by spaces.

OPC_ERR_NO_MEMORY:
memory allocation failed

Versions

HPOM for Windows A.06.00 and later

See Also

opcagtmsg_ack()

opcmsg()

OPCDTYPE_MESSAGE