Solstice Enterprise Manager 4.1 C++ API Reference Doc Set ContentsPreviousNextIndex


Chapter 4

Low-Level PMI

The Solstice EM Portable Management Interface (PMI) provides a low-level Common Management Information Server (CMIS)-like, distributed, transport-independent interface for application programs. CMIS-like messages are sent and received across this interface. These messages are routed to and from the Message Routing Module (MRM) component of the Management Information Server (MIS).

This chapter comprises the following topics:

4.1 Communication Path

The Low-Level PMI uses paired sets of Transport-Independent and Transport-Dependent Service Access Points (SAPs) to provide a communication path between an application and the MRM. The set of paired SAPs use the transport mechanism specified by the transport dependent SAP to pass messages between SAPs (between an application and the MRM). Each set of SAPs normally resides in separate Unix processes. Solstice EM currently uses a CMIS-like protocol over the Lightweight Presentation Protocol (LPP) and TCP/IP to pass messages between the paired SAPs.

FIGURE 4-1 shows how the Low-Level PMI communicates between applications and the MRM.


FIGURE 4-1   Applications to MRM Communication

4.2 Root Classes for the Low-Level PMI

The root classes for the Low-Level PMI include:

In addition, the Asn1Value and DataUnit classes are common base classes.

The data contained in the class structures based on Message class and defined in the /opt/SUNWconn/em/include/pmi/message.hh file are primarily based on the Asn1Value class, defined in asn1_val.hh. The Asn1Value class in turn relies on structures and methods defined in the DataUnit class, defined in du.hh.

4.3 Low-Level PMI Classes

4.3.1 Class Inheritance

The Message class is the base class used by almost all messages passed between SAPs and the PMI. The messages contained in the message.hh file largely define the syntax of the low-level usage of the PMI.

A number of CMIS-like messages are subclasses of the Message class. The three primary types of messages are:

Solstice EM CMIS messages are derived from Message, the base message class. It contains data that is common to every type of message sent via a MessageSAP interface. All of the other base message classes derive either directly or indirectly from the Message class. You should never instantiate this class, only derive other classes from it.

Other base message classes contain a parameter or set of parameters that are commonly used together in more than one Solstice EM CMIS message. Some messages commonly use more than one set of parameters and therefore, some of the base message classes are combinations of other base message classes formed via inheritance. The parameters that are included in the base message classes include only those parameters that are used by the Message Routing Module (MRM) to perform scoping, filtering, access control, and synchronization.


Note – Each of the classes derived from the Message class relies on the ISO specifications of the CMIP protocol and ASN.1 data encoding.

FIGURE 4-2 shows the inheritance hierarchy for the classes based on Message:

FIGURE 4-2   Inheritance Tree of the Message Class

4.3.2 Class Summary

TABLE 4-1 lists the Low-Level PMI classes.

TABLE 4-1   Low-Level PMI Classes 
Class Description
AccessDenied
Encapsulates an AccessDenied error
ActionReq
Serves as a repository for information identifying an action request message
ActionRes
Represents successful completion and results of an action request
AssocReleased
Represents an AssocReleased message
CancelGetReq
Encapsulates a CancelGet message to stop a lengthy Get request
CancelGetRes
Response to a CancelGet message
ClassInstConfl
Encapsulates a ClassConflict message
CreateReq
Serves as a repository for information identifying a create request message
CreateRes
Represents successful completion and results of a create request
DeleteReq
Serves as a repository for information identifying a delete request message
DeleteRes
Represents successful completion and results of a delete request
DuplicateOI
Encapsulates a DuplicateOI error
DupMessageId
Encapsulates a DupMessageId error
ErrorResUnexp
Encapsulates an ErrorResUnexp error
EventReq
Adds parameters to store an event type, time and information
GetListErr
Encapsulates a GetList error
GetReq
Serves as a repository for information identifying a get request message
GetRes
Represents successful completion and results of a get request
InvalidActionArg
Encapsulates an InvalidActionArg error
InvalidAttrVal
Encapsulates an InvalidAttrVal error
InvalidEventArg
Encapsulates an InvalidEventArg error
InvalidFilter
Encapsulates an InvalidFilter error
InvalidOI
Encapsulates an InvalidOI error
InvalidOperation
Encapsulates an InvalidOperation error
InvalidOperator
Encapsulates an InvalidOperator error
InvalidScope
Encapsulates an InvalidScope error
LinkedResUnexp
Encapsulates a LinkedResUnexp error
Message
Contains data that is common to every type of message sent via a MessageSAP interface
MessageSAP
Defines queues of pointers to messages
MessQOS
Represents the Quality of Service indicator included in all messages
MessScope
Defines a message's scope--the range of objects where a message is applied
MissingAttrVal
Encapsulates a MissingAttrVal error
MistypedArg
Encapsulates a MistypedArg error
MistypedError
Encapsulates a MistypedError error
MistypedOp
Encapsulates a MistypedOp error
MistypedRes
Encapsulates a MistypedRes error
NoSuchAction
Encapsulates a NoSuchAction error
NoSuchActionArg
Encapsulates a NoSuchActionArg error
NoSuchAttr
Encapsulates a NoSuchAttr error
NoSuchEvent
Encapsulates a NoSuchEvent error
NoSuchEventArg
Encapsulates a NoSuchEventArg error
NoSuchMessageId
Encapsulates a NoSuchMessageId error
NoSuchOC
Encapsulates a NoSuchOC error
NoSuchOI
Encapsulates a NoSuchOI error
NoSuchRefOI
Encapsulates a NoSuchRefOI error
ObjReqMess
Encapsulates an ObjReqMess message
ObjResMess
Encapsulates an ObjResMess message
OpCancelled
Encapsulates an OpCancelled message
ProcessFailure
Encapsulates a ProcessFailure error
ReqMess
Encapsulates a ReqMess message
ResMess
Encapsulates a ResMess message
ResourceLimit
Encapsulates a ResourceLimit message
ScopedReqMess
Encapsulates a ScopedReqMess message
SetListErr
Encapsulates a SetListErr error
SetReq
Encapsulates a SetReq message
SetRes
Encapsulates a SetRes message
SyncNotSupp
Encapsulates a SyncNotSupp message
TimedOut
Encapsulates a TimedOut error
UnexpChildOp
Encapsulates an UnexpChildOp error
UnexpError
Encapsulates an UnexpError error
UnexpRes
Encapsulates an UnexpRes error
UnrecError
Encapsulates an UnrecError error
UnrecLinkedId
Encapsulates an UnrecLinkedId error
UnrecMessageId
Encapsulates an UnrecMessageId error
UnrecOp
Encapsulates an UnrecOp error


4.4 AccessDenied Class

Inheritance: public ObjResMess, public ResMess, public Message, public QueueElem

#include <pmi/message.hh>

Method Types: No public member functions are declared in this class.

In addition to the functions or variables it inherits, the AccessDenied class adds an Asn1Value parameter to store a current time. The oc, oi, and curr_time members are only defined when returning an error from a scoped ACTION_REQ or DELETE_REQ.

TABLE 4-2 lists the AccessDenied public data member.

TABLE 4-2   AccessDenied Public Data Member
Type Variable Description
Asn1Value
curr_time
An optional parameter specifying the time that this response message was generated.


4.4.1 Constructor

AccessDenied()

The constructor for AccessDenied takes no parameters. It initializes its parent class.

4.5 ActionReq Class

Inheritance: public ScopedReqMess, public ObjReqMess, public ReqMess, public Message

#include <pmi/message.hh>

Method Types: No public member functions are declared in this class.

An instance of ActionReq serves as a repository for information identifying an action request message.

TABLE 4-3 lists the ActionReq public data members.

TABLE 4-3   ActionReq Public Data Members
Type Variables Description
Asn1Value
action_type
The type of action being requested by this message
Asn1Value
action_info
Information that might be included in this action request. The data content of this parameter depends on the action_type. There are definitions for the action types in the OSI Network Management Forum document.


4.5.1 Constructor

ActionReq()

The constructor for ActionReq takes no parameters and does nothing more than initialize its parent classes.

4.6 ActionRes Class

Inheritance: public ObjResMess, public ResMess, public Message, public QueueElem

#include <pmi/message.hh>

Method Types: No public member functions are declared in this class.

In addition to the functions or variables it inherits, the ActionRes class adds three Asn1Value parameters to store a current time, an action type, and some action reply information.

TABLE 4-4 lists the ActionRes public data members.

