schema;IntField_schema:
  type:    map
  mapping:
    "name":
       type:       str
       required:   yes
       unique:     True
    "offset": # In units of bytes
       type:       int
       required:   yes
       unique:     True 
    "description":
        type:      str
        required:  no
    "sizeBits": # In units of bits
       type:       int
       required:   no
    "lsBit": # In units of bytes
        type:      int
        required:  no
        range:     { max: 7, min: 0 }
    "mode":
        type:      str
        required:  no
        enum:      [RO, WO, RW]
    "wordSwap":
        type:      str
        required:  no
    "nelms":
        type:      int
        required:  no
    "stride":
        type:      int
        required:  no
    "ByteOrder":
        type:      str
        required:  no
        enum:      [UNKNOWN, LE, BE]
    "cacheable":
        type:      str
        required:  no
        enum:      [UNKNOWN_CACHEABLE, NOT_CACHEABLE, WT_CACHEABLE, WB_CACHEABLE]
    "dtype":
        type:      str
        required:  no
    "hidden":
        type:      bool
        required:  no    # false (not hidden) if not specified
    "defaultValue":
        type:      str
        required:  no    # 0 if not specified
    "enums":
        type:      seq
        required:  no
        sequence:
            - type: map
              mapping:
                  "name":
                      type:     str
                      required: yes
                  "value":
                      type:     int
                      required: yes

schema;command_schema:
  type:    map
  mapping:
    "name":
       type:       str
       required:   yes
       unique:     True
    "description":
        type:      str
        required:  no
    "nelms":
        type:      int
        required:  no
    "sequence":
        type:      map
        required:  yes
        mapping:
                  "entry":
                      type:     str
                      required: yes
                  "value":
                      type:     int
                      required: yes

schema;MMIODev_schema:
  type:    map
  mapping:
      "name":
          type:     str
          required: yes
      "description":
          type:     str
          required: no
      "offset":
          type:     int
          required: no
      "nelms":
          type:      int
          required:  no
      "stride":
          type:      int
          required:  no
      "size":
          type:     int
          required: no
      "IntField":
          type:      seq
          required:  no
          sequence:
              - include: IntField_schema
      "metadata":
          type:     map
          required: no
          mapping:
      "Commands":
          type:      seq
          required:  no
          sequence:
              - include: command_schema
      "MMIODev":
          type:      seq
          sequence:
              - include: MMIODev_schema

schema;PortBuilderSchema_schema:
  type: map
  mapping:
      "SRP":
          type:     map
          required: no
          mapping:
             "ProtocolVersion":
                 type:     str
                 required: no
                 enum:     [SRP_UDP_NONE, SRP_UDP_V1, SRP_UDP_V2, SRP_UDP_V3]
             "TimeoutUS":
                 type:     int
                 required: no
             "DynTimeout":
                 type:     bool
                 required: no
             "RetryCount":
                 type:     int
                 required: no
      "udp":
          type:     map
          required: yes
          mapping:
            "port":
                type:     int
                required: yes
            "outQueueDepth":
                type:     int
                required: no
            "numRxThreads":
                type:     int
                required: no
            "pollSecs":
                type:     int
                required: no
      "RSSI":
          type:     bool 
          required: no 
      "depack":
          type:     map
          required: no
          mapping:
            "useDepack":
                type:     str
                required: no
            "outQueueDepth":
                type:     int
                required: no
            "ldFrameWinSize":
                type:     int
                required: no
            "ldFragWinSize":
                type:     int
                required: no
      "SRPMux":
          type:     map
          required: no 
          mapping:
            "VirtualChannel":
                type:     int
                required: yes
      "TDestMux":
          type:     map
          required: yes
          mapping:
            "TDEST":
                type:     int
                required: no
            "StripHeader":
                type:     bool
                required: no
            "outQueueDepth":
                type:     int
                required: no
        


schema;NetIODev_schema:
  type:    map
  mapping:
      "name":
          type:     str
          required: yes
      "ipAddr":
          type:     str
          required: yes
      "MMIODev":
         required: no
         type:     seq
         sequence:
           - include: MMIODev_schema
             include: PortBuilder_schema
      "StreamDev":
         required: no
         type:     seq
         sequence:
           - include: PortBuilder_schema

schema;top_s:
  type:  map
  mapping:
    "NetIODev":
       required: no
       include: NetIODev_schema
    "mmio":
       required: no
       include: MMIODev_schema
    "MMIODev":
       required: no
       include: MMIODev_schema
    "Device":
       required: no
       include: MMIODev_schema
    "include":
       required: no
       type: str      
    "IntField":
       required: no
       include: IntField_schema

include: top_s
