[Next] [Previous] [Up] [Top]

4.2.6 CRITIQUE MESSAGE GENERATION

4.2.6.3 Customized Critiques

Since each checked feature would have unique parameters, it would be helpful to include the offending values of the individual feature within the critiques message. In addition to the checklist, each feature inherits NOTICE class properties. The properties of this class are as in Table 12. The RHS of each Diagnosis rule achieves customization by writing messages to these message slots and then calling a specialized function called "Attach_Diagnosis" to work with the messages within these slots.

Table 12 NOTICE Class Properties for Writing Messages


x_dfct_code

x_message_1

x_message_2

x_message_3

As seen in the RHS of the example Diagnosis rule, a defect code (reserved for future use) is entered into the feature object's x_dfct_code slot. The message

"Ribs may be too thick. Top width exceeds 3/4 wall thickness."

is written into the object's x_message_1 slot. The message

"Top width is [feature_top_width]. Wall thickness is [feature_wall_thickness]."

is entered into the x_message_2 slot. Nothing, in this case, is entered into the third, x_message_3 slot.

The [] bracketed property names in the text messages are to be substituted by the object's actual property values. At this point, however, all checked features gathered by this rule have the same message, including the brackets, and the property names; their messages do not include their own, individual values.

Not until the Attach_Diagnosis function is called does the substitution of the brackets and the property names with the actual values occur. After the critique messages are written to the slots of each feature, Attach_Diagnosis is called with the list of features. Attach_Diagnosis is a custom written function which does the following for each feature:

1. Creates a diagnostic object under DIAGNOSTIC class with the name "diagnosis_X", where X is a unique number.
2. Attaches the diagnostic object to the feature.
3. Attaches the feature to the CRITIQUE class.
4. Fills the diagnosis object with the feature's defect code and other information.
5. Substitutes the bracketed properties in the feature's messages with the actual values and puts the new messages into the diagnostic object.

[Next] [Previous] [Up] [Top]