Changes between Initial Version and Version 1 of Old/CollectMeasurements


Ignore:
Timestamp:
Sep 30, 2005, 5:14:13 PM (19 years ago)
Author:
zhibinwu
Comment:

Legend:

Unmodified
Added
Removed
Modified
  • Old/CollectMeasurements

    v1 v1  
     1[wiki:WikiStart Orbit] > [wiki:Tutorial Tutorial] > How Measurements are Collected in ORBIT testbed?
     2
     3The '''ORBIT Measurement Framework (OML)''' was discussed in the first section of this tutorial as one of the ORBIT Services.  It is a distributed software framework enabling real-time collection of data, and, as such, has a client application programming interface (API).  A developer can use this client API through a web interface to define the measurement points and parameters for his or her application.  Measurement points and their frequency of collection are an important part of ones experimental plan.
     4
     5The definition of a measurement point is illustrated in Figure 12 below.  Measurement point definitions are saved as an XML-based configuration file, and source code for the measurement client is automatically generated that contains application-specific methods that handle type-safe data collection.  This source code can be compiled and linked with the application as illustrated by a Makefile in Figure 13 and sample application code in Figure 14 below.
     6
     7{{{
     8<measurement-points>
     9<measurement-point id="group-1">
     10<metric id="rssi" type="float"/>
     11<metric id="noise" type="float"/>
     12</measurement-point>
     13<measurement-point id="group-2">
     14<metric id="throughput" type="int"/>
     15</measurement-point>
     16</measurement-points>
     17}}}
     18
     19Figure 12.  Defining Measurement Points
     20
     21{{{
     22Makefile:
     23$(INC_DIR)/oml_%.h : $(ETC_DIR)/%.xml
     24mkdir -p $(INC_DIR)
     25wget -q http://www.orbit-lab.org/oml/client_wrapper\
     26--post-file $< -O - \
     27| tar -C $(BUILD_DIR) -xzf –
     28oml_foo.h:
     29int oml_group1(float rssi, float noise);
     30int oml_group2(int throughput);
     31}}}
     32
     33Figure 13.  Makefile and include file for Measurement Points
     34
     35{{{
     36oml_init(&argc, &argv, NULL);
     37
     38
     39if (r_data->send_option == 1) {
     40buffer->rssi = recv_packet_params.rssi ;
     41buffer->noise = recv_packet_params.noise;
     42oml_group1(buffer->rssi, buffer->noise);
     43} else {
     44log(LOG_ERR, "Unknown receive option! \n");
     45}
     46lost_packets = pck_id.seqnum - old - 1;
     47oml_group2(lost_packets);
     48}}}
     49
     50Figure 14.  Application Code Sample
     51
     52Because not all measurements are needed and not all measurement samples are needed, '''OML''' supports preprocessing or filtering at source to reduce the amount of reported and recorded data.  Filters are defined by experimenter, and experimenter-provided filters are supported.  Figure 15 below illustrates the client-side data flow.  Collection of and access to the recorded data requires the use of a database schema.  '''OML''' automatically generates the appropriate schema as diagrammed in Figure 16 below.
     53
     54Figure 15.  Client-side Data Flow (see page 66 of [http://www.orbit-lab.org/doc/tutorial]).
     55
     56Figure 16.  Server-side DB Schema Generation (see page 67 of [http://www.orbit-lab.org/doc/tutorial]).
     57