Skip to content

Experiments service

Petr Štechmüller edited this page Aug 29, 2020 · 1 revision

This service is used as access point to all repositories releated with Experiments.

Methods

findAll

  • Description: return all experiments which pass by filter - simple implementation of Experiment interface
  • Parameters: options?: FindManyOptions<ExperimentEntity>
  • Return value: Promise<Experiment[]>
  • Exceptions: -

byId

  • Description: return one experiment - full implementation of one of these interfaces: ExperimentERP, ExperimentCVEP, ExperimentFVEP, ExperimentTVEP, ExperimentREA
  • Parameters:
    • id: experiment id
    • userID: user id
  • Return value: Promise<Experiment>
  • Exceptions:
    • ExperimentIdNotFoundException

insert

  • Description: creates new experiment
  • Parameters:
    • experiment: full implementation of one ofthese interfaces: ExperimentERP, ExperimentCVEP, ExperimentFVEP, ExperimentTVEP, ExperimentREA
    • userID: user id
  • Return value: number: index of row of inserted experiment
  • Exceptions:
    • QueryFailedError: when query failed to run

update

  • Description: updates existing experiment
  • Parameters:
    • experiment: full implementation of one ofthese interfaces: ExperimentERP, ExperimentCVEP, ExperimentFVEP, ExperimentTVEP, ExperimentREA
    • userID: user id
  • Return value: void
  • Exceptions:
    • ExperimentIdNotFoundException: when experiment is not found
    • QueryFailedError: when query failed to run

delete

  • Description: deletes existing experiment
  • Parameters:
    • id: experiment id
    • userID: user id
  • Return value: void
  • Exceptions:
    • ExperimentIdNotFoundException: when experiment is not found
    • QueryFailedError: when query failed to run

usedOutputMultimedia

  • Description: return all used multimedia for selected experiment
  • Parameters:
    • id: experiment id
    • userID: user id
  • Return value: Promise<{ audio: {}; image: {} }>
  • Exceptions:
    • ExperimentIdNotFoundException: when experiment is not found

nameExists

  • Description: check if selected name exists or not
  • Parameters:
    • name: experiment name
    • id: experiment id or 'new'
  • Return value: Promise<boolean>
  • Exceptions: -
Home * [x] [Configuration](https://github.com/neuro-stimulator/neuro-server/wiki/Configuration)
Experiments
Sequences
Experiment results
Stimulator
Experiment player
Clone this wiki locally