wiki:Old/CollectMeasurements

Version 9 (modified by pkamat, 18 years ago) ( diff )

Tutorial TOC

    Error: Page Tutorial does not exist
    Error: Page Tutorial/Testbed does not exist
    Error: Page Tutorial/HowtoWriteScripts does not exist
    Error: Page Tutorial/HelloWorld does not exist
    Error: Page Tutorial/CollectMeasurements does not exist
    Error: Page Tutorial/AnalyzeResults does not exist

Measurements Collection

The 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.

The definition of a measurement point is shown below.

<measurement-points>
  <measurement-point id="group-1">
    <metric id="rssi" type="float"/>
    <metric id="noise" type="float"/>
  </measurement-point>
  <measurement-point id="group-2">
    <metric id="throughput" type="int"/>
  </measurement-point>
</measurement-points>

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 and sample application code below.

Makefile and include file for Measurement Points

Sample Makefile:
$(INC_DIR)/oml_%.h : $(ETC_DIR)/%.xml
	mkdir -p $(INC_DIR)
	wget -q http://oml.orbit-lab.org/generator/wrapper\
		--post-file $< -O - \
		| tar -C $(BUILD_DIR) -xzf 

oml_foo.h:
	int oml_group1(float rssi, float noise);
	int oml_group2(int throughput);

Application Code Sample

// needs to be called only once
oml_init(&argc, &argv, NULL);

if (r_data->send_option == 1) {
  buffer->rssi = recv_packet_params.rssi ;
  buffer->noise = recv_packet_params.noise;
  oml_group1(buffer->rssi, buffer->noise);
} else {
  log(LOG_ERR, "Unknown receive option! \n");
}
lost_packets = pck_id.seqnum - old - 1;
oml_group2(lost_packets);

Because 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 1. 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 2 below.

Figure 1. Client-side Data Flow.

Figure 2. Server-side DB Schema Generation.

Attachments (2)

Download all attachments as: .zip

Note: See TracWiki for help on using the wiki.