[Search for users] [Overall Top Noters] [List of all Conferences] [Download this site]

Conference azur::mcc

Title:DECmcc user notes file. Does not replace IPMT.
Notice:Use IPMT for problems. Newsletter location in note 6187
Moderator:TAEC::BEROUD
Created:Mon Aug 21 1989
Last Modified:Wed Jun 04 1997
Last Successful Update:Fri Jun 06 1997
Number of topics:6497
Total number of notes:27359

23.0. "Help in developing a simple AM" by CLUSTA::TAMER () Thu Oct 19 1989 13:17

    Hi,
    
    I am trying to write a simple MCC Access Module in order to help me evaluate
    MCC (Please refer to .4 in the Introductions note for the purpose of
    this exercise). 
    
    I have developed a small model consisting of several entities, each
    with a couple of attributes.  The Global entity name is: Subsystem.
                                                                      
    I followed the guidelines in the documentation in developing the Sample
    Am entity.  I went through all the steps from MCCMSL, DAP, MCC$PTB
    module, HFB. In addition, I modified the Dispatch vector file, and the
    initialization and service entry routines.  Finally, I created the
    shareable executable image and enrolled it using the <MCC> ENROLL> command.
    
    The self management part such as < MCC> SHOW MCC subsystem all char> works
    fine. However, If I say< MCC> SHOW Subsystem 'whatever' all char|count|...> 
    The answer comes: Invalid entity identifier.
    
    I guess that makes sense since in 'Sample', node (as in < MCC> SHOW
    Sample node all char>) must have been identified as an instance of entity 
    Sample.  But I cannot find, in the MCC documentation that I have, how to 
    define the entity identifier for Subsystem.
    
    What did I do wrong (or miss) ?  Help is much appreciated.
           
    Thanks,
    Phil
T.RTitleUserPersonal
Name
DateLines
23.1MM can have more than one Global EntityKETJE::PACCOFri Oct 20 1989 16:239
    When you create a module, you create in fact two global entities, one
    for the management interface, one (or more) for the service.
    These two global entities e.g SUBSYSTEM, SUBSYSTEM_AM must be
    different, and must receive two unique class codes among all global
    entities.  I presume this is your problem.
    
    Read the SRM page 116 (7.4.3. Philosophy assigning names and codes).
    
    /Dominique.
23.2Have not solved it yet.CLUSTA::TAMERFri Oct 20 1989 17:2417
    RE: .1
    
    Thanks for the reply.  However, this does not solve the problem since I
    already defined SUBSYSTEM as a global entity with a unique code and
    SUBSYSTEM_AM (for self-management) as a subordinate entity to the
    global entity MCC.
    I narrowed down the problem:
       in the following command  MCC> SHOW SAMPLE sampleid ALL CHAR
       where  was sampleid defined.  I cannot find it in the documentation
       that. If I can define 'sampleid' to 'node' for example, I think 
       it will work.
    
    So, help is needed on how to define the entity's identifiers.
    
    Thanks,
    Phil
    
23.3INFO - MSL IDENTIFIERS field needs to be definedGOSTE::CALLANDERMon Oct 23 1989 12:5945
    THE QUESTION WAS:    "help is needed on how to define the entity's
    identifiers." 
 
    Okay, what you are looking to do is define the identifiers and not how
    to define "sampleid" 
    
    >>   in the following command  MCC> SHOW SAMPLE sampleid ALL CHAR
    >>   where  was sampleid defined.  I cannot find it in the documentation
    
    You want to define the valid datatypes for the SAMPLE entity. If you
    look at the sample AM's service interface management specification
    you should see:
    
    GLOBAL ENTITY Sample = 15 :
        IDENTIFIER = (Name,Address),
    
    		:
    	< sections removed >
    		:
    
        IDENTIFIER ATTRIBUTES
            ATTRIBUTE Address = 1 : Phase4Address
               ACCESS = NONSETABLE,
               DISPLAY = TRUE,
               CATEGORIES = (CONFIGURATION),
               SYMBOL = SAMPLE_ADDR
            END ATTRIBUTE Address;
    
            ATTRIBUTE Name = 2 : Phase4Name
               ACCESS = NONSETABLE,
               DISPLAY = TRUE,
               CATEGORIES = (CONFIGURATION),
               SYMBOL = SAMPLE_NAME
            END ATTRIBUTE Name;
    
            END ATTRIBUTES; (* IDENTIFIER *)
    
    It is the IDENTIFIERS field that you need to have, as well as the
    associated attribute definitions (which must be part of the identifiers
    attribute partition). The Parse Table Builder will pick these
    identifiers up and put them into the tables, used by the parser.
    The parser will then parse the commands based upon the datatype
    of the identifiers specified in the MSL IDENTIFIER field.
    
23.4A part of the mgmt spec file.CLUSTA::TAMERMon Oct 23 1989 16:19128
         (* Below is the entry in the dispatch table file(.mar).  
            and the management specification for the global entity
            Subsystem.

            I get the following error message from MCC:
            
                 MCC> Show Subsystem * all char
              %MCC-E_INVALIDIDENT, Invalid entity identifier

         *)


                    (*    DISPATCH ENTRY *)

	;+
	; Dispatch entry for SHOW SUBSYSTEM * ALL CHARACTERISTICS
	;-
	mcc$dispatch_entry - 
		SHOW,-
		<MCC$ENTITY <SUBSYSTEM, * >>,-
 		CHAR,-
		MCC___SUBSYSTEM_AM_SHOW


	                    (* Mgmt Spec. *)


GLOBAL ENTITY Subsystem = 50 :
    IDENTIFIER = (Name),
    SYMBOL = CLASS_SUBSYSTEM,
       
	IDENTIFIER ATTRIBUTES
	 
	ATTRIBUTE Name = 1 : FullName
	   ACCESS = NONSETABLE,
	   DISPLAY = TRUE,
	   CATEGORIES = (CONFIGURATION),
	   SYMBOL = SUBSYS_NAME
	END ATTRIBUTE Name;

	END ATTRIBUTES; (* IDENTIFIER *)


	CHARACTERISTIC ATTRIBUTES

	ATTRIBUTE Subsystem Controller Count = 2 : Integer8
	   ACCESS = NONSETABLE,
	   DISPLAY = TRUE,
	   CATEGORIES = (CONFIGURATION),
	   SYMBOL = SUBSYS_CONT_CNT
	END ATTRIBUTE Subsystem Controller Count;
	 
	END ATTRIBUTES; (* CHARACTERISTIC *)

	STATUS ATTRIBUTES
	 
	ATTRIBUTE Installation Time = 3 : BinAbsTim
	   ACCESS = NONSETABLE,
	   DISPLAY = TRUE,
	   CATEGORIES = (CONFIGURATION),
	   SYMBOL = SUBSYS_INS_TIME
	END ATTRIBUTE Installation Time;

	END ATTRIBUTES; (* STATUS *)


       (* Begin DIRECTIVE definitions *)

	DIRECTIVE Show = 1 :
	   DIRECTIVE-TYPE = EXAMINE,
	   CATEGORIES = (CONFIGURATION),

	(* Description: retrieves values for specified attribute(s).
	    Attributes must be from the same attribute group *)

        (* Begin REQUEST definition *)
	 
	REQUEST

	(* REQUEST ARGUMENT definitions *)
   
	ARGUMENT Attributes = 100 : Attrib_List
	   ECHO = TRUE,
	   DISPLAY = TRUE,
	   DEFAULT = "All Identifiers",
	   SYMBOL = ARG_EXAMINE_LIST
	END ARGUMENT Attributes;

	(* End REQUEST ARGUMENT definitions *)
	 
	END REQUEST ;

        (* Begin RESPONSE definition *)
	 
	RESPONSE Success =  10 :
		SYMBOL = SUBSYS_SHOW_SUCCESS,
		TEXT = "SUBSYSTEM Success Response ",

	(* RESPONSE ARGUMENT definitions *)

		ARGUMENT Attributes = 100 : Attrib_List
		END ARGUMENT Attributes;

	(* End RESPONSE ARGUMENT definitions *)

	END RESPONSE Success;

        (* End RESPONSE definition *)
                                         
        (* Begin EXCEPTION definitions *)
	 
	EXCEPTION Wrong State = 4 :
		SYMBOL = SUBSYS_WRNG_STATE,
		TEXT = "SUBSYSTEM in Wrong State for requested function",
	END EXCEPTION Wrong State;

	(* End of SHOW SUBSYSTEM Exceptions *)

	END DIRECTIVE Show;

         .
         .
         .


                      

                
23.5INFO - fullname not supported yetTOOK::CALLANDERMon Oct 23 1989 18:3912
    
    Thanks for the additional information. Your right, what you have looks
    good. The problem is most likely due to the fact that the baselevel you
    are using does not support the fullname data type. "fullname" is one of
    what has been classified as the "phase V" data types. These are not
    supported in the baselevel you currently have. 
    
    I will also pass along the sections of you vector file and the ms to
    use in testing fullname support.
    
    thanks
    
23.6It now works, but not all the way.CLUSTA::TAMERThu Oct 26 1989 16:03142
.5
Thanks Jill for your reply. I changed FullName to Phase4Name and now it parses
correctly and dispatches. However, I get the following nasty error message

		%SYSTEM-I-BADATTRIB, bad attribute control list         

immediately after a print statement I have in the SHOW routine(this routine is
a skeleton that only prints a message and returns).  Then, The MCC TRM PM exits
back to DCL as shown below.


$ MCC                                                     ! DCL LEVEL
DECmcc TRM PM (T1.0.0)

Parse tables built with: MCCPTB Version T1.0.0


MCC> SHOW Subsystem sub Name                              ! Command I entered
In MCC$SUBSYSTEM_AM_PROBE before return                   ! Print statement in
                                                          ! PROBE routine.

In MCC$SUBSYSTEM_AM_LOG before return                     ! Print statement in
                                                          ! LOG routine.

SUBSYSTEM_AM_ENTRY_POINT_SHOW_NOT_YET_IMPLEMENTED         ! Correct dispatching.
                                                          ! Print statement from
                                                          ! SHOW routine.
%SYSTEM-I-BADATTRIB, bad attribute control list           ! ERROR MESSAGE ?
$ MCC                                                     ! IT EXITS BACK TO DCL

DECmcc TRM PM (T1.0.0)                                    ! REPEAT OF THE ABOVE

Parse tables built with: MCCPTB Version T1.0.0

MCC> Show Subsystem sub ALL STATUS
In MCC$SUBSYSTEM_AM_PROBE before return

In MCC$SUBSYSTEM_AM_LOG before return

SUBSYSTEM_AM_ENTRY_POINT_SHOW_NOT_YET_IMPLEMENTED
%SYSTEM-I-BADATTRIB, bad attribute control list 


                            PART OF THE MS FILE FOR "SHOW SUBSYSTEM"

     
GLOBAL ENTITY Subsystem = 50 :
    IDENTIFIER = (Name),
    SYMBOL = CLASS_SUBSYSTEM,
       
	IDENTIFIER ATTRIBUTES
	 
	ATTRIBUTE Name = 1 : Phase4Name
	   ACCESS = NONSETABLE,
	   DISPLAY = TRUE,
	   CATEGORIES = (CONFIGURATION),
	   SYMBOL = SUBSYS_NAME
	END ATTRIBUTE Name;

	END ATTRIBUTES; (* IDENTIFIER *)


	CHARACTERISTIC ATTRIBUTES

	ATTRIBUTE Controller Count = 2 : Integer8
	   ACCESS = NONSETABLE,
	   DISPLAY = TRUE,
	   CATEGORIES = (CONFIGURATION),
	   SYMBOL = SUBSYS_CONT_CNT
	END ATTRIBUTE Controller Count;
	 
	END ATTRIBUTES; (* CHARACTERISTIC *)

	STATUS ATTRIBUTES
	 
	END ATTRIBUTES; (* STATUS *)


       (* Begin DIRECTIVE definitions *)

	DIRECTIVE Show = 1 :
	   DIRECTIVE-TYPE = EXAMINE,
	   CATEGORIES = (CONFIGURATION),

	(* Description: retrieves values for specified attribute(s).
	    Attributes must be from the same attribute group *)

        (* Begin REQUEST definition *)
	 
	REQUEST

	(* REQUEST ARGUMENT definitions *)
   
	ARGUMENT subsys_attr = 95 : Attrib_List
	   ECHO = TRUE,
	   DISPLAY = TRUE,
	   DEFAULT = "All Identifiers",
	   SYMBOL = SUBSYS_ARG_LIST
	END ARGUMENT subsys_attr ;

	(* End REQUEST ARGUMENT definitions *)
	 
	END REQUEST ;

        (* Begin RESPONSE definition *)
	 
	RESPONSE Success =  10 :
		SYMBOL = SUBSYS_SHOW_SUCCESS,
		TEXT = "SUBSYSTEM Success Response ",

	(* RESPONSE ARGUMENT definitions *)

		ARGUMENT subsys_attr  = 95 : Attrib_List
		END ARGUMENT subsys_attr ;

	(* End RESPONSE ARGUMENT definitions *)

	END RESPONSE Success;

        (* End RESPONSE definition *)
                                         
        (* Begin EXCEPTION definitions *)
	 
	EXCEPTION Wrong State = 4 :
		SYMBOL = SUBSYS_WRNG_STATE,
		TEXT = "SUBSYSTEM in Wrong State for requested function",
	END EXCEPTION Wrong State;

        .
        .
        .
        
	END DIRECTIVE Show;

    END ENTITY Subsystem;

    .
    .
    .

END SPECIFICATION; (* SUBSYSTEM_AM_SERVICE_INTERFACE *)

23.7INFO - that's a system messageGOSTE::CALLANDERThu Oct 26 1989 18:3025
    
    Okay, first thing to note is that the message in question is a system
    message, and not an MCC message. Are you using an OTS routine or
    some other system service that might have caused this?
    
    The manual says that an invalid code or size was specified in the
    read or write attribute list for a file system ACP QIO function.
    
    Well I am not a system person so I can't tell you what this means.

    But if it isn't a system service problem it could be you trying to do a
    put message. If so watch out, the message codes passed around in the
    MCC system use the MCC message file. You shuld pass all messages back
    to the PM and not try to display them.
    
    I don't know if any of this is helping, but one  more thing that
    might help you in debugging: set the MCC$TRM_PM logical to a value
    of 8. This will give you all kinds of information on the call
    parameters that might be useful. Also, you might want to get into
    your AM using the debugger. To do this (use the debugger), look
    at the release notes. In there you will find a description of the
    logical that has to be set and how to signal the break to the
    debugger.
    
jill
23.8File access problem.CLUSTA::TAMERMon Oct 30 1989 14:127
    .7
    You are right. That was a problem with file access in my C
    code. It had nothing to do with MCC.
    While the Show directive now works, the set directive does not. Please
    refer to note 26.0 for a couple of my questions. 
    
    Thanks.