# This file includes all valid mcu.iosync.ioSync Device
# settings that can be specified in an iohub_config.yaml
# or in a Python dictionary form and passed to the quickStartHubServer
# method. Any device parameters not specified when the device class is
# created by the ioHub Process will be assigned the default value
# indicated here.
#
serial.Pstbox:
    
    # name: The unique name to assign to the device instance created.
    #   The device is accessed from within the PsychoPy script 
    #   using the name's value; therefore it must be a valid Python
    #   variable name as well.
    #
    name: pstbox

    # monitor_event_types: Specify which of the device's supported event
    #   types you would like the ioHub to monitor for.
    #
    monitor_event_types: [PstboxButtonEvent,]
    # serial_port: On Windows, serial ports will be in the form
    #    'COMx', where x is the serial port number, usually ranging between 1 
    #    and 32. For example, COM6 would indicate that serial port 6 should be
    #    used.
    #    For Linux and OS X, serial ports are usually specified as ... TBC
    #    To autodetect an ioSync, set to 'auto'.
    port: auto

    baud: 19200

    bytesize: 8

    parity: NONE

    stopbits: ONE

    event_parser:
        fixed_length: 255
        prefix:
        delimiter:
        byte_diff: True

    # device_timer: Devices that require polling to read any new native events
    #   that have become available must specify a device_timer property, with an
    #   interval sub property that specifies how frequently the device would be polled
    #   by the ioHub Server. The time is specified in sec.msec format and is a 'requested'
    #   polling interval. The actual polling interval will vary from this somewhat, the 
    #   magnitude of which depends on the computer hardware and OS being used and the
    #   number of other polled devices being monitored. The 'configdence_interval'
    #   attribute of events that have a parent device that is polled often can be used to
    #   determine the actual polling rate being achieved by the ioHub Process.
    device_timer:
        interval: 0.001

    # enable: Specifies if the device should be enabled by ioHub and monitored
    #   for events.
    #   True = Enable the device on the ioHub Server Process
    #   False = Disable the device on the ioHub Server Process. No events for
    #   this device will be reported by the ioHub Server.
    #    
    enable: True

    # save_events: *If* the ioHubDataStore is enabled for the experiment, then
    #   indicate if events for this device should be saved to the
    #   data_collection/keyboard event group in the hdf5 event file.
    #   True = Save events for this device to the ioDataStore.
    #   False = Do not save events for this device in the ioDataStore.
    #    
    save_events: True

    # stream_events: Indicate if events from this device should be made available
    #   during experiment runtime to the PsychoPy Process.
    #   True = Send events for this device to  the PsychoPy Process in real-time.
    #   False = Do *not* send events for this device to the PsychoPy Process in real-time.
    #    
    stream_events: True

    # auto_report_events: Indicate if events from this device should start being
    #   processed by the ioHub as soon as the device is loaded at the start of an experiment,
    #   or if events should only start to be monitored on the device when a call to the
    #   device's enableEventReporting method is made with a parameter value of True.
    #   True = Automatically start reporting events for this device when the experiment starts.
    #   False = Do not start reporting events for this device until enableEventReporting(True)
    #   is set for the device during experiment runtime.
    #
    auto_report_events: True

    # event_buffer_length: Specify the maximum number of events (for each
    #   event type the device produces) that can be stored by the ioHub Server
    #   before each new event results in the oldest event of the same type being
    #   discarded from the ioHub device event buffer.
    #
    event_buffer_length: 1024

    # The MCU device manufacturer's name.
    # N/A
    #
    manufacturer_name: Psychology Software Tools

    # model_name: The serial port card model name.
    #   Currently, this field is not used.
    #
    model_name: Serial Response Box

    # The device number to assign to the Analog Input device. 
    #   device_number is not used by this device type.
    #
    device_number: 0
