blob: 599649f5f101eca7ccc0874abd51a9041ecb4d53 [file] [log] [blame]
module simple-data-types {
namespace "simple:data:types";
prefix "smpdtp";
revision 2013-11-12 {
}
identity iden {
}
typedef tpdfempty {
type empty;
}
typedef tpdfbit {
type bits {
bit b1;
bit b2;
bit b3;
}
}
typedef tpdfun4 {
type boolean;
}
typedef tpdfun3 {
type union {
type tpdfbit;
type tpdfempty;
}
}
typedef tpdfun2 {
type union {
type tpdfun3;
type tpdfun4;
}
}
typedef tpdfun1 {
type union {
type uint8;
type decimal64 {
fraction-digits 2;
}
}
}
typedef tpdfun0 {
type enumeration {
enum "successful exit" {
value 1;
}
enum "grace period expired" {
value 2;
}
}
}
container cont {
leaf lfnint8Min {
type int8;
}
leaf lfnint8Max {
type int8;
}
leaf lfnint16Min {
type int16;
}
leaf lfnint16Max {
type int16;
}
leaf lfnint32Min {
type int32;
}
leaf lfnint32Max {
type int32;
}
leaf lfnint64Min {
type int64;
}
leaf lfnint64Max {
type int64;
}
leaf lfnuint8Max {
type uint8;
}
leaf lfnuint16Max {
type uint16;
}
leaf lfnuint32Max {
type uint32;
}
leaf lfuint64Max {
type uint64;
}
leaf lfstr {
type string;
}
leaf lfstr1 {
type string;
}
leaf lfbool1 {
type boolean;
}
leaf lfbool2 {
type boolean;
}
leaf lfbool3 {
type boolean;
}
leaf lfdecimal1 {
type decimal64 {
fraction-digits 1;
}
}
leaf lfdecimal2 {
type decimal64 {
fraction-digits 2;
}
}
leaf lfdecimal3 {
type decimal64 {
fraction-digits 3;
}
}
leaf lfdecimal4 {
type decimal64 {
fraction-digits 4;
}
}
leaf lfdecimal6 {
type decimal64 {
fraction-digits 6;
}
}
leaf lfenum {
type enumeration {
enum enum1;
enum enum2;
enum enum3;
enum enum4;
}
}
leaf lfbits {
type bits {
bit bit1;
bit bit2;
bit bit3;
bit bit4;
}
}
leaf lfbinary {
type binary;
}
leaf lfref1 { //reference to string type
type leafref {
path "../lfstr";
}
}
leaf lfref2 { //reference to number type
type leafref {
path "../lfnint8Max";
}
}
leaf lfempty {
type empty;
}
leaf lfunion1 {
type union {
type uint16;
type string;
}
}
leaf lfunion2 {
type union {
type decimal64 {
fraction-digits 2;
}
type string;
}
}
leaf lfunion4 {
type union {
type boolean;
type string;
}
}
leaf lfunion5 {
type union {
type uint16;
type string;
}
}
leaf lfunion7 {
type tpdfun3;
}
leaf lfunion8 {
type union {
type uint16;
type string;
}
}
leaf lfunion9 {
type union {
type uint16;
type boolean;
}
}
leaf lfunion10 {
type union {
type bits {
bit bt1;
bit bt2;
}
type boolean;
}
}
leaf lfunion11 {
type union {
type tpdfun1;
type tpdfun2;
}
}
leaf lfunion12 {
type tpdfun2;
}
leaf lfunion13 {
type tpdfbit;
}
leaf lfunion14 {
type union {
type enumeration {
enum zero;
enum one;
}
type uint16;
}
}
leaf identityref1 {
type identityref {
base iden;
}
}
leaf lfenum1 {
type tpdfun0;
}
leaf inst-iden {
type instance-identifier;
}
}
}