TABLE 4-4   ActionRes Public Data Members
Type Variables Description
Asn1Value
curr_time
An optional parameter specifying the time that this response message was generated.
Asn1Value
action_type
The type of action for which this response is being generated.
Asn1Value
action_reply
Information accompanying this action response. The contents of this optional parameter vary and are based on the action type specified. The formats for this parameter for the various action types are given in the GDMO and ASN.1 documents.


4.6.1 Constructor

ActionRes()

The constructor for ActionRes takes no parameters. It only initializes its parent classes.

4.7 AssocReleased Class

Inheritance: public ResMess, public Message, public QueueElem

#include <pmi/message.hh>

Method Types: No public member functions are declared in this class.

The AssocReleased class defines no functions or variables beyond those it inherits. The error message that this class represents is patterned after the ROSE error message initiator-releasing. The usage of this message is described in detail in the documentation covering the ROSE protocol. It is used within the Solstice EM MIS to indicate that a request could not be serviced because the association on which that request was received is either about to or has already gone away.

4.7.1 Constructor

AssocReleased()

This constructor takes no parameters. It initializes its parent classes.

4.8 CancelGetReq Class

Inheritance: public ReqMess, public Message, public QueueElem

#include <pmi/message.hh>

Method Types: No public member functions are declared in this class.

In addition to the functions or variables it inherits, the CancelGetReq class adds a MessId parameter. This parameter specifies the ID of the CMIS Get request that is being cancelled by this request.

TABLE 4-5 lists the CancelGetReq public variable.

TABLE 4-5   CancelGetReq Public Variable
Type Variable Description
MessId
get_id
The ID of the CMIS Get request that is being cancelled by this request


4.8.1 Constructor

CancelGetReq()

This constructor takes no parameters. It only initializes its parent classes.

4.9 CancelGetRes Class

Inheritance: public ResMess, public Message, public QueueElem

#include <pmi/message.hh>

Method Types: No public member functions are declared in this class.

The CancelGetRes object class contains all of the member variables and member functions that are present in the classes it has derived from, whether directly or indirectly. No additional parameters are available for this response message.

4.9.1 Constructor

CancelGetRes()

This constructor takes no parameters. It only initializes its parent classes.

4.10 ClassInstConfl Class

Inheritance: public ResMess, public Message, public QueueElem

#include <pmi/message.hh>

Method Types: No public member functions are declared in this class.

In addition to the functions or variables it inherits, the ClassInstConfl class adds two Asn1Value parameters to store an object class and an object instance.

TABLE 4-6 lists the ClassInstConfl public data members.

TABLE 4-6   ClassInstConfl Public Data Members
Type Variables Description
Asn1Value
oc
The object class that was specified in the request message
Asn1Value
oi
The object instance, whose object class is not the same as oc, that caused the generation of this error message


4.10.1 Constructor

ClassInstConfl()

This constructor takes no parameters. It only initializes its parent classes.

4.11 CreateReq Class

Inheritance: public ObjReqMess, public ReqMess, public Message, public QueueElem

#include <pmi/message.hh>

Method Types: No public member functions are declared in this class.

In addition to the functions or variables it inherits, the CreateReq class adds four Asn1Value parameters to store a superior object instance, access control information, a reference object instance, and an attribute list.

TABLE 4-7 lists the CreateReq public data members.

TABLE 4-7   CreateReq Public Data Members
Type Variables Description
Asn1Value
superior_oi
The object that will be the parent object (in the MIT) to this newly created object.
Asn1Value
access
Access control information that is checked by the destination to determine if the issuer of this request message is allowed to perform a creation. This parameter is optional.
Asn1Value
reference_oi
The optional object instance of an object whose attributes are to be copied into this new object.
Asn1Value
attr_list
An optional list of attributes that the newly created object is to contain.


4.11.1 Constructor

CreateReq()

This constructor takes no parameters. It initializes its parent classes and its internal data.

4.12 CreateRes Class

Inheritance: public ObjResMess, public Message, public QueueElem

#include <pmi/message.hh>

Method Types: No public member functions are declared in this class.

In addition to the functions or variables it inherits, the CreateRes class adds two Asn1Value parameters to store a current time and an attribute list.

TABLE 4-8 lists the CreateRes public data members.

TABLE 4-8   CreateRes Public Data Members
Type Variables Description
Asn1Value
curr_time
An optional parameter specifying the time that this response message was generated.
Asn1Value
attr_list
This optional parameter contains a list of attribute IDs and values with which the new object was created.


4.12.1 Constructor

CreateRes()

This constructor takes no parameters. It initializes its parent classes.

4.13 DeleteReq Class

Inheritance: public ScopedReqMess, public ObjReqMess, public ReqMess, public Message, public QueueElem

#include <pmi/message.hh>

Method Types: No public member functions are declared in this class.

The DeleteReq object class contains all of the member variables and member functions that are present in the classes that it has derived from, either directly or indirectly. It does not add any parameters other that those that it inherits.

4.13.1 Constructor

DeleteReq()

This constructor takes no parameters. It only initializes its parent classes.

4.14 DeleteRes Class

Inheritance: public ObjResMess, public ResMess, public Message, public QueueElem

#include <pmi/message.hh>

Method Types: No public member functions are declared in this class.

In addition to the functions or variables it inherits, the DeleteRes class adds an Asn1Value parameter to store a current time.

TABLE 4-9 lists the DeleteRes public data member.

TABLE 4-9   DeleteRes Public Data Member
Type Variable Description
Asn1Value
curr_time
An optional parameter specifying the time that this response message was generated


4.14.1 Constructor

DeleteRes()

This constructor takes no parameters. It only initializes its parent classes.

4.15 DuplicateOI Class

Inheritance: public ResMess, public Message, public QueueElem

#include <pmi/message.hh>

Method Types: No public member functions are declared in this class.

In addition to the functions or variables it inherits, the DuplicateOI class adds an object instance parameter.

TABLE 4-10 lists the DuplicateOI public variable.

TABLE 4-10   DuplicateOI Public Variable
Type Variable Description
Asn1Value
oi
This is an invalid object instance that caused the generation of this error message. This is sent in response to a create request when the object whose creation was requested was given the same object instance as an already existing object.


4.15.1 Constructor

DuplicateOI()

This constructor takes no parameters. It only initializes its parent classes.

4.16 DupMessageId Class

Inheritance: public ResMess, class Message, class QueueElem

#include <pmi/message.hh>

Method Types: No public member functions are declared in this class.

The DupMessageId object class contains all of the member variables and member functions that are present in the classes that it has derived from, either directly or indirectly. This class defines no functions or variables beyond those it inherits. The error message that this class represents is patterned after the ROSE error message duplicate-invocation.

4.16.1 Constructor

DupMessageId()

This constructor takes no parameters. It only initializes its parent classes.

4.17 ErrorResUnexp Class

Inheritance: public ResMess, public Message, public QueueElem

#include <pmi/message.hh>

Method Types: No public member functions are declared in this class.

The ErrorResUnexp object class contains all of the member variables and member functions that are present in the classes that it has derived from, either directly or indirectly. This class defines no functions or variables beyond those it inherits. The error message that this class represents is patterned after the ROSE error message error-response-unexpected. It is used to indicate that an error message was generated in response to a non-confirmed request.

4.17.1 Constructor

ErrorResUnexp()

This constructor takes no parameters. It only initializes its parent classes.

4.18 EventReq Class

Inheritance: public ObjReqMess, public ReqMess, public Message, public QueueElem

#include <pmi/message.hh>

Method Types: No public member functions are declared in this class.

In addition to the functions or variables it inherits, the EventReq class adds three Asn1Value parameters to store an event type, an event time, and some event information.

TABLE 4-11 lists the EventReq public data members.

TABLE 4-11   EventReq Public Data Members
Type Variables Description
Asn1Value
event_type
The type of event reported via this message.
Asn1Value
event_time
The time that the originator of the event chose to place here (probably, but not necessarily the time that the event occurred).
Asn1Value
event_info
Any supplemental information that is to accompany this request. Specific data formats for this parameter depend on the event_type and are defined in OSI Network Management Forum documentation.


4.18.1 Constructor

EventReq()

This constructor takes no parameters. It only initializes its parent classes.

4.19 GetListErr Class

Inheritance: public ObjResMess, public Message, public QueueElem

#include <pmi/message.hh>

Method Types: No public member functions are declared in this class.

In addition to the functions or variables it inherits, the GetListErr class adds two Asn1Value parameters to store a current time and a get an information list.

TABLE 4-12 lists the GetListErr public data members.

