-
Notifications
You must be signed in to change notification settings - Fork 0
/
PKG-INFO
96 lines (61 loc) · 2.28 KB
/
PKG-INFO
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
Metadata-Version: 1.0
Name: oml4py
Version: 2.10.4
Summary: An OML client module for Python
Home-page: http://witestlab.poly.edu
Author: Fraida Fund
Author-email: ffund01@students.poly.edu
License: MIT
Download-URL: http://pypi.python.org/pypi/oml4py
Description:
===========
OML4PY
===========
This is a Python module for the OML measurement library based on the OML text
protocol: http://mytestbed.net/projects/oml/wiki/Description_of_Text_protocol
Installation
-------------
Install using pip::
pip install oml4py
or download the package and run::
python setup.py install
Usage
-------------
This module provides the OMLBase class, which contains the following methods:
* init
* start
* addmp
* inject
* close
To use OML in a python project, import the OMLBase class::
from oml4py import OMLBase
Start by initializing an OMLBase object. The init method takes up to four
arguments:
* the name of the application,
* the name of the experimental domain,
* the name of the node,
* and the OML collection URI in the form ``[tcp:]hostname[:port]``
For example::
x=OMLBase("app", "an-exp","r","tcp:myomlserver.com:3003")
The only mandatory argument is the first one (the name of the
application). If you skip any of the others, they may be defined by
environment variables (OML_DOMAIN, OML_NAME, OML_COLLECT) or via
command-line options. If these variables are not passed in explicitly
and neither the command line options nor environment variables are
defined then the application will run with OML disabled, and the
measurements that would have been sent to OML will be printed on
stdout instead.
Next, add one or more measurement points. Pass the name of the measurement
point and a schema string to the start method. The schema string should
be in the format
``measurement_name1:measurement_type1 measurement_name2:measurement_type2``
for example::
x.addmp("fft", "freq:long amplitude:double fft_val:double")
When you have set up all your measurement points, call start()::
x.start()
When you have a measurement point to send to OML, store them in a
tuple. Then pass the name of the measurement point and tuple of
values to inject, as follows::
x.inject("fft", (259888, 15, -38))
At the end of your program, call close to gracefully close the database::
x.close()