-- from X.722 Annex:
--		      Examples of use of the guidelines
--		     ===================================
--(weitere beispiele, die auch anwendbar sind befinden sich in X.721)

-- A.1	Managed object class definition

exampleObjectClass MANAGED OBJECT CLASS

	DERIVED FROM		"CCITT Rec. X.721 (1992) | ISO/IEC10165-2 :
				1992":top ;

	CHARACTERIZED BY	examplePackage2 ;

	CONDITIONAL PACKAGES

		examplePackage1		PACKAGE

			ACTIONS		qOSResetAction,
					activate ;

			NOTIFICATIONS	communicationError;

		REGISTERED AS	{joint-iso-ccitt ms(9) smi(3) part4(4)
				package(4) examplepack1(0)} ;

		PRESENT IF	!conformance class 2 of underlying resource
				implemented as described in ISO/IEC XXXX! ;

REGISTERED AS	{joint-iso-ccitt ms(9) smi(3) part4(4) managedObjectClass(3)
		exampleclass(0)} ;

-- A.2	Name binding definition

exampleNameBinding NAME BINDING

	SUBORDINATE OBJECT CLASS	exampleObjectClass ;

	NAMED BY
	SUPERIOR OBJECT CLASS	"CCITT Rec. X.721 (1992) | ISO/IEC 10165-2 :
				1992":system ;

	WITH ATTRIBUTE		objectName ;

	BEHAVIOUR
		containmentBehaviour	BEHAVIOUR
			DEFINED AS	!A maximum of 3 instances of
					exampleObjectClass may be contained in
					any instance of "CCITT Rec. X.721 |
					ISO/IEC 10165-2":system.!
		;
	;

	CREATE	WITH-AUTOMATIC-INSTANCE-NAMING createErrorParameter ;

	DELETE	DELETES-CONTAINED-OBJECTS ;

REGISTERED AS {joint-iso-ccitt ms(9) smi(3) part4(4) nameBinding(6)
		examplenb(0)} ;

-- A.3	Parameter definitions

pDUHeader PARAMETER

	CONTEXT		EVENT-INFO;

	WITH SYNTAX	ParameterModule.PDUString;

	BEHAVIOUR
		pDUHeaderBehavior BEHAVIOUR
			DEFINED AS	!PDU header. Carrried in the CMIP
					eventInfo field.!
		;
	;

REGISTERED AS {joint-iso-ccitt ms(9) smi(3) part4(4) parameter(5)
		pduheaderparam(0)};

createErrorParameter PARAMETER

	CONTEXT		SPECIFIC-ERROR ;

	WITH SYNTAX	ParameterModule.ErrorInfo1 ;

	BEHAVIOUR
		createErrorBehaviour	BEHAVIOUR
			DEFINED AS	!If the maximum number of instances of
exampleObjectClass exist within the containing managed object, attempts to
create additional instances will result in the return of a CMIP Processing
Failure error where the SpecificErrorInfo field is of the form
	SpecificErrorInfo ::= SEQUENCE {
		errorid		OBJECT IDENTIFIER,
		errorinfo	ANY DEFINED BY errorid }
The OBJECT IDENTIFIER carried in errorid shall be the value under which this
parameter definition is registered. The type carried in errorinfo shall be the
type identified by the WITH SYNTAX construct of this parameter definition. The
value carried by this type indicates the number of instances of this managed
object class that currently exist in the containing managed object.!
			;
	;

REGISTERED AS {joint-iso-ccitt ms(9) smi(3) part4(4) parameter(5)
		createrror(1)} ;

serviceProviderErrorResponseReason PARAMETER

	CONTEXT		ACTION-REPLY;

	WITH SYNTAX	ParameterModule.ServiceProviderErrorResponseReason;

	BEHAVIOUR
		serviceProviderErrorResponseReasonBehaviour BEHAVIOUR
			DEFINED AS	!Returned in the responseParameters
field of the CMIP actionReplyInfo if responseCode has the value
serviceProviderErrorResponse.!
		;
	;

REGISTERED AS {joint-iso-ccitt ms(9) smi(3) part4(4) parameter(5)
		sperrorrsp(2)} ;

-- A.4	Package definition

examplePackage2 PACKAGE

	BEHAVIOUR	exampleClassBehaviour ;

	ATTRIBUTES	objectName		GET ,
			qOS-Error-Cause		GET ,
			qOS-Error-Counter	PERMITTED VALUES
						AttributeModule.QOSCounterRange
						REQUIRED VALUES
						AttributeModule.QOSCounterRange
						GET ;

	ATTRIBUTE GROUPS	qOS-Group ;

	NOTIFICATIONS	protocolError;

REGISTERED AS {joint-iso-ccitt ms(9) smi(3) part4(4) package(4)
		examplepack2(1)} ;

-- A.5	Attribute defintions

objectName ATTRIBUTE
	WITH ATTRIBUTE SYNTAX	AttributeModule.ObjectName ;
	MATCHES FOR		EQUALITY ;

