wlanmonitor_app.rb

Thierry Rakotoarivelo, 31/08/2010 05:22 pm

Download (2.4 kB)

 
1
#
2
# Copyright (c) 2010 National ICT Australia (NICTA), Australia
3
#
4
# Permission is hereby granted, free of charge, to any person obtaining a copy
5
# of this software and associated documentation files (the "Software"), to deal
6
# in the Software without restriction, including without limitation the rights
7
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
8
# copies of the Software, and to permit persons to whom the Software is
9
# furnished to do so, subject to the following conditions:
10
#
11
# The above copyright notice and this permission notice shall be included in
12
# all copies or substantial portions of the Software.
13
#
14
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL THE
17
# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
18
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
19
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
20
# THE SOFTWARE.
21
#
22
#
23

    
24
# This is an OMF Definition for the existing application called 'otg2'
25
# This definition will allow OMF entities to use and instrument this application
26
#
27
defApplication('wlanmonitor_app', 'wlanmonitor') do |a|
28

    
29
  a.path = "/usr/bin/wlanmonitor-simple"
30
  a.version(1, 2, 0)
31
  a.shortDescription = "Wrapper around wlanconfig's list mode"
32
  a.description = <<TEXT
33
This is a wrapper around the wlanconfig command used in list mode.
34
This application is using OML4R part of OML v2.3 or v2.4
35
TEXT
36

    
37
  # Define the properties that can be configured for this application
38
  # 
39
  # syntax: defProperty(name, description, mnemonic = nil, options = nil)
40
  #
41
  a.defProperty('interface', 'Interface to listen on', 'i', 
42
                {:type => :string, :dynamic => false})
43
  a.defProperty('sampling', 'Sampling interval in sec', 's', 
44
                {:type => :integer, :dynamic => false})
45

    
46
  # List the Measurement Points and associated metrics that are available 
47
  # for this application
48
  #
49
  a.defMeasurement('wlanstat') do |m|
50
    m.defMetric('src_addr',:string)
51
    m.defMetric('dst_addr',:string)
52
    m.defMetric('aid',:long)
53
    m.defMetric('channel',:long)
54
    m.defMetric('rate',:string)
55
    m.defMetric('rssi',:long)
56
    m.defMetric('dbm',:long)
57
    m.defMetric('idle',:long)
58
    m.defMetric('txseq',:long)
59
  end
60
end