-
Notifications
You must be signed in to change notification settings - Fork 48
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
dcdadc5
commit 92242f9
Showing
28 changed files
with
1,952 additions
and
0 deletions.
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
- Some things in PikaPublisher related to the buffer can probably be taken | ||
out and placed in the super class. | ||
- Document PikaSubscriber a little better so that it is obvious that the | ||
callback eats data in this format: | ||
[ | ||
{timestmap, channel_0, ..., channel_N}, | ||
... | ||
{timestmap, channel_0, ..., channel_N} | ||
] | ||
|
||
|
||
|
||
- Cloudbrain style guide | ||
- 4 space indents | ||
- 120 characters per line max | ||
- Interface lives in __init__.py of package | ||
- package names should all be lower case | ||
- prefer 1 class per package | ||
|
||
|
||
TODO | ||
- create a stdout publisher | ||
- remove one of the two publish methods for the publisher? |
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
{ | ||
"modules": [ | ||
{ | ||
"name": "OpenBCISource", | ||
"package": "cloudbrain.modules.sources.openbci", | ||
"options": { | ||
"port": "/dev/tty.OpenBCI-DN0095VT", | ||
"baud": 115200, | ||
"filter_data": true | ||
}, | ||
"publishers": [ | ||
{ | ||
"name": "PikaPublisher", | ||
"package": "cloudbrain.publishers.rabbitmq", | ||
"options": { | ||
"rabbitmq_address": "localhost", | ||
"rabbitmq_user": "guest", | ||
"rabbitmq_pwd": "guest" | ||
}, | ||
"base_routing_key": "amsterdam:openbci", | ||
"metrics": [ | ||
{ | ||
"metric_name": "eeg", | ||
"num_channels": 8, | ||
"buffer_size": 2 | ||
}, | ||
{ | ||
"metric_name": "alpha", | ||
"num_channels": 8, | ||
"buffer_size": 2 | ||
} | ||
] | ||
} | ||
], | ||
"subscribers": [] | ||
} | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,78 @@ | ||
{ | ||
"modules": [ | ||
{ | ||
"name": "OpenBCISource", | ||
"package": "cloudbrain.modules.sources.openbci", | ||
"options": { | ||
"port": "/dev/tty.OpenBCI-DN0095VT", | ||
"baud": 115200, | ||
"filter_data": true | ||
}, | ||
"publishers": [ | ||
{ | ||
"name": "PikaPublisher", | ||
"package": "cloudbrain.publishers.rabbitmq", | ||
"options": { | ||
"rabbitmq_address": "rabbitmq.cloudbrain.rocks", | ||
"rabbitmq_user": "cloudbrain", | ||
"rabbitmq_pwd": "cloudbrain" | ||
}, | ||
"base_routing_key": "amsterdam:openbci", | ||
"metrics": [ | ||
{ | ||
"metric_name": "eeg", | ||
"num_channels": 8, | ||
"buffer_size": 2 | ||
}, | ||
{ | ||
"metric_name": "alpha", | ||
"num_channels": 8, | ||
"buffer_size": 2 | ||
} | ||
] | ||
}, | ||
{ | ||
"name": "PikaPublisher", | ||
"package": "cloudbrain.publishers.rabbitmq", | ||
"options": { | ||
"rabbitmq_address": "localhost", | ||
"rabbitmq_user": "guest", | ||
"rabbitmq_pwd": "guest" | ||
}, | ||
"base_routing_key": "amsterdam:openbci", | ||
"metrics": [ | ||
{ | ||
"metric_name": "eeg", | ||
"num_channels": 8, | ||
"buffer_size": 2 | ||
}, | ||
{ | ||
"metric_name": "alpha", | ||
"num_channels": 8, | ||
"buffer_size": 2 | ||
} | ||
] | ||
}, | ||
{ | ||
"name": "StdoutPublisher", | ||
"package": "cloudbrain.publishers.stdout", | ||
"options": {}, | ||
"base_routing_key": "amsterdam:openbci", | ||
"metrics": [ | ||
{ | ||
"metric_name": "eeg", | ||
"num_channels": 8, | ||
"buffer_size": 2 | ||
}, | ||
{ | ||
"metric_name": "alpha", | ||
"num_channels": 8, | ||
"buffer_size": 2 | ||
} | ||
] | ||
} | ||
], | ||
"subscribers": [] | ||
} | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,163 @@ | ||
# RabbitMQ info | ||
ROUTING_KEY = "%s:%s:%s" | ||
RMQ_USER = 'guest' | ||
RMQ_PWD = 'guest' | ||
|
||
# Database info | ||
DATE_FORMAT = "%Y-%m-%d %H:%M:%S" | ||
SENSOR_DATA_KEYSPACE = "sensor_data" | ||
ANALYTICS_KEYSPACE = "analytics" | ||
USERS_KEYSPACE = "users" | ||
USERS_CONSENT_TABLE = "users_consent" | ||
TAGS_TABLE_NAME = "tags" | ||
AGGREGATES_TABLE_NAME = "aggregates" | ||
|
||
# Servers addresses | ||
CASSANDRA_ADDRESS = '127.0.0.1', | ||
RABBITMQ_ADDRESS = '127.0.0.1' | ||
WEBSERVER_ADDRESS = '127.0.0.1' | ||
WEBSERVER_PORT = 8080 | ||
|
||
# Metadata of wearable devices supported by CloudBrain. | ||
DEVICE_METADATA = [ | ||
{'device_name': 'openbci', | ||
'device_type': 'eeg_headset', | ||
'metrics': | ||
[ | ||
{ | ||
'metric_name': 'eeg', | ||
'num_channels': 8, | ||
'metric_description': 'Raw eeg data coming from the OpenBCI channels' | ||
} | ||
] | ||
}, | ||
{ | ||
'device_name': 'muse', | ||
'device_type': 'eeg_headset', | ||
'metrics': | ||
[ | ||
{ | ||
'metric_name': 'eeg', | ||
'num_channels': 4, | ||
'metric_description': 'Raw eeg data coming from the 4 channels of the Muse' | ||
}, | ||
{ | ||
'metric_name': 'horseshoe', | ||
'num_channels': 4, | ||
'metric_description': 'Status indicator for each channel (1 = good, 2 = ok, >=3 bad)' | ||
}, | ||
{ | ||
'metric_name': 'concentration', | ||
'num_channels': 1, | ||
'metric_description': None | ||
}, | ||
{ | ||
'metric_name': 'mellow', | ||
'num_channels': 1, | ||
'metric_description': None | ||
}, | ||
{ | ||
'metric_name': 'acc', | ||
'num_channels': 3, | ||
'metric_description': None | ||
}, | ||
{ | ||
'metric_name': 'delta_absolute', | ||
'num_channels': 4, | ||
'metric_description': None | ||
}, | ||
{ | ||
'metric_name': 'theta_absolute', | ||
'num_channels': 4, | ||
'metric_description': None | ||
}, | ||
{ | ||
'metric_name': 'beta_absolute', | ||
'num_channels': 4, | ||
'metric_description': None | ||
}, | ||
{ | ||
'metric_name': 'alpha_absolute', | ||
'num_channels': 4, | ||
'metric_description': None | ||
}, | ||
{ | ||
'metric_name': 'gamma_absolute', | ||
'num_channels': 4, | ||
'metric_description': None | ||
}, | ||
{ | ||
'metric_name': 'delta_relative', | ||
'num_channels': 4, | ||
'metric_description': None | ||
}, | ||
{ | ||
'metric_name': 'theta_relative', | ||
'num_channels': 4, | ||
'metric_description': None | ||
}, | ||
{ | ||
'metric_name': 'beta_relative', | ||
'num_channels': 4, | ||
'metric_description': None | ||
}, | ||
{ | ||
'metric_name': 'alpha_relative', | ||
'num_channels': 4, | ||
'metric_description': None | ||
}, | ||
{ | ||
'metric_name': 'gamma_relative', | ||
'num_channels': 4, | ||
'metric_description': None | ||
}, | ||
{ | ||
'metric_name': 'is_good', | ||
'num_channels': 4, | ||
'metric_description': 'Strict data quality indicator for each channel, 0= bad, 1 = good.' | ||
}, | ||
{ | ||
'metric_name': 'blink', | ||
'num_channels': 1, | ||
'metric_description': None | ||
}, | ||
{ | ||
'metric_name': 'jaw_clench', | ||
'num_channels': 1, | ||
'metric_description': None | ||
}, | ||
|
||
] | ||
}, | ||
{ | ||
'device_name': 'neurosky', | ||
'device_type': 'eeg_headset', | ||
'metrics': [ | ||
{ | ||
'metric_name': 'eeg', | ||
'num_channels': 1, | ||
'metric_description': None | ||
}, | ||
{ | ||
'metric_name': 'attention', | ||
'num_channels': 1, | ||
'metric_description': None | ||
}, | ||
{ | ||
'metric_name': 'meditation', | ||
'num_channels': 1, | ||
'metric_description': None | ||
}, | ||
{ | ||
'metric_name': 'fft', | ||
'num_channels': 8, | ||
'metric_description': None | ||
}, | ||
{ | ||
'metric_name': 'signal_strength', | ||
'num_channels': 1, | ||
'metric_description': None | ||
}, | ||
] | ||
} | ||
] |
Empty file.
Oops, something went wrong.