-
Notifications
You must be signed in to change notification settings - Fork 1
/
ExampleExtension.py
49 lines (40 loc) · 1.67 KB
/
ExampleExtension.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
import numpy as np
import random
import time
class Template(object):
params = [
#"Tab:SubSection DataType Name= Value DefaultValue LowRange HighRange // Comment (identifier)",
#See further details http://bci2000.org/wiki/index.php/Technical_Reference:Parameter_Definition
"PythonApp:Template int TemplateEnable= 0 0 0 1 // Enable: 0 no, 1 yes (boolean)",
]
states = [
#Name Length(nBits up to 32) Value ByteLocation(in state vector) BitLocation(0 to 7) CRLF
#http://bci2000.org/wiki/index.php/Technical_Reference:State_Definition
#Typically, state values change once per block or once per trial.
#State values are saved per block.
#"SpecificState 1 0 0 0", #Define states that are specific to this extension.
]
@classmethod
def preflight(cls,app):
if int(app.params['TemplateEnable'])==1: pass
@classmethod
def initialize(cls,app):
if int(app.params['TemplateEnable'])==1: pass
@classmethod
def halt(cls,app):
if int(app.params['TemplateEnable'])==1: pass
@classmethod
def startrun(cls,app):
if int(app.params['TemplateEnable'])==1: pass
@classmethod
def stoprun(cls,app):
if int(app.params['TemplateEnable'])==1: pass
@classmethod
def transition(cls,app,phase):
if int(app.params['TemplateEnable'])==1: pass
@classmethod
def process(cls,app,sig):
if int(app.params['TemplateEnable'])==1: return sig
@classmethod
def event(cls, app, phasename, event):
if int(app.params['TemplateEnable'])==1: pass