Sha256: 35844ce692ba0bb37e3786d762a0f6238b2de0ad87b5b268a88058cadcff2e1a

Contents?: true

Size: 1.3 KB

Versions: 14

Compression:

Stored size: 1.3 KB

Contents

require 'omf_common/lobject'
OMF::Common::Loggable.init_log 'wimax'

require 'omf_web'
require 'omf_common/lobject'
require 'omf_oml/table'
require 'omf_oml/sql_source'


class WimaxViz < OMF::Common::LObject
  attr_reader :table
  
  def initialize(db_name)
    @db_name = db_name
  end
  
  def wimax_bss02_bs(stream)
    puts stream.class
    @table = stream.to_table(:wimax, :include_oml_internals => true)
    OMF::Web.register_datasource @table    
  end
  
  def run
    #ep = OMF::OML::OmlSqlSource.new(@db_name, :offset => -500, :check_interval => 1.0)
    ep = OMF::OML::OmlSqlSource.new(@db_name, :check_interval => 3.0)
    ep.on_new_stream() do |stream|
      #puts stream.inspect
      case stream.stream_name
      when 'wimax_bss02_bs'
        wimax_bss02_bs(stream)
      else
        error(:oml, "Don't know what to do with table '#{stream.stream_name}'")
      end
    end
    ep.run
    self
  end
end
wv = WimaxViz.new('example/wimax/snapshot.db').run()
    


require 'yaml'
Dir.glob("#{File.dirname(__FILE__)}/*.yaml").each do |fn|
  h = YAML.load_file(fn)
  if w = h['widget']
    OMF::Web.register_widget w
  else
    OMF::Common::LObject.error "Don't know what to do with '#{fn}'"
  end
end


# Configure the web server
#
opts = {
  :page_title => 'WiMAX Operation',
}
require 'omf_web'
OMF::Web.start(opts)

Version data entries

14 entries across 14 versions & 1 rubygems

Version Path
omf_web-1.2.9 example/NOT_WORKING/wimax/viz_server.rb
omf_web-1.2.8 example/NOT_WORKING/wimax/viz_server.rb
omf_web-1.2.7 example/NOT_WORKING/wimax/viz_server.rb
omf_web-1.2.6 example/NOT_WORKING/wimax/viz_server.rb
omf_web-1.2.5 example/NOT_WORKING/wimax/viz_server.rb
omf_web-1.2.4 example/NOT_WORKING/wimax/viz_server.rb
omf_web-1.2.3 example/NOT_WORKING/wimax/viz_server.rb
omf_web-1.2.2 example/NOT_WORKING/wimax/viz_server.rb
omf_web-1.2.1 example/NOT_WORKING/wimax/viz_server.rb
omf_web-1.2.0 example/NOT_WORKING/wimax/viz_server.rb
omf_web-1.0.0 example/NOT_WORKING/wimax/viz_server.rb
omf_web-0.9.9 example/NOT_WORKING/wimax/viz_server.rb
omf_web-0.9.8 example/NOT_WORKING/wimax/viz_server.rb
omf_web-0.9.7 example/NOT_WORKING/wimax/viz_server.rb