REGISTERED AS {joint-iso-ccitt ms(9) smi(3) part4(4) attribute(4)
		objectname(0)} ;

qOS-Error-Cause ATTRIBUTE
	WITH ATTRIBUTE SYNTAX	AttributeModule.QOSErrorCause ;
	MATCHES FOR		EQUALITY ;
	BEHAVIOUR		qOSErrorBehaviour ;

REGISTERED AS {joint-iso-ccitt ms(9) smi(3) part4(4) attribute(4)
		qoscause(1)} ;

qOS-Error-Counter ATTRIBUTE
	WITH ATTRIBUTE SYNTAX	AttributeModule.QOSErrorCounter ;
	MATCHES FOR		EQUALITY, ORDERING ;
	BEHAVIOUR		qOSCounterBehaviour ;

REGISTERED AS {joint-iso-ccitt ms(9) smi(3) part4(4) attribute(4)
		qoscount(2)} ;

-- A.6	Attribute group definition

qOS-Group ATTRIBUTE GROUP
	GROUP ELEMENTS	qOS-Error-Cause, qOS-Error-Counter ;
	DESCRIPTION	!Attribute group that includes all QOS-related
			attributes in a managed object class! ;

REGISTERED AS {joint-iso-ccitt ms(9) smi(3) part4(4) attribute(4)
		qosgroup(0)} ;

-- A.7	Action definitions

qOSResetAction	 ACTION
	BEHAVIOUR
		reset BEHAVIOUR
			DEFINED AS	!<Definition of the reset behaviour
					and its effect on the operation of the
					managed object, etc..>!
		;
	;
	MODE CONFIRMED;

REGISTERED AS {joint-iso-ccitt ms(9) smi(3) part4(4) action(4) reset(0)} ;

activate ACTION
	BEHAVIOUR
		activateBehaviour BEHAVIOUR
			DEFINED AS	!Enables the managed object for
					operation.  If the action succeds, the
value successResponse is returned in the responseCode parameter of the CMIP
actionReplyInfo. If the action fails because of a problem with the underlying
service provider, responseCode is set to the value
serviceProviderErrorResponse and the parameter
serviceProviderErrorResponseReason returned to indicate the cause of the
problem.!
		;
	;
	MODE CONFIRMED;
	PARAMETERS	serviceProviderErrorResponseReason ;
	WITH REPLY SYNTAX	ActionModule.ActivateReply;

REGISTERED AS {joint-iso-ccitt ms(9) smi(3) part4(4) action(4) activate(1)} ;

-- A.8	Notification defintions

communicationError	NOTIFICATION
	BEHAVIOUR		communicationErrorBehaviour;
	WITH INFORMATION SYNTAX	NotificationModule.ErrorInfo ;
	WITH REPLY SYNTAX	NotificationModule.ErrorResult ;

REGISTERED AS {joint-iso-ccitt ms(9) smi(3) part4(4) notification(4)
		commerror(0)} ;

protocolError NOTIFICATION
	BEHAVIOUR 
		protocolErrorBehaviour	BEHAVIOUR
			DEFINED AS	!Generated when a protocol entity
receives a PDU which is invalid or contains a protocol error. The notification
includes the header of the received PDU.!
		;
	;
	PARAMETERS	pDUHeader;
	WITH INFORMATION SYNTAX	NotificationModule.ProtocolError;

REGISTERED AS {joint-iso-ccitt ms(9) smi(3) part4(4) notification(4)
		protoerror(1)} ;

-- A.9	Behaviour definitions

qOSCounterBehaviour	BEHAVIOUR
	DEFINED AS	!The QOS Error Counter attribute is a wraparound
counter that is incremented by one for every occurrence of a QOS Error. Its
value is a positive integer, whose range is specified in any package that
references this definition. When the counter reaches its maximum value, the
next increment causes its value to return to zero.! ;

qOSErrorBehaviour BEHAVIOUR
	DEFINED AS	!The QOS Error Cause attribute indicates the reason
for a failure in quality of service associated with the managed object.

NOTE - The relationship between the permitted attribute values and the
operation of the managed object itself are defined by the behaviour
definitions associated with the managed object class defintion.!;

communicationErrorBehaviour BEHAVIOUR
	DEFINED AS	!The CommunicationError notification is generated by
the managed object class when a communication error is detected by the managed
object. The notification may contain any combination of the parameters
Probable Cause, Severity, Trend Indication, Backed Up Status, Diagnostic Info,
Proposed Repair Action, Threshold Info, STate Change and Other Info.

	NOTE - The precise definition of what constitutes a communication erro
and the parameter values that apply is managed object class specific. In a
practical example, this Behaviour definition could, for example, refer to
pieces of specification in a base standard in order to specify the
behaviour.!;

exampleClassBehaviour BEHAVIOUR
	DEFINED AS	!<...Description of managed object class behaviour,
including
- How its attributes attain particular values and what they mean,
- What circumstances cause notifications to be generated,
- Etc. >!;