TABLE 4-12   GetListErr Public Data Members
Type Variables Description
Asn1Value
get_info_list
The list of attributes that were requested in the Get request. This list contains attributes which could be accessed. Those attributes which could not be accessed, and hence caused the generation of this error message, are not included in this list.
Asn1Value
curr_time
An optional parameter specifying the time that this response message was generated.


4.19.1 Constructor

GetListErr()

This constructor takes no parameters. It only initializes its parent classes.

4.20 GetReq Class

Inheritance: public ScopedReqMess, public ObjReqMess, public ReqMess, public Message, public QueueElem

#include <pmi/message.hh>

Method Types: No public member functions are declared in this class.

In addition to the functions or variables it inherits, the GetReq class adds an attribute ID list parameter.

TABLE 4-13 lists the GetReq public variable.

TABLE 4-13   GetReq Public Variable
Type Variable Description
Asn1Value
attr_id_list
A list of attribute IDs whose attribute values are to be returned in the response to this Get request.


4.20.1 Constructor

GetReq()

This constructor takes no parameters. It only initializes its parent classes.

4.21 GetRes Class

Inheritance: public ObjResMess, public ResMess, public Message, public QueueElem

#include <pmi/message.hh>

Method Types: No public member functions are declared in this class.

In addition to the functions or variables it inherits, the GetRes class adds two ASN1Value parameters to store a current time and an attribute list.

TABLE 4-14 lists the GetRes public data members.

TABLE 4-14   GetRes Public Data Members
Type Variables Description
Asn1Value
curr_time
An optional parameter specifying the time that this response message was generated.
Asn1Value
attr_list
A list of attributes was specified in the Get request message for which this response is being generated. This parameter represents the list of attributes that were compiled and are being returned to the requestor.


4.21.1 Constructor

GetRes()

This constructor takes no parameters. It only initializes its parent classes.

4.22 InvalidActionArg Class

Inheritance: public ResMess, public Message, public QueueElem

#include <pmi/message.hh>

Method Types: No public member functions are declared in this class.

In addition to the functions or variables it inherits, the InvalidActionArg class adds two Asn1Value parameters to store a current time and some action information. There are two choices defined for the invalidArgument error message and this class defines the actionValue choice (first of the two). The oi and curr_time members are only defined when returning an error from a scoped ACTION_REQ.

TABLE 4-15 lists the InvalidActionArg public data members.

TABLE 4-15   InvalidActionArg Public Data Members
Type Variables Description
Asn1Value
action_info
Additional information about the action, revealing why this error message was generated.
Asn1Value
curr_time
An optional parameter specifying the time that this response message was generated.


4.22.1 Constructor

InvalidActionArg()

This constructor takes no parameters. It only initializes its parent classes.

4.23 InvalidAttrVal Class

Inheritance: public ResMess, public Message, public QueueElem

#include <pmi/message.hh>

Method Types: No public member functions are declared in this class.

In addition to the functions or variables it inherits, the InvalidAttrVal class adds an attribute parameter.

TABLE 4-16 lists the InvalidAttrVal public variable.

TABLE 4-16   InvalidAttrVal Public Variable
Type Variable Description
Asn1Value
attr
This is the invalid attribute that caused the generation of this error message.


4.23.1 Constructor

InvalidAttrVal()

This constructor takes no parameters. It only initializes its parent classes.

4.24 InvalidEventArg Class

Inheritance: public ResMess, public Message, public QueueElem

#include <pmi/message.hh>

Method Types: No public member functions are declared in this class.

In addition to the functions or variables it inherits, the InvalidEventArg class adds three Asn1Value parameters to store an object class, event type, and some event information. There are two choices defined for the invalidArgument error message and this class defines the eventValue choice (second of the two).

TABLE 4-17 lists the InvalidEventArg public data members.

TABLE 4-17   InvalidEventArg Public Data Members
Type Function Description
Asn1Value
oc
The object that the event report request was generated for.
Asn1Value
event_type
The invalid event type that caused the generation of this error message.
Asn1Value
event_info
Additional information indicating why this error message was generated. The format of this parameter is variable and depends on the event_type specified in this message.


4.24.1 Constructor

InvalidEventArg()

This constructor takes no parameters. It only initializes its parent classes.

4.25 InvalidFilter Class

Inheritance: public ResMess, public Message, public QueueElem

#include <pmi/message.hh>

Method Types: No public member functions are declared in this class.

In addition to the functions or variables it inherits, the InvalidFilter class adds a filter parameter.

TABLE 4-18 lists the InvalidFilter public variable.

TABLE 4-18   InvalidFilter Public Variable
Type Variable Description
Asn1Value
filter
The filter that was invalid and caused the generation of this error message.


4.25.1 Constructor

InvalidFilter()

This constructor takes no parameters. It only initializes its parent classes.

4.26 InvalidOI Class

Inheritance: public ResMess, public Message, public QueueElem

#include <pmi/message.hh>

Method Types: No public member functions are declared in this class.

In addition to the functions or variables it inherits, the InvalidOI class adds an object instance parameter.

TABLE 4-19 lists the InvalidOI public variable.

TABLE 4-19   InvalidOI Public Variable
Type Variable Description
Asn1Value
oi
The invalid object instance that caused the generation of this error message.


4.26.1 Constructor

InvalidOI()

This constructor takes no parameters. It only initializes its parent classes.

4.27 InvalidOperation Class

Inheritance: public ResMess, public Message, public QueueElem

#include <pmi/message.hh>

Method Types: No public member functions are declared in this class.

The InvalidOperation object class contains all of the member variables and member functions that are present in the classes that it has derived from, either directly or indirectly. This class defines no functions or variables beyond those it inherits.

4.27.1 Constructor

InvalidOperation()

This constructor takes no parameters. It only initializes its parent classes.

4.28 InvalidOperator Class

Inheritance: public ResMess, public Message, public QueueElem

#include <pmi/message.hh>

Method Types: No public member functions are declared in this class.

In addition to the functions or variables it inherits, the InvalidOperator class adds a modify operator parameter.

TABLE 4-20 lists the InvalidOperator public variable.

TABLE 4-20   InvalidOperator Public Variable
Type Variable Description
Asn1Value
mod_op
The invalid modify operator that was specified in a Set request and thus caused the generation of this error message.


4.28.1 Constructor

InvalidOperator()

This constructor takes no parameters. It only initializes its parent classes.

4.29 InvalidScope Class

Inheritance: public ResMess, public Message, public QueueElem

#include <pmi/message.hh>

Method Types: No public member functions are declared in this class.

In addition to the functions or variables it inherits, the InvalidScope class adds a scope parameter.

TABLE 4-21 lists the InvalidScope public variable.

TABLE 4-21   InvalidScope Public Variable
Type Variable Description
MessScope
scope
The invalid scope parameter, extracted from the request message, which caused the generation of this error message.


4.29.1 Constructor

InvalidScope()

This constructor takes no parameters. It only initializes its parent classes.

4.30 LinkedResUnexp Class

Inheritance: public ResMess, public Message, public QueueElem

#include <pmi/message.hh>

Method Types: No public member functions are declared in this class.

The LinkedResUnexp object class contains all of the member variables and member functions that are present in the classes that it has derived from, either directly or indirectly. This class defines no functions or variables beyond those it inherits. The error message that this class represents is patterned after the ROSE error message "linked-response-unexpected." It is used within the Solstice EM MIS to indicate that a linked request was received and the linked ID specified did not refer to a request for which a linked ID could be generated.

4.30.1 Constructor

LinkedResUnexp()

This constructor takes no parameters. It only initializes its parent classes.

4.31 Message Class

Inheritance: public QueueElem

#include <pmi/message.hh>

The Message class is the base class used by almost all messages passed between SAPs and the PMI. The messages contained in the message.hh file largely define the syntax of the low-level usage of the PMI.

TABLE 4-22 lists the Message class public data members.

TABLE 4-22   Message Class Public Data Members
Type Variables Description
MessId
id
The Message ID, unique to the originator of the message.
Address
source
The address of the Solstice EM module or application that originated this message.
Address
dest
The address of the Solstice EM module or application that is the intended destination of this message. This field is optional when the message is first issued. If this is not supplied, the MRM determines the destination for this message and fills in this field.
MessQOS
qos
The quality of service to be used in processing this request.


TABLE 4-23 lists the Message class method types.

TABLE 4-23   Message Class Method Types
Functions Description
type
base type
Return the message's type or base type
is_request
is_response
is_error
Test type of message
dup
Make a copy of message
new_message
Create new message types
delete_message
Delete a message


