4.2.4. 内置类型

YANG有一套内置的类型,类似于许多编程语言,但由于网络管理的特殊要求,有一些不同之处。 下表总结了第9节讨论的内置类型:

名称 描述
binary 任何二进制数据
bits 一组比特(bits)或标志(flags)
boolean "true" 或 "false"
decimal64 64位有符号十进制数字
empty 一个叶子,没有任何值
enumeration 枚举的一组字符串之一
identityref 对抽象身份的引用
int8 8位有符号整数
int16 16位有符号整数
int32 32位有符号整数
int64 64位有符号整数
leafref 对叶子实例的引用
string 一个字符串
uint8 8位无符号整数
uint16 16位无符号整数
uint32 32位无符号整数
uint64 64位无符号整数
union 成员类型的选择

下面是原始内置类型总结表

+---------------------+-------------------------------------+
| Name                | Description                         |
+---------------------+-------------------------------------+
| binary              | Any binary data                     |
| bits                | A set of bits or flags              |
| boolean             | "true" or "false"                   |
| decimal64           | 64-bit signed decimal number        |
| empty               | A leaf that does not have any value |
| enumeration         | One of an enumerated set of strings |
| identityref         | A reference to an abstract identity |
| instance-identifier | A reference to a data tree node     |
| int8                | 8-bit signed integer                |
| int16               | 16-bit signed integer               |
| int32               | 32-bit signed integer               |
| int64               | 64-bit signed integer               |
| leafref             | A reference to a leaf instance      |
| string              | A character string                  |
| uint8               | 8-bit unsigned integer              |
| uint16              | 16-bit unsigned integer             |
| uint32              | 32-bit unsigned integer             |
| uint64              | 64-bit unsigned integer             |
| union               | Choice of member types              |
+---------------------+-------------------------------------+

type”声明在第7.4节中介绍。

results matching ""

    No results matching ""