[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

223.0. "MIR question" by CLUSTA::YANG () Wed Aug 01 1990 15:50

    I am using MCC MIR routines to manipulate our system management
    entities. I have a question about MCC_MIR_WRITE_ATTR_DATA routine.
    If I have an entity class "SERVER" and instance "X" created, and two
    attributes A1 and A2 associated with "SERVER X", so I create an instance
    repository to store instance X and an attribute repository to store A1
    and A2.
    Now, I want to set the attribute A1 to a different value, the question
    is, in my API, 1) Do I just simply pass the new value (using
    ILV-encoded format) of A1 to MCC by issuing the MCC_MIR_WRITE_ATTR_DATA 
    call so that MCC is intelligent to know which attribute I am dealing with 
    (by decoding the ILV list) and updates that attribute? or
    2) Do I need to issue MCC_MIR_READ_ATTR_DATA call first to read the entire 
    attribute list and update A1 with new value and then call 
    MCC_MIR_WRITE_ATTR_DATA? 
    The MCC MIR document talks about something related to this question but
    not so clearly. I guess 2) is the answer, but I am not sure.
    
    
    
T.RTitleUserPersonal
Name
DateLines
223.1bag 'o bits COOKIE::KITTELLRichard - Architected Info MgmtWed Aug 01 1990 16:148
I'm as new to this as you are, but my experience says what is in the 
attr buffer when you write is what you get back when you read it.
The mir sees your data as a stream of bytes with a specified length, and
makes no attempt to insert one ILV-encoded attr value into an existing
stream, and any other operation that would assume knowing the structure
of your data.

223.2MIR routines don't look inside the bufferTOOK::GUERTINWherever you go, there you are.Wed Aug 01 1990 22:0025
    RE:.1  Yes, the MIR routines really only looks at the length and
    starting address of the buffer (i.e., it's just a stream of bytes).
    
    RE:.0  If you have two attributes in the your private attribute
    repository, and you wish to modify one, without changing the other,
    you must 1) read the record, 2) modify the record (using ILV gets and
    puts, in your case) 3) write it back out.  If you need transaction
    processing, then that would involve more work.
    
    I had a routine which would search through an ILV encoding and just
    modify the value for a given ID code (by copying it to another ILV
    buffer).  I should try and find it, someone may find it useful.
    
    BTW, The SRM (Section 10.12.3) states:
    "... If the attribute partition is used often for passing through the call
    interface, then it may be useful to ILV-encode the data.  However, the
    MIR routines do not make any assumptions about the storage of the
    attributes.  If the data is not ILV-encoded, the owner of the data must
    know the record layout.  If it is ILV-encoded, the owner of the data
    should call the ILV routines to build and parse the attribute partition
    record."
    
    Hope this clarifies things a little.
    
    -Matt.