4.31.1 Constructor

Message(MessType type)

This constructor, above, takes a MessType as its argument and records it as the value of the private variable type. For the possible values of MessType, refer to Section 4.69.7 MessType.

4.31.2 Message Member Functions

This section describes the member functions of the Message class.

basetype

MessType basetype() const

This function call returns the message's base type.

delete_message

static void delete_message(MessagePtr mp)

This function call deletes the Message instance to which mp points. Use this function as a destructor for messages.

dup

virtual MessagePtr dup() = 0

This function call creates a duplicate of the message and returns a pointer to the duplicate. Note that the embedded Asn1Values are copied by reference.

is_error

Boolean is_error() const;

This function call returns TRUE if this is an error message and FALSE if it is not. The message is determined to be an error based on its t member variable.

is_request

Boolean is_request() const;

This function call returns TRUE if this is a request message and FALSE if it is not. The message is determined to be a request based on its t member variable.

is_response

Boolean is_response() const;

This function call returns TRUE if this is a response message and FALSE if it is not. The message is determined to be a response based on its t member variable.

new_message

static Message* new_message(MessType type)

This function call creates a new Message type.

type

MessType type() const

This function call returns the type of this message. For the possible values of the returned enumeration, refer to Section 4.69.7 MessType.

4.32 MessageSAP Class

Inheritance: class MessageSAP

#include <pmi/message.hh>

A key class for the low-level use of the PMI is the MessageSAP class. The KernelMessageSAP, is a subclass of the MessageSAP class. The classes listed in TABLE 4-24 are subclasses of MessageSAP.

TABLE 4-24   MessageSAP Subclasses
Subclass Names Description
ApplMessageSAP
A transport independent SAP used by applications
TDApplMessageSAP
A transport dependent SAP used by applications
TIMessageSAP
A transport independent SAP used by the MIS
TDMessageSAP
A transport dependent SAP used by the MIS


The MessageSAP object class is used as the endpoint of a communications link between two Solstice EM modules. A MessageSAP is created on each end of a communications path by a routine called to register a module or application with the MRM. This routine creates both MessageSaps and then notifies both parties of the MessageSAP that they are to use for communication to the other end.

The MessageSAP maintains a message ID so that request messages issued from this MessageSAP can be uniquely identified. In addition, it contains two instances of the Event object class. These two instances are the receive_request event and the detach event. These are used to notify the owner of the MessageSAP that a request message has been received and also to notify the owner of the MessageSAP that the other side (the MessageSAP to which this one is attached) has been deleted.

The MessageSAP object class defines a number of member functions which are used to either send or receive messages. In addition, member functions are provided that return a unique message ID and cancel a callback for a message or an event.

The MessageSAP class defines queues of pointers to messages. The messages pointed to are all subclasses of the Message class defined in the /opt/SUNWconn/em/include/pmi/message.hh file.

FIGURE 4-3 shows the inheritance hierarchy for the classes based on MessageSAP.

FIGURE 4-3   Inheritance Tree of the MessageSAP Class

TABLE 4-25 lists the MessageSAP public data members.

TABLE 4-25   MessageSAP Public Data Members
Type Variables Description
Callback
receive_request_cb
The event to be posted when an incoming request arrives.
Callback
detach_cb
The event to be posted when the message sap detaches.


TABLE 4-26 lists the MessageSAP method types.

TABLE 4-26   MessageSAP Method Types
Method Name Method Type
send
Send a message (with or without blocking).
receive_request
receive_response
Respond to a received request.
cancel_callback
Cancel the callback for a pending response.
new_id
Generate an ID for a message.


4.32.1 Constructor

MessageSAP ()

This example is the constructor for the MessageSAP.

4.32.2 MessageSAP Member Functions

This section describes the member functions of the MessageSAP class.

cancel_callback

virtual void cancel_callback(MessId m_id) = 0;

This function call cancels the pending response callback for a particular message ID. This form of the cancel_callback member function cancels the callback that was attached to a request sent via the non-blocking form of the send member function. This function takes a message id m_id as input and searches for any callback routine which might have been specified for the response identified by m_id. The callback is removed from the list of callbacks so that when the response message arrives, it is dropped. It returns OK if the callback is successfully cancelled.

Alternatively,

virtual void cancel_callback(Callback &cb) = 0;

This function call cancels the pending response callback for any matching message. This form of the cancel_callback member function cancels the callback that was attached to a request sent via the non-blocking form of the send member function. This function takes an event reference e as input and searches references to this event in the callback list. If any are found, they are deleted from the list. Later, when the response message arrives, it is dropped.

new_id

MessId new_id()

This function call generates a new message identifier (one greater than the last ID this MessageSAP supplied), stores it privately in the MessId instance, and returns its value.

receive_request

virtual Result receive_request(MessagePtr &mp) = 
0;

This function call receives the next pending request message. This function is called after a notification has arrived via the receive_request_callback mechanism. The receive_request_callback receives a notification that a request message has been queued up for this MessageSAP and then this routine should be called to actually access the message. The function takes a reference to a Message pointer and this pointer is set to point to the message received.

virtual Result receive_response(MessId m_id,
	 MessagePtr &mp) = 0;
virtual Result receive_response(ResponseHandle rh,
	 MessagePtr &mp) = 0;

This function call receives the next response for a given message. The message whose response is sought is identified either by its message ID (m_id) or by a response handle (rh). This function is called after the owner of the MessageSAP has been notified that a response message has been queued to this MessageSAP. The notification takes place by having the blocking form of the MessageSAP::send return successful for a confirmed request message. This notification can also occur if the event for the non-blocking form of the send member function is notified. The function sets mp with a pointer to the response message. It returns OK if the first argument successfully identifies a response and the message pointer is successfully set to the response message.

send

virtual SendResult send( MessagePtr mp,
MTime block_time = INFINITY) 
= 0;

This function call is the blocking form of the send member function. This version of send takes a pointer to an instance of the Message object class and a block_time parameter. The message pointer points to the message that is to be sent via this MessageSAP. The block_time parameter specifies how long the caller of this function is willing to wait for the message to be sent. If the message cannot be sent within the time specified, an error is returned.

Messages might not be sent because of resource limitations or a host of other problems.

The above function call returns an error code that specifies why a message could not be sent. The possible values of SendResult are shown below.

typedef enum SendResult {	 	  
                                 SENT,
	 	 	 	 	 	 	
 	 	 	 	 BAD_MESSAGE,
	 	 	 	 	 	 	
 	 	 	 	 WOULD_BLOCK,
	 	 	 	 	 	 	
 	 	 	 	 NO_MEM };

If this is a request message and the function returns SENT, the request message has been successfully sent and the response to this request has been queued to this MessageSAP. If this was a non-confirmed request, SENT indicates only that the request has been sent successfully.

If this is a response message, SENT indicates that the response has been sent.

The following function call is the non-blocking form of the send member function. This version of send takes a pointer to an instance of the Message object class, an instance of the Event object class, and a block_time parameter. This version of send should only be used to send confirmed request messages. It should not be used to send unconfirmed requests or responses.

The message pointer mp points to the message that is to be sent via this MessageSAP. The callback cb specifies a procedure that is to be called whenever the response for this request message has been queued to this MessageSAP. The block_time parameter specifies how long the caller of this function is willing to wait for the message to be sent. If the message cannot be sent within the time specified, an error is returned.

virtual SendResult send( MessagePtr mp,
	 	 	 	 	 	 	
 	 	 	 	 const Callback 
&cb,
	 	 	 	 	 	 	
 	 	 	 	 MTime block_time = INFINITY) 
= 0;

It might not be possible to send a message because of resource limitations or a host of other problems. This routine returns an error code that indicates why a message could not be sent.

4.32.3 MessageSAP Initialization

Following is a sample on how to initialize a MessageSAP.

result init_kernel_msg_sap(Address source_module,
                           MessageSAP **sap_p_p);

The parameter, sap_p_p, is initialized as a result of the call to init_kernel_msg_sap. It is the MessageSAP your driver module should use to send and receive messages from the Solstice EM MRM. After init_kernel_msg_sap has been called, the MessageSAP parameter should be initialized to point to the callback handlers that are used by the MRM.

The function returns a value whose type is Result: that is, a boolean value defined as either OK or NOT_OK. Result is defined in the /opt/SUNWconn/em/include/pmi/sys_type.hh file.

4.33 MessQOS Class

Inheritance: class MessQOS

