Skip to content

Configuration

Petr Štechmüller edited this page Dec 4, 2020 · 2 revisions

Environment variables

  • HTTP_PORT [numer] = port number where server will listen
  • APP_DATA_ROOT [string] = base absolute path to root working directory
  • TOTAL_OUTPUT_COUNT [number] = count of connected stimuly outputs
  • VIRTUAL_SERIAL_SERVICE [boolean] = enable only for testing purposes when physical stimulator is not available

Defaults

  • HTTP_PORT = 3005
  • APP_DATA_ROOT = same as main.js file
  • TOTAL_OUTPUT_COUNT = 8
  • VIRTUAL_SERIAL_SERVICE = false

Settings

export interface Settings {
  autoconnectToStimulator?: boolean;
  comPortName?: string;
  serial?: Record<string, unknown>;
  stimulatorResponseTimeout?: number;
  assetPlayerResponseTimeout?: number;
  assetPlayer?: {
    width: number;
    height: number;
    fullScreen: boolean;
  };
}
  • autoconnectToStimulator [boolean] = if true, server will try to connect to stimulator after startup. When connection is not established, this property is set to false
  • comPortName [string] = name/path of serial COM port for communication with stimulator
  • serial = parameters of serial port
    • baudRate
    • dataBits
    • stopBits
    • parity
  • stimulatorResponseTimeout [number] = response timeout from stimulator in miliseconds
  • assetPlayerResponseTimeout [number] = response timeout from asset player in miliseconds
  • assetPlayer = parameters of asset player
  • width [number] = width of asset player window
  • height [number] = height of asset player window
  • fullScreen [boolean] = if true, asset player will run in fullscreen, otherwise in defined size

Defaults

DEFAULT_SETTINGS = {
    autoconnectToStimulator: false,
    serial: {
      baudRate: 9600,
      dataBits: 8,
      parity: 'none',
      stopBits: 1,
    },
    stimulatorResponseTimeout: 4000,
    assetPlayer: {
      width: 640,
      height: 480,
      fullScreen: false,
    },
    assetPlayerResponseTimeout: 4000,
  }
Home * [x] [Configuration](https://github.com/neuro-stimulator/neuro-server/wiki/Configuration)
Experiments
Sequences
Experiment results
Stimulator
Experiment player
Clone this wiki locally