TEXTUAL-CONVENTION Makro
SNMP-Textkonventionen entsprechen CIM-definierten Typen.
Anmerkung
Weitere Informationen zum Installieren des Anbieters finden Sie unter Einrichten der WMI SNMP Environment.
Die folgenden Zuordnungsregeln gelten für SNMP-Textkonventionen:
- Die benannte Typdefinition in der SYNTAX-Klausel ordnet den CIM-Eigenschaftsqualifizierer object_syntaxverbatim zu.
- Verwenden Sie die folgende Tabelle, um Textkonventionen zuzuordnen, wenn die SYNTAX-Klausel explizit auf eine Textkonvention eines SNMPv2C-TEXTUAL-CONVENTION Makros verweist oder auf eine implizite Textkonvention verweist. Der Standardwert ist immer NULL-.
Textkonvention | CIM-Variantentyp | CIM-Qualifizierer |
---|---|---|
DateAndTime | VT_BSTR |
textual_convention: DateAndTime Codierung: OCTETSTRING object_syntax: DateAndTime cimtype: string |
Displaystring | VT_BSTR |
textual_convention: Displaystring Codierung: OCTETSTRING object_syntax: Displaystring cimtype: string |
MacAddress | VT_BSTR |
textual_convention: MacAddress Codierung: OCTETSTRING object_syntax: MacAddress cimtype: string |
PhysAddress | VT_BSTR |
textual_convention: PhysAddress Codierung: OCTETSTRING object_syntax: PhysAddress cimtype: string |
SnmpUDPAddress | VT_BSTR |
textual_convention: SnmpUDPAddress Codierung: OCTETSTRING object_syntax: SnmpUDPAddress cimtype: string |
SnmpOSIAddress | VT_BSTR |
textual_convention: SnmpOSIAddress Codierung: OCTETSTRING object_syntax: SnmpOSIAddress cimtype: string |
SnmpIPXAddress | VT_BSTR |
textual_convention: SnmpIPXAddress Codierung: OCTETSTRING object_syntax: SnmpIPXAddress cimtype: string |
- Der CIM-definierte Variantentyp und die CIM-Eigenschaftsqualifizierer textual_convention, Codierung, object_syntaxund Cimtype Zuordnung unter Verwendung des zugrunde liegenden Grundtyps.
- Die DISPLAY-HINT Klausel des SNMPv2C-TEXTUAL-CONVENTION Makros ordnet den CIM-Eigenschaftsqualifizierer display_hintverbatim zu. Dieser Qualifizierer wird nicht generiert, wenn kein TEXTUAL-CONVENTION Makro vorhanden ist oder das Makro keine DISPLAY-HINT Klausel enthält.
Beispielcode
Im folgenden Beispiel wird eine Textkonvention für SNMPv1 beschrieben.
myNamedType ::= DISPLAYSTRING (SIZE (0..127))
myNamedProperty OBJECT-TYPE
SYNTAX myNamedType
ACCESS read-only
STATUS MANDATORY
DESCRIPTION ""
In diesem Beispiel werden die folgenden CIM-Qualifizierer generiert.
object_syntax("myNamedType"),
textual_convention("DISPLAYSTRING"),
encoding("OCTETSTRING"),
variable_length("0..127")
Im folgenden Beispiel wird eine SNMPv2-Textkonvention beschrieben.
myDisplaystring ::= TEXTUAL-CONVENTION
DISPLAY-HINT "255a"
STATUS current
DESCRIPTION ""
SYNTAX OCTET STRING (SIZE (0..127))
myNamedProperty OBJECT-TYPE
SYNTAX myDisplaystring
MAX-ACCESS read-only
STATUS current
DESCRIPTION ""
In diesem Beispiel werden die folgenden CIM-Qualifizierer generiert.
object_syntax("myDisplaystring"),
textual_convention("OCTETSTRING"),
encoding("OCTETSTRING"),
display_hint("255a"),
variable_length("0..127")