#include <pmi/message.hh>

Method Types: No public member functions are declared in this class.

The MessQOS class represents the Quality of Service indicator included in all messages. This class is currently a null class (that is, it has no member functions or variables). Its purpose is to store data that affects the type of service to be given to a message. This data might include such things as the allowable lifetime of the message and the type of behavior associated with the transportation of this message. Some examples are:

4.34 MessScope Class

Inheritance: class MessScope

#include <pmi/message.hh>

Method Types: No method types are declared in this class.

The MessScope class defines a message's scope (that is, the range of objects to which the message is to be applied). An instance of MessScope contains a MessScopeType variable and an optional level. The enumeration defines five types of scoping.

TABLE 4-27   Types of MessScope Scoping 
Scope Description
BASE_OBJECT
A request message containing a scope parameter equal to BASE_OBJECT should be sent only to the object specified in the request.
NTH_LEVEL
The request message should be sent to those objects which exist N levels below the base object in the Management Information Tree (MIT). The base object is not part of the message, only those objects which are Nth level descendents of the base object. The level variable in the MessScope class is set to the level desired.
BASE_TO_NTH_LEVEL
The request message is sent to the base object and all descendents of the base object down to the Nth level. Again, the level variable is used to indicate the final level of objects that the request is to be routed to.
ALL_LEVELS
The request message to be sent to the base object and all of its descendents in the MIT. The level variable in the MessScope class is only used for NTH_LEVEL and BASE_TO_NTH_LEVEL scoping.
ALL_LEVELS_EXCEPT_BASE
Used internally by the Solstice EM MIS.


TABLE 4-28 lists the MessScope public data members.

TABLE 4-28   MessScope Public Data Members
Type Variables Description
MessScopeType
type
{BASE_OBJECT,
NTH_LEVEL,
BASE_TO_NTH_LEVEL,
ALL_LEVELS}
U32
level



4.34.1 Constructors

This section specifies the constructors of the MessScope class.

MessScope()
MessScope(MessScopeType type, U32 level)

4.35 MissingAttrVal Class

Inheritance: public ResMess, public Message, public QueueElem

#include <pmi/message.hh>

Method Types: The public methods Message::new_message, Message::delete_message, and MessagePtr dup() are defined in this class. These classes are described in Section 4.31 Message Class.

In addition to the functions or variables it inherits, the MissingAttrVal class adds an attribute ID list parameter.

TABLE 4-29 lists the MissingAttrVal public variable

TABLE 4-29   MissingAttrVal Public Variable
Type Variable Description
Asn1Value
attr_id_list
A list of attribute IDs is specified in the Create request. If an attribute is required to be in an object when the object is created and that attribute is not present in this list, then this error message is generated. This variable contains the list of attributes whose values are missing.


4.35.1 Constructor

MissingAttrVal()

This constructor takes no parameters. It only initializes its parent classes.

4.36 MistypedArg Class

Inheritance: public ResMess, public Message, public QueueElem

#include <pmi/message.hh>

Method Types: The public methods Message::new_message, Message::delete_message, and MessagePtr dup() are defined in this class. These classes are described in Section 4.31 Message Class.

The MistypedArg object class contains all of the member variables and member functions that are present in the classes that it has derived from, either directly or indirectly. This class defines no functions or variables beyond those it inherits. The error message that this class represents is patterned after the ROSE error message mistyped-argument. The usage of this message is described in detail in the documentation covering the ROSE protocol. It is used within the Solstice EM MIS to indicate that one of the arguments supplied with a request message was not supposed to be present.

4.36.1 Constructor

MistypedArg()

This constructor takes no parameters. It only initializes its parent classes.

4.37 MistypedError Class

Inheritance: public ResMess, public Message, public QueueElem

#include <pmi/message.hh>

Method Types: The public methods Message::new_message, Message::delete_message, and MessagePtr dup() are defined in this class. These classes are described in Section 4.31 Message Class.

The MistypedError object class contains all of the member data members and member functions that are present in the classes that it has derived from, either directly or indirectly. This class defines no functions or variables beyond those it inherits. The error message that this class represents is patterned after the ROSE error message mistyped-parameter. It is used within the Solstice EM MIS to indicate that an error message, generated in response to a particular request, contained a parameter which either was not expected as part of the error message or which was not formed properly.

4.37.1 Constructor

MistypedError()

This constructor takes no parameters. It only initializes its parent classes.

4.38 MistypedOp Class

Inheritance: public ResMess, public Message, public QueueElem

#include <pmi/message.hh>

Method Types: The public methods Message::new_message, Message::delete_message, and MessagePtr dup() are defined for this class. These classes are described in Section 4.31 Message Class.

The MistypedOp object class contains all of the member variables and member functions that are present in the classes that it has derived from, either directly or indirectly. This class does not add any additional parameters.

4.38.1 Constructor

MistypedOp()

This constructor takes no parameters. It only initializes its parent classes.

4.39 MistypedRes Class

Inheritance: public ResMess, public ResMess, public Message, public QueueElem

#include <pmi/message.hh>

Method Types: The public methods Message::new_message, Message::delete_message, and MessagePtr dup() are defined for this class. These classes are described in Section 4.31 Message Class.

The MistypedRes object class contains all of the member variables and member functions that are present in the classes that it has derived from, either directly or indirectly. This class defines no functions or variables beyond those it inherits. The error message that this class represents is patterned after the ROSE error message mistyped-result. It is used within the Solstice EM MIS to indicate that a result message, generated for a particular request, contained a parameter that was either not expected or was not formed properly.

4.39.1 Constructor

MistypedRes()

This constructor takes no parameters. It only initializes its parent classes.

4.40 NoSuchAction Class

Inheritance: public ObjResMess, public Message, public QueueElem

#include <pmi/message.hh>

Method Types: The public methods Message::new_message, Message::delete_message, and MessagePtr dup() are defined for this class. These classes are described in Section 4.31 Message Class.

In addition to the functions or variables it inherits, the NoSuchAction class adds two Asn1Value parameters to store a current time and an action type.

The action_type and curr_time members are only defined when returning an error from a scoped ACTION_REQ.

TABLE 4-30 lists the NoSuchAction public data members.

TABLE 4-30   NoSuchAction Public Data Members
Type Variables Description
Asn1Value
action_type
The invalid action type as extracted from the request message.
Asn1Value
curr_time
An optional parameter specifying the time that this response message was generated.


4.40.1 Constructor

NoSuchAction()

This constructor takes no parameters. It only initializes its parent classes.

4.41 NoSuchActionArg Class

Inheritance: public ObjResMess, public ResMess, public Message, public QueueElem

#include <pmi/message.hh>

Method Types: The public methods Message::new_message, Message::delete_message, and MessagePtr dup() are defined for this class. These classes are described in Section 4.31 Message Class.

In addition to the functions or variables it inherits, the NoSuchActionArg class adds two Asn1Value parameters to store a current time and an action type. There are two choices defined for the noSuchArgument error message and this class defines the actionId choice (first of the two).

The action_type and curr_time members are only defined when returning an error from a scoped ACTION_REQ.

TABLE 4-31 lists the NoSuchActionArg public data members.

TABLE 4-31   NoSuchActionArg Public Data Members
Type Variables Description
Asn1Value
action_type
The invalid action type as extracted from the request message.
Asn1Value
curr_time
An optional parameter specifying the time that this response message was generated.


4.41.1 Constructor

NoSuchActionArg()

This constructor takes no parameters. It only initializes its parent classes.

4.42 NoSuchAttr Class

Inheritance: public ResMess, public Message, public QueueElem

#include <pmi/message.hh>

Method Types: The public methods Message::new_message, Message::delete_message, and MessagePtr dup() are defined for this class. These classes are described in Section 4.31 Message Class.

In addition to the functions or variables it inherits, the NoSuchAttr class adds an attribute ID parameter.

TABLE 4-32 lists the NoSuchAttr public variable.

TABLE 4-32   NoSuchAttr Public Variable
Type Variable Description
Asn1Value
attr_id
This is the invalid attribute ID that caused the generation of this error message.


4.42.1 Constructor

NoSuchAttr()

This constructor takes no parameters. It only initializes its parent classes.

4.43 NoSuchEvent Class

Inheritance: public ResMess, public Message, public QueueElem

#include <pmi/message.hh>

Method Types: The public methods Message::new_message, Message::delete_message, and MessagePtr dup() are defined for this class. These classes are described in Section 4.31 Message Class.

