serial.Serial:
    enable: IOHUB_BOOL
    name:
        IOHUB_STRING:
            min_length: 1
            max_length: 32
            first_char_alpha: True    
    port:
        IOHUB_STRING:
            min_length: 1
            max_length: 32
    baud:
        IOHUB_INT:
            min: 1
            max: 1000000
    bytesize:
        IOHUB_INT:
            min: 5
            max: 8

    parity:
        IOHUB_LIST:
            valid_values: [NONE, EVEN, ODD, MARK, SPACE]
            min_length: 1
            max_length: 1

    stopbits:
        IOHUB_LIST:
            valid_values: [ONE, ONE_AND_HALF, TWO]
            min_length: 1
            max_length: 1

    event_parser:
        fixed_length:
            IOHUB_INT:
                min: 0
                max: 256
        prefix:
            IOHUB_STRING:
                min_length: 0
                max_length: 32
                first_char_alpha: False
        delimiter:
            IOHUB_STRING:
                min_length: 0
                max_length: 32
                first_char_alpha: False
        byte_diff: IOHUB_BOOL
        parser_function:
            IOHUB_STRING:
                min_length: 0
                max_length: 64
                first_char_alpha: True
        parser_kwargs:
            IOHUB_LIST:
                valid_values:
                min_length: 0
                max_length: 1024

    device_timer:
        interval:
            IOHUB_FLOAT:
                min: 0.001
                max: 0.500
    save_events: IOHUB_BOOL
    stream_events: IOHUB_BOOL
    auto_report_events: IOHUB_BOOL
    monitor_event_types:
        IOHUB_LIST:
            valid_values: [SerialInputEvent, SerialByteChangeEvent]
            min_length: 0
            max_length: 2
    event_buffer_length:
        IOHUB_INT:
            min: 1
            max: 2048    
    device_number: 0
    model_name:
        IOHUB_STRING:
            min_length: 0
            max_length: 32
    manufacturer_name:
        IOHUB_STRING:
            min_length: 0
            max_length: 32
    serial_number:
        IOHUB_STRING:
            min_length: 1
            max_length: 32
    model_number:
        IOHUB_STRING:
            min_length: 1
            max_length: 16
    manufacture_date: IOHUB_DATE
    software_version:
        IOHUB_STRING:
            min_length: 1
            max_length: 8    
    hardware_version: 
        IOHUB_STRING:
            min_length: 1
            max_length: 8
    firmware_version: 
        IOHUB_STRING:
            min_length: 1
            max_length: 8
