Skip to content

Stimulator controller

Petr Štechmüller edited this page Sep 6, 2020 · 1 revision

Access point

The Experiment's base access point has address: '/api/stimulator'

updateFirmware

  • Description: updates stimulator firmware
  • Method: PATCH
  • Access point: /
  • Body: { path: string }
  • Authentication: REQUIRED
  • Return value: void
  • Error codes:
    • 40307 - file not found
    • 70314 - firmware update failed

experimentAction

  • Description: perform requested action on stimulator
  • Method: PATCH
  • Access point: /experiment/:action/:experimentID?asyncStimulatorRequest
  • Parameters:
    • action: name of the action (upload, setup, run, pause, finish, clear)
    • experimentID: ID of an experiment
  • Query parameters:
    • asyncStimulatorRequest: true, if wait for stimulator response, else false; default=false
  • Authentication: REQUIRED
  • Return value: StimulatorStateData | any>
  • Error codes:
    • 50303 - port is not open
    • 70315 - unsupported action

getStimulatorState

  • Description: request curent state of stimulator
  • Method: GET
  • Access point: /state
  • Authentication: NOT REQUIRED
  • Return value: StimulatorStateData | any
  • Error codes:
    • 50303 - port is not open

setOutput

  • Description: manualy set one output
  • Method: PATCH
  • Access point: /set-output
  • Body: { index: number; enabled: boolean }
  • Query parameters:
    • asyncStimulatorRequest: true, if wait for stimulator response, else false
  • Authentication: REQUIRED
  • Return value: void
  • Error codes:
    • 50303 - port is not open
Home * [x] [Configuration](https://github.com/neuro-stimulator/neuro-server/wiki/Configuration)
Experiments
Sequences
Experiment results
Stimulator
Experiment player
Clone this wiki locally