In addition to the functions or variables it inherits, the NoSuchEvent class adds two Asn1Value parameters to store an object class and an event type.

TABLE 4-33 lists the NoSuchEvent public data members.

TABLE 4-33   NoSuchEvent Public Data Members
Type Variables Description
Asn1Value
oc
The object class for which the event report request was generated.
Asn1Value
event_type
The invalid event type that caused the generation of this error message.


4.43.1 Constructor

NoSuchEvent()

This constructor takes no parameters. It only initializes its parent classes.

4.44 NoSuchEventArg Class

Inheritance: public ResMess, public Message, public QueueElem

#include <pmi/message.hh>

Method Types: The public methods Message::new_message, Message::delete_message, and MessagePtr dup() are defined for this class. These classes are described in Section 4.31 Message Class.

In addition to the functions or variables it inherits, the NoSuchEventArg class adds two Asn1Value parameters to store an object class and an event type. There are two choices defined for the noSuchArgument error message and this class defines the eventId choice (second of the two).

TABLE 4-34 lists the NoSuchEventArg public data members.

TABLE 4-34   NoSuchEventArg Public Data Members
Type Variables Description
Asn1Value
oc
The object class for which the event report request was generated.
Asn1Value
event_type
The invalid event type that caused the generation of this error message.


4.44.1 Constructor

NoSuchEventArg())

This constructor takes no parameters. It only initializes its parent classes.

4.45 NoSuchMessageId Class

Inheritance: public ResMess, public Message, public QueueElem

#include <pmi/message.hh>

Method Types: The public methods Message::new_message, Message::delete_message, and MessagePtr dup() are defined for this class. These classes are described in Section 4.31 Message Class.

In addition to the functions or variables it inherits, the NoSuchMessageId class adds a get ID parameter.

TABLE 4-35 lists the NoSuchMessageId public variable.

TABLE 4-35   NoSuchMessageId Public Variable
Type Variable Description
Asn1Value
get_id
This is the invalid message ID that caused generation of this error message.


4.45.1 Constructor

NoSuchMessageId()

This constructor takes no parameters. It only initializes its parent classes.

4.46 NoSuchOC Class

Inheritance: public ResMess, public Message, public QueueElem

#include <pmi/message.hh>

Method Types: The public methods Message::new_message, Message::delete_message, and MessagePtr dup() are defined for this class. These classes are described in Section 4.31 Message Class.

In addition to the functions or variables it inherits, the NoSuchOC class adds an Asn1Value parameter to store an object class.

TABLE 4-36 lists the NoSuchOC public variable.

TABLE 4-36   NoSuchOC Public Variable
Type Variable Description
Asn1Value
oc
The invalid object class that caused the generation of this error message.


4.46.1 Constructor

NoSuchOC()

This constructor takes no parameters. It only initializes its parent classes.

4.47 NoSuchOI Class

Inheritance: public ResMess, public Message, public QueueElem

#include <pmi/message.hh>

Method Types: The public methods Message::new_message, Message::delete_message, and MessagePtr dup() are defined for this class. These classes are described in Section 4.31 Message Class.

In addition to the functions or variables it inherits, the NoSuchOI class adds an Asn1Value parameter to store an object instance.

TABLE 4-37 lists the NoSuchOI public variable.

TABLE 4-37   NoSuchOI Public Variable
Type Variable Description
Asn1Value
oi
The invalid object instance that caused the generation of this error message.


4.47.1 Constructor

NoSuchOI()

This constructor takes no parameters. It only initializes its parent classes.

4.48 NoSuchRefOI Class

Inheritance: public ResMess, public Message, public QueueElem

#include <pmi/message.hh>

Method Types: The public methods Message::new_message, Message::delete_message, and MessagePtr dup() are defined for this class. These classes are described in Section 4.31 Message Class.

In addition to the functions or variables it inherits, the NoSuchRefOI class adds an object instance parameter.

TABLE 4-38 lists the NoSuchRefOI public variable.

TABLE 4-38   NoSuchRefOI Public Variable
Type Variable Description
Asn1Value
oi
The invalid object instance that caused the generation of this error message.


4.48.1 Constructor

NoSuchRefOI()

This constructor takes no parameters. It only initializes its parent classes.

4.49 ObjReqMess Class

Inheritance: public ReqMess, public Message, public QueueElem

#include <pmi/message.hh>

Method Types: The public methods Message::new_message, Message::delete_message, and MessagePtr dup() are defined for this class. These classes are described in Section 4.31 Message Class.

In addition to the functions or variables it inherits, the ObjReqMess class adds two Asn1Value parameters for an object class and an object instance.

TABLE 4-39 lists the ObjReqMess public data members.

TABLE 4-39   ObjReqMess Public Data Members
Type Variables Description
Asn1Value
oc
This is either a base or managed object class as defined for the type of message being created.
Asn1Value
oi
This is either a base or managed object instance as defined for the type of message being created.


4.49.1 Constructor

ObjReqMess(MessType type)

4.50 ObjResMess Class

Inheritance: public ResMess, public Message, public QueueElem

#include <pmi/message.hh>

Method Types: The public methods Message::new_message, Message::delete_message, and MessagePtr dup() are defined for this class. These classes are described in Section 4.31 Message Class.

In addition to the functions or variables it inherits, the ObjResMess class adds two Asn1Values to store an object class and an object instance. Any response (also linked request, error, and linked error) messages which include object class and object instance parameters in the message would be derived from this class.

TABLE 4-40 lists the ObjResMess public data members.

TABLE 4-40   ObjResMess Public Data Members
Type Variables Description
Asn1Value
oc
The object class for this response message. .
Asn1Value
oi
The object instance for this response message.


4.50.1 Constructor

ObjResMess (MessType type)

This constructor takes a MessType variable as input and passes this variable on to the constructor(s) for the classes from which this class is derived.

4.51 OpCancelled Class

Inheritance: public ResMess, public Message, public QueueElem

#include <pmi/message.hh>

Data Members: No public data members are declared in this class.

Method Types: The public methods Message::new_message, Message::delete_message, and MessagePtr dup() are defined for this class. These classes are described in Section 4.31 Message Class.

The OpCancelled object class contains all of the member variables and member functions that are present in the classes that it has derived from, either directly or indirectly. This class defines no functions or variables beyond those it inherits.

4.51.1 Constructor

OpCancelled()

This constructor takes no parameters. It only initializes its parent classes.

4.52 ProcessFailure Class

Inheritance: public ObjResMess, public ResMess, public Message, public QueueElem

#include <pmi/message.hh>

Method Types: The public methods Message::new_message, Message::delete_message, and MessagePtr dup() are defined for this class. These classes are described in Section 4.31 Message Class.

In addition to the functions or variables it inherits, the ProcessFailure class adds a specific error information parameter.

TABLE 4-41 lists the ProcessFailure public variable.

TABLE 4-41   ProcessFailure Public Variable
Type Function Description
Asn1Value
spec_err_info
Error information which gives additional information about why this error message was generated. The format of this parameter is variable and depends upon the object class specified in this error message.


4.52.1 Constructor

ProcessFailure()

This constructor takes no parameters. It only initializes its parent classes.

4.53 ReqMess Class

Inheritance: public Message, public QueueElem

#include <pmi/message.hh>

Method Types: The public methods Message::new_message, Message::delete_message, and MessagePtr dup() are defined for this class. These classes are described in Section 4.31 Message Class.

In addition to the functions or variables it inherits, the ReqMess class adds a MessMode parameter to a message. The usage of MessMode variables are described in Section 4.69.2 MessMode.

TABLE 4-42 lists the ReqMess public data members.

TABLE 4-42   ReqMess Public Data Members
Type Variables Description
MessMode
mode
The mode in which a request message is sent:
{CONFIRMED,
UNCONFIRMED}
Oid
app_context
The application context name for this request message. This is used to establish an association within the protocol driver.
U32
flags
enum


ReqFlags
{OVERRIDE_NAME_BINDING = 1, OVERRIDE_ATTR_CHECKS = 2, INTERNAL_RELATIONSHIP_CHANGE = 4};


4.53.1 Constructor

 ReqMess(MessType type)

This constructor takes a MessType variable as input and sets the member variable mode equal to the variable passed in.

4.54 ResMess Class

Inheritance: public Message, public QueueElem

#include <pmi/message.hh>

Method Types: The public methods Message::new_message, Message::delete_message, and MessagePtr dup() are defined for this class. These classes are described in Section 4.31 Message Class.

In addition to the functions or variables it inherits, the ResMess class adds a Boolean variable called linked that indicates whether this is a linked response message. In all cases, a linked response contains the same data as would be found in an unlinked response so that (applied to the same message) linked_get_result returns the same data as get_result. Error messages are considered to be response messages, but can also be linked requests.

TABLE 4-43 lists the ResMess public variable.

TABLE 4-43   ResMess Public Variable
Type Variable Description
Boolean
linked
When this variable is set to TRUE, this is a linked request message. When FALSE, this is a response message.


4.54.1 Constructor

ResMess(MessType type)

This constructor takes a MessType variable as input and passes this variable on to the constructor(s) for the classes from which this class is derived.

4.55 ResourceLimit Class

Inheritance: public ResMess, public Message, public QueueElem

#include <pmi/message.hh>

Method Types: The public methods Message::new_message, Message::delete_message, and MessagePtr dup() are defined for this class. These classes are described in Section 4.31 Message Class.

The ResourceLimit object class contains all of the member variables and member functions that are present in the classes that it has derived from, either directly or indirectly. This class defines no functions or variables beyond those it inherits. The error message that this class represents is patterned after the ROSE error message resource-limitation. It is used within the Solstice EM MIS to indicate that the receiver of a request message was unable to service the request due to a lack of resources.

4.55.1 Constructor

protected ResourceLimit()

This constructor takes no parameters. It only initializes its parent classes.

4.56 ScopedReqMess Class

Inheritance: public ObjReqMess, public ReqMess, public Message, public QueueElem

#include <pmi/message.hh>

Method Types: The public methods Message::new_message, Message::delete_message, and MessagePtr dup() are defined for this class. These classes are described in Section 4.31 Message Class./font>

In addition to the functions or variables it inherits, the ScopedReqMess class adds a MessScope variable, two Asn1Value parameters specifying a filter and access control, and a MessSync parameter. These parameters are present in all request messages for which scoping can be specified. Each of these parameters is optional.

TABLE 4-44 lists the ScopedReqMess public data members.

TABLE 4-44   ScopedReqMess Public Data Members 
Type Variables Description
MessScope
scope
The type of scoping to be used for this request message. The possible scoping types are listed in Section 4.69.4 MessScopeType.
Asn1Value
filter
This defines a filter that all objects selected via scoping must pass. The message is not sent to any object that does not pass the filter.
Asn1Value
access
This defines the access control that objects selected via scoping must be pass. The message is not sent to any object that does not pass the access control.
MessSync
sync
The type of synchronization for this scoped message;
{ATOMIC,BEST_EFFORT}


4.56.1 Constructor

 ScopedReqMess(MessType type)

This constructor takes a MessType variable as input and passes this variable on to the constructor(s) for the classes from which this class derived.

4.57 SetListErr Class

Inheritance: public ObjResMess, public Message, public QueueElem

#include <pmi/message.hh>

Method Types: The public methods Message::new_message, Message::delete_message, and MessagePtr dup() are defined for this class. These classes are described in Section 4.31 Message Class.

In addition to the functions or variables it inherits, the SetListErr class adds two Asn1Value parameters to store a current time and a set information list. TABLE 4-45 lists the SetListErr public data members.

TABLE 4-45   SetListErr Public Data Members
Type Variables Description
Asn1Value
set_info_list
The list of attributes slated for modification by the Set request. This list contains any attributes which could be modified as well as any attributes which were in error and thus caused the generation of this error message.
Asn1Value
curr_time
An optional parameter specifying the time that this response message was generated.


4.57.1 Constructor

 SetListErr()

This constructor takes no parameters. It only initializes its parent classes.

4.58 SetReq Class

Inheritance: public ScopedReqMess, public ReqMess, public Message, public QueueElem

#include <pmi/message.hh>

Method Types: The public methods Message::new_message, Message::delete_message, and MessagePtr dup() are defined for this class. These classes are described in Section 4.31 Message Class.

The SetReq object class contains all of the member variables and member functions that are present in the classes that it has derived from, either directly or indirectly. In addition to the functions or variables it inherits, the SetReq class adds an attribute list parameter.

TABLE 4-46 lists the SetReq public variable.

TABLE 4-46   SetReq Public Variable
Type Variable Description
Asn1Value
modify_list
Each element of this list contains an attribute ID, an attribute value, and a modify operator.


4.58.1 Constructor

 SetReq()

This constructor takes no parameters. It only initializes its parent classes.

4.59 SetRes Class

Inheritance: public ObjResMess, public ResMess, public Message, public QueueElem

#include <pmi/message.hh>

Method Types: The public methods Message::new_message, Message::delete_message, and MessagePtr dup() are defined for this class. These classes are described in Section 4.31 Message Class.

In addition to the functions or variables it inherits, the SetRes class adds two Asn1Value parameters to store a current time and an attribute list. TABLE 4-47 lists the SetRes public data members.

TABLE 4-47   SetRes Public Data Members
Type Variables Description
Asn1Value
curr_time
An optional parameter specifying the time that this response message was generated.
Asn1Value
attr_list
A list of attributes was specified in the Set request message for which this response is being generated. This parameter basically echoes back to the requester the list of attributes that were modified and their new values.


4.59.1 Constructor

 SetRes()

This constructor takes no parameters. It only initializes its parent classes.

4.60 SyncNotSupp Class

Inheritance: public ResMess, public Message, public QueueElem

#include <pmi/message.hh>

Method Types: The public methods Message::new_message, Message::delete_message, and MessagePtr dup() are defined for this class. These classes are described in Section 4.31 Message Class.

In addition to the functions or variables it inherits, the SyncNotSupp class adds a sync parameter.

Each of the classes derived from Message relies on the ISO specifications of the CMIP protocol and ASN.1 data encoding. TABLE 4-48 lists the SyncNotSupp public variable.

TABLE 4-48   SyncNotSupp Public Variable
Type Variable Description
MessSync
sync
Specifies the type of synchronization which was not able to be performed and caused the generation of this error message.


4.60.1 Constructor

 SyncNotSupp()

This constructor takes no parameters. It only initializes its parent classes.

4.61 TimedOut Class

Inheritance: public ResMess, public Message, public QueueElem

#include <pmi/message.hh>

Method Types: The public methods Message::new_message, Message::delete_message, and MessagePtr dup() are defined for this class. These classes are described in Section 4.31 Message Class.

This class defines no functions or variables beyond those it inherits. The error message that this class represents is generated whenever the life-span of a message has been exceeded. Future functionality envisioned for the Solstice EM MIS would be to include in the MessQOS (quality of service) class some indication of how long the requester is willing to wait for a response to a given request message (a message lifetime). A TimedOut message would be generated whenever the lifetime for a given request message had been exceeded (that is, whenever the request has not been responded to within its lifetime).

4.61.1 Constructor

 TimedOut()

This constructor takes no parameters. It only initializes its parent classes.

4.62 UnexpChildOp Class

Inheritance: public ResMess, public Message, public QueueElem

#include <pmi/message.hh>

Method Types: The public methods Message::new_message, Message::delete_message, and MessagePtr dup() are defined for this class. These classes are described in Section 4.31 Message Class.

The UnexpChildOp object class contains all of the member variables and member functions that are present in the classes that it has derived from, either directly or indirectly. This class defines no functions or variables beyond those it inherits. The error message that this class represents is patterned after the ROSE error message unexpected-child-operation. It is used within the Solstice EM MIS to indicate that a linked request was received and that the linked ID specified did not refer to a request for which this type of linked reply is valid.

4.62.1 Constructor

 UnexpChildOp()

This constructor takes no parameters. It only initializes its parent classes.

4.63 UnexpError Class

Inheritance: class UnexpError : public ResMess, public Message, public QueueElem

#include <pmi/message.hh>

Data Members: No public data members are declared in this class.

Method Types: The public methods Message::new_message, Message::delete_message, and MessagePtr dup() are defined for this class. These classes are described in Section 4.31 Message Class.

The UnexpError class defines no functions or variables beyond those it inherits. The error message that this class represents is patterned after the ROSE error message unexpected-error. It is used to indicate that an error message, generated in response to a particular request, is not one of the set of error messages that can be sent in response to that request.

4.63.1 Constructor

 UnexpError()

This constructor takes no parameters. It only initializes its parent classes.

4.64 UnexpRes Class

Inheritance: public ResMess, public Message, public QueueElem

#include <pmi/message.hh>

Data Members: No public data members are declared in this class.

Method Types: The public methods Message::new_message, Message::delete_message, and MessagePtr dup() are defined for this class. These classes are described in Section 4.31 Message Class.

The UnexpRes object class defines no functions or variables beyond those it inherits. The error message that this class represents is patterned after the ROSE error message "result-response-unexpected". It is used to indicate that a result message was generated for as non-confirmed request.

4.64.1 Constructor

 UnexpRes()

This constructor takes no parameters. It only initializes its parent classes.

4.65 UnrecError Class

Inheritance: public ResMess, public Message, public QueueElem

#include <pmi/message.hh>

Method Types: No public member functions are declared in this class.

The UnrecError class defines no functions or variables beyond those it inherits. The error message that this class represents is patterned after the ROSE error message "unrecognized-error". It is used to indicate that an error message, generated in response to a particular request, is not one of the set of error messages known within Solstice EM.

4.65.1 Constructor

 UnrecError()

This constructor takes no parameters. It only initializes its parent classes.

4.66 UnrecLinkedId Class

Inheritance: public ResMess, public Message, public QueueElem

#include <pmi/message.hh>

Method Types: The public methods Message::new_message, Message::delete_message, and MessagePtr dup() are defined for this class. These classes are described in Section 4.31 Message Class.

The UnrecLinkedId class defines no functions or variables beyond those it inherits. The error message that this class represents is patterned after the ROSE error message "unrecognized-linked-id." It is used to indicate that a linked request could not be serviced because the linked ID specified in the request did not refer to any known outstanding request.

4.66.1 Constructor

 UnrecLinkedId()

This constructor takes no parameters. It only initializes its parent classes.

4.67 UnrecMessageId Class

Inheritance: public ResMess, public Message, public QueueElem

#include <pmi/message.hh>

Method Types: The public methods Message::new_message, Message::delete_message, and MessagePtr dup() are defined for this class. These classes are described in Section 4.31 Message Class.

The UnrecMessageId class defines no functions or variables beyond those it inherits. The error message that this class represents is patterned after the ROSE error message"unrecognized-invocation". It is used to indicate that a result or error message was generated where the message ID specified did not refer to any outstanding request.

4.67.1 Constructor

 UnrecMessageId()

This constructor takes no parameters. It only initializes its parent classes.

4.68 UnrecOp Class

Inheritance: public ResMess, public Message, public QueueElem

#include <pmi/message.hh>

Method Types: The public methods Message::new_message, Message::delete_message, and MessagePtr dup() are defined for this class. These classes are described in Section 4.31 Message Class.

The UnrecOp object class defines no functions or variables beyond those it inherits. The error message that this class represents is patterned after the ROSE error message "unrecognized operation." The usage of this message is described in detail in the documentation covering the ROSE protocol. It is used to indicate that the operation requested is not known to the receiver of the request.

4.68.1 Constructor

 UnrecOp()

This constructor takes no parameters. It only initializes its parent classes.

4.69 Constants and Defined Types

The following subsections describe the constants and defined types for the low-level usage of the PMI.

4.69.1 MessId

A MessId variable is included in each message passed by way of a MessageSAP. The MessId variable is used to uniquely identify outstanding request messages for a Solstice EM module or application. Each Solstice EM module is responsible for generating new request messages that have unique message IDs. Unique means that the message can not have the same ID as another request (that is, still outstanding from this module or applicatio). The MessId variable is declared in the /opt/SUNWconn/em/include/pmi/message.hh file.

typedef I32 MessId;

4.69.2 MessMode

The MessMode variable is declared in the /opt/SUNWconn/em/include/pmi/message.hh file.

enum MessMode
   {CONFIRMED,
    UNCONFIRMED };

4.69.3 MessagePtr

The MessagePtr variable is declared in the /opt/SUNWconn/em/include/pmi/message.hh file.

typedef class Message *MessagePtr;

4.69.4 MessScopeType

The MessScopeType variable is declared in the /opt/SUNWconn/em/include/pmi/message.hh file.

enum MessScopeType
   {BASE_OBJECT,
    NTH_LEVEL,
    BASE_TO_NTH_LEVEL,
    ALL_LEVELS,
    ALL_LEVELS_EXCEPT_BASE };

4.69.5 MessSync

This enumeration defines the types of message synchronization that can be requested: ATOMIC or BEST_EFFORT. Currently only BEST_EFFORT is supported, since the requirements for ATOMIC synchronization are not fully defined by the standards organizations.

Type of Synchronization Description
BEST_EFFORT
Scoped requests are to be processed in a best-effort fashion; if one part of a scoped request fails, the other parts of the scoped request are still attempted.
ATOMIC
If it were operational, would indicate that if any portion of a scoped request failed, subsequent parts of the request should not be attempted and already completed parts should be reversed.


The MessSync variable is declared in the /opt/SUNWconn/em/include/pmi/message.hh file.

enum MessSync
   {BEST_EFFORT,
    ATOMIC };

4.69.6 MessBaseType

The MessBaseType variable is declared in the /opt/SUNWconn/em/include/pmi/message.hh file.

enum MessBaseType
   {MESSAGE,
    REQ_MESS,
    OBJ_REQ_MESS,
    SCOPED_REQ_MESS,
    RES_MESS,
    OBJ_RES_MESS };

4.69.7 MessType

The MessType enumeration defines a unique ID for each type of message that can be sent within Solstice EM. This includes all the CMIS request messages, CMIS response messages, CMIS error messages, ROSE user-reject responses, SNMP requests, SNMP responses, and Solstice EM error responses. CODE EXAMPLE 4-1 provides an exhaustive list of the messages it is possible to send via the MessageSAP interface. Each of these messages derives from one of the base message classes defined in the /opt/SUNWconn/em/include/pmi/message.hh file.

CODE EXAMPLE 4-1   MessageSAP Messages 
enum MessType
   {
// requests
   EVENT_REPORT_REQ
   GET_REQ
   SET_REQ
   ACTION_REQ
   CREATE_REQ
   DELETE_REQ
   CANCEL_GET_REQ
// normal responses
   EVENT_REPORT_RES
   GET_RES
   SET_RES
   ACTION_RES
   CREATE_RES
   DELETE_RES
   CANCEL_GET_RES
// Errors
   NO_SUCH_OC
   NO_SUCH_OI
   ACCESS_DENIED
   SYNC_NOT_SUPP
   INVALID_FILTER
   NO_SUCH_ATTR
   INVALID_ATTR_VAL
   GET_LIST_ERR
   SET_LIST_ERR
   NO_SUCH_ACTION
   PROCESS_FAILURE
   DUPLICATE_OI
   NO_SUCH_REF_OI
   NO_SUCH_EVENT
   NO_SUCH_ACTION_REQ
   NO_SUCH_EVENT_ARG
   INVALID_ACTION_ARG
   INVALID_SCOPE
   INVALID_OI
   MISSING_ATTR_VAL
   CLASS_INST_CONFL
   COMPLEX_LIMIT
   MISTYPED_OP
   INVALID_OPERATION
   INVALID_OPERATOR
   NO_SUCH_MESSAGE_ID
   OP_CANCELLED
// ROSE level user-reject responses
   DUP_MESSAGE_ID
   UNREC_OP
   MISTYPED_ARG
   RESOURCE_LIMIT
   ASSOC_RELEASED
   UNREC_LINKED_ID
   LINKED_RES_UNEXP
   UNEXP_CHILD_OP
   UNREC_MESSAGE_ID
   UNEXP_RES
   MISTYPED_RES
   ERROR_RES_UNEXP
   UNREC_ERROR
   UNEXP_ERROR
   MISTYPED_ERROR
// Solstice EM error responses
   TIMED_OUT
   DEST_UNREACH
   NO_SUCH_DEST
   };

4.69.8 MESSTYPE_MAX

The MESSTYPE_MAX variable is declared in the /opt/SUNWconn/em/include/pmi/message.hh file.

const MessType MESSTYPE_MAX = NO_SUCH_DEST;

4.69.9 ResponseHandle

The ResponseHandle variable is declared in the /opt/SUNWconn/em/include/pmi/message.hh file.

typedef void *ResponseHandle;

4.69.10 SendResult

The SendResult variable is declared in the /opt/SUNWconn/em/include/pmi/message.hh file.

typedef enum SendResult
      {SENT,
       BAD_MESSAGE,
       WOULD_BLOCK,
       NO_MEM };
 
// Used by the MessageSAP class.
 
#define SENT TRUE


Sun Microsystems, Inc.
Copyright information. All rights reserved.
Doc Set  |   Contents   |   Previous   |   Next   |   Index