Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Removed old commented out code #130

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
32 changes: 1 addition & 31 deletions openbci/plugins/udp_server.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,36 +18,6 @@
import plugin_interface as plugintypes


# class PluginPrint(IPlugin):
# # args: passed by command line
# def activate(self, args):
# print("Print activated")
# # tell outside world that init went good
# return True

# def deactivate(self):
# print("Print Deactivated")

# def show_help(self):
# print("I do not need any parameter, just printing stuff.")

# # called with each new sample
# def __call__(self, sample):
# sample_string =
# "ID: %f\n%s\n%s" %(sample.id, str(sample.channel_data)[1:-1], str(sample.aux_data)[1:-1])
# print("---------------------------------")
# print(sample_string)
# print("---------------------------------")

# # DEBBUGING
# # try:
# # sample_string.decode('ascii')
# # except UnicodeDecodeError:
# # print("Not a ascii-encoded unicode string")
# # else:
# # print(sample_string)


class UDPServer(plugintypes.IPluginExtended):
def __init__(self, ip='localhost', port=8888):
self.ip = ip
Expand All @@ -63,7 +33,7 @@ def activate(self):
if len(self.args) > 1:
self.port = int(self.args[1])

# init network
# initialize network
print("Selecting raw UDP streaming. IP: " + self.ip + ", port: " + str(self.port))

self.server = socket.socket(socket.AF_INET, socket.SOCK_DGRAM)
Expand Down