| $ manage/tools/dictionary
%DAP-S-USE_DICT_RDONLY, Using dictionary file: sys$common:[mcc]mcc_fdictionary.d
at;1, with read-only access
POLYCENTER Dictionary Administrator Program Version V1.3.0
DAP>show class node4
-> Class (1) : NODE4
Definition (3) : PRESENTATION_NAME
Definition (3) : INSTANCE_REQUIRED
Definition (3) : DYNAMIC
Definition (3) : INSTANCE_DATATYPE
Subclass (2) : LINE 3
Subclass (2) : REMOTENODE 10
Subclass (2) : CIRCUIT 11
Subclass (2) : LINK 17
Subclass (2) : OBJECT 18
Subclass (2) : AREA 26
:
:
:
Your information is here....V
V
Subclass (2) : CIRCUIT 11
Don't forget that 11 is only unique ins the subclass level of NODE4
Don't forget that Your customer should use symbolic constants, which can be
found in .H files of the developer's toolkit. Not doing so will cause serious
risks when the dictionary will get updated.
The main use is and should stay the interpretation or ILV or AES dumps.
Dirk
|
| Hi, the following code attempts to make use of the mcc_dict_translate_name_code
routine to read from the dictionary an object's class code by giving the name
as a LATIN1STRING.
/*
* Now lets find out which class we are dealing with
*/
object_len = strlen (input->object);
if (status == MCC_S_NORMAL)
status = mcc_desframe_create_descriptor(
&memory, /* Memory Allocation List */
&object_code, /* Descriptor Pointer */
&object_len, /* Length */
&MCC_K_DT_LATIN1STRING, /* Datatype */
&input->object, /* object class name string*/
&MCC_K_DICT_CLASS, /* Id */
&DSC_K_DTYPE_T); /* VMS datatype */
if (status == MCC_S_NORMAL)
status = mcc_desframe_create_descriptor(
&memory, /* Memory Allocation List */
&class_code, /* Descriptor Pointer */
&32, /* Length */
0,
0,
0,
0);
/*
* create an AES structure containing the object name
* use this structure to read the object code from the dictionary
*/
if (status == MCC_S_NORMAL)
status = mcc_aes_create(&aes_struct,
&MCC_K_DICT_CLASS,
object_code,
&MCC_K_AES_NOT_WILD);
/* Start of debugging code */
if (status == MCC_S_NORMAL)
status = mcc_aes_depth(&aes_struct,&depth);
if (status == MCC_S_NORMAL)
status = mcc_aes_get(&aes_struct,
&0,
&code,
class_code,
&wild);
/* End of debugging code */
/* Can I use an AES structure directly or must it be converted ? Try both ...*/
if (status == MCC_S_NORMAL)
status = mcc_dict_build_spec(&aes_struct,
&aes_dict_struct);
/* results in error message ... MCC_S_INV_ENTITY */
if (status == MCC_S_NORMAL)
status = mcc_dict_translate_name_code(&aes_struct,&class_code);
/*
* if we omit the mcc_dict_build_spec call this results in the same error
* message ... MCC_S_INV_ENTITY
*/
/* Can not use this one as the mcc_dict_build code fails ... */
if (status == MCC_S_NORMAL)
status = mcc_dict_translate_name_code(&aes_dict_struct,&class_code);
|
| you have the right idea, bu tplease note that the tranlation of name
to code is based on the presentation name:
DAP> sho class node4 definition presentation_name
Definition Name = PRESENTATION_NAME
Type = T Length = 5 Count = 1 Defined = TRUE Class = S
value[1] = "Node4"
DAP> exit
So if you are setting the instance to "NODE4" it will not find a match.
I haven't coded this stuff in a while but try using "Node4" and see
if that corrects your problem.
But as Dave mentioned, you really should just be using the codes
directly (Ex: 12 for Node4). The easiest way to create a dictionary
specification is to create a regular AES specification with class code
12 (node4) and instance wild. Then use the create dict spec procedure
to translate a regular (class instance) aes into a dictionary spec
(mcc_k_dict instance).
|