Class: Mindset::PacketStore

Inherits:
Hash
  • Object
show all
Defined in:
lib/mindset.rb

Overview

Collection of captured Packet objects. Packets are collected by type. The start and end timestamps are saved.

Instance Method Summary collapse

Constructor Details

#initializePacketStore

Returns a new instance of PacketStore.



17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
# File 'lib/mindset.rb', line 17

def initialize
  super

  self[:start_ts] = Time.now
  self[:end_ts] = nil
  self[:delta] = []
  self[:theta] = []
  self[:lo_alpha] = []
  self[:hi_alpha] = []
  self[:lo_beta] = []
  self[:hi_beta] = []
  self[:lo_gamma] = []
  self[:mid_gamma] = []
  self[:signal_quality] = []
  self[:attention] = []
  self[:meditation] = []
  self[:blink] = []
  self[:wave] = []
end

Instance Method Details

#to_jsonObject



37
38
39
# File 'lib/mindset.rb', line 37

def to_json
  super
end