[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

342.0. "Adding a Directive" by COOKIE::KITTELL (Richard - Architected Info Mgmt) Fri Sep 21 1990 12:48

(Aren't I a great straight-man? I don't seem to be able to get the simplest
 things working without your help. :-) )

I'm ready to implement a new verb, Archive. The product will have a
registered code for it, for my proto I sniffed around the dictionary and
the dispatch table and found that 54 was a directive code apparently
un-used but still under MCC_K_VERB_MAX.

So that's what I put in the MSL. Added the appropriate entries to my
vector.mar and a module for the directive entry point. Built it all
up and tried it, got 

%MCC-E-NOTFOUND,  unsupported combination of verb, entity, partition

I got in there with TBD and the access dispatch table has the entries
and I can dispatch through them from TBD. 

Using MCC/DEBUG and setting breakpoints on mcc_call_access and 
mcc_call_function, I find that FCL is calling mcc_call_function with the
right arguments, and stopping right there when the dispatch entries aren't
found.

Apparently, every verb must be in both function and access dispatch tables.

How do I get the entries I need into the function table? Or perhaps a more
practical question considering I need this to run soon, are there other
codes I can use that will just "pass through" the function table?
T.RTitleUserPersonal
Name
DateLines
342.154 is CancelCOOKIE::KITTELLRichard - Architected Info MgmtFri Sep 21 1990 14:0914
I shouldn't have called 54 "un-used". It is of course, MCC_K_VERB_CANCEL. What
I meant that it wasn't used by any of the entities defined in my dictionary
and participating in my proto. I've stripped all the network management
stuff out of my proto dictionary.

I tried assigning 107 to Archive. That is 1 more than MCC_K_VERB_MAX.

TBD shows that there is a function dispatch entry for all entities <...>
on that direective code. When FCL calls through the function table it
gets back "Bad Qualifier". Needless to say, there weren't any qualifiers
specified on the command.

Hmmm.
342.2Worked around itCOOKIE::KITTELLRichard - Architected Info MgmtFri Sep 21 1990 16:5310
I wrote an FM that specifies function dispatch entries for the Archive
verb. They all dispatch to the same entry point, which does nothing
but call mcc_call_access with the same params it got, and passes the cvr
back.

I defined the verb to be code 110 to make sure it doesn't collide with
anything.

Works like a charm.
342.3INFO - control doesn't support thoseGOSTE::CALLANDERMon Sep 24 1990 09:1312
    
    The problem you are encountering is that to get to an access module,
    a PM must first go through a functional module (control). The thing
    about control is that it is limited in what it is willing to pass
    through to an AM. Use TBD and do a dump/function to see what dispatch
    entries make it through (do this with only control enrolled).
    
    You will find that these "new" verbs are not part of controls
    capabilities. You have two courses of action here. 1) request that
    control be extended to meet your needs 2) put in your own FM for
    passing through these additional verbs.
    
342.4Yes, the problem is the Control-FM, however,...TOOK::GUERTINWherever you go, there you are.Mon Sep 24 1990 10:0618
    Jill is correct, in that the PMs only do mcc_call_function()s, and the
    mcc_control_fm usually sits at the bottom of the function dispatch
    table, and if no other FMs can satisfy the request AND THE V,E,A,
    COMBINATION IS KNOWN TO THE CONTROL_FM, IT DOES A MCC_CALL_ACCESS WITH
    THE SAME COMBINATION.  Therefore, if you are writing an access module,
    and you have a new verb, or partition (control places <*...> for the
    entity), you will not be called by the PMs, because the Control_FM,
    does not know about you.
    
    However, I was under the impression that there were four verbs which
    new AM developers could use until their new verbs were registered.
    These four verbs were, in essence, reserved for new development, and
    no "production" software was allowed to use them.  They were something
    like MCC_K_VERB_EXTENDn, where n was a number 1-4.  The Partition,
    however, had to be NULL (10), so it only works for new verbs.  I can
    check if this still works.
    
    -Matt.
342.5Extend Verbs are ThereCOOKIE::KITTELLRichard - Architected Info MgmtMon Sep 24 1990 11:598
Sure thing, Matt, MCC_K_VERB_EXTEND1 through 4 are there. They are codes
39-42. The MM Programming manual should probably mention those.

But it turns out the pass-though FM I cobbled up was a reasonable thing
to do, I'll just stay with it for development. Once the model stabilizes
and we get our MS reviewed and registered, we'll see if the codes we're
assigned are handled by Control_FM and request extension if not.
342.6verb classing?REDBCK::mikeMike Dransfield, Sydney RSSGMon Sep 24 1990 21:3522
I also ran into the problem of not being able to add a verb in an MCC class
I took last week.

We kind of figured something as described must be making our lives so hard.

I have an additional question though.

How is the verb classing done and where is it desribed?
The only reference I could find was in the SRM which described the
three classes (examine, modify and action) and mentioned that some verbs
were architected to be in some classes.

Where do I find the class information for all the other verbs?

I am assuming that in my .ms file my verb definition has to match the class
described in the control FM so that I can get dispatched to properly.

I actually tried to use the PURGE verb on the UAF example AM and got nowhere
with it as either a examine or action verb in my .ms file.

Thanks,
Mike
342.7INFO - directive types and dispatchingGOSTE::CALLANDERWed Sep 26 1990 11:0440
    
    A few things to remember when attempting to get your commands
    dispatched too are:
    
    The MS definition must match the dispatch entry.
    
    The dispatch entries use of the partition field must coincide with
    the MS definition of the directive-type.
    
    There are now four directive types (a new ECI just got passed defining
    a fourth).
    		EXAMINE - These are commands that display attribute
    			  data, they will always be passed with the
    			  partition field set to an attribute partition
    
    		MODIFY  - These directives are used to modify attribute
                          values, they will always be passed with the
     			  partitino field set to an attribute partition
    
    		EVENT   - These work on events, and are used to request
    			  event data, they wil always be passed with
    			  the partition feild set to an event partition
    
    		ACTION  - These commands perform a function and will
    			  pass the null partition (code 10) in the
    			  partition field

    Chapter 15 of the SRM defines the common directives such as SET
    and SHOW. For information on the verb types your best bets are the
    SRM, chapter 7, where the explainations for enrollment/MS are and
    the Guide to writing an MM which explains about entity modeling.
    
    To look at the tables themselves, and to see what you have put in,
    use the TEST_DRIVER to dump the tables and examine them.
    
    $ MANAGE/TOOL/TEST_DRIVER
    mcc_tbd> DUMP/ACCESS
    		:
    mcc_tbd> DUMP/FUNCTION