OML Data Definition Igor Macedo, UNIFACS UNIFACS-Fibre Meeting 1.

Slides:



Advertisements
Similar presentations
Lecture 3 Some commonly used C programming tricks. The system command Project No. 1: A warm-up project.
Advertisements

Recitation By yzhuang, sseshadr. Agenda Debugging practices – GDB – Valgrind – Strace Errors and Wrappers – System call return values and wrappers – Uninitialization.
1 Chapter 10 Strings and Pointers. 2 Introduction  String Constant  Example: printf(“Hello”); “Hello” : a string constant oA string constant is a series.
Character String Manipulation. Overview Character string functions sscanf() function sprintf() function.
Lecture 20 Arrays and Strings
Jolyon White GEC9 2 nd November 2010 A Tutorial Introduction to OML.
Basic SQL types String –Char(n): fixed length. Padded –Varchar(n): variable length Number –Integer: 32 bit –Decimal(5,2): –Real, Double: 32 bit,
C Language Summary HTML version. I/O Data Types Expressions Functions Loops and Decisions Preprocessor Statements.
CS-502 Fall 2006Processes in Unix, Linux, & Windows 1 Processes in Unix, Linux, and Windows CS502 Operating Systems.
Unix Process Environment. main Function A C program starts execution with a function called main. The prototype for the main function is: int main (int.
Engineering H192 - Computer Programming The Ohio State University Gateway Engineering Education Coalition Lect M1 P. 1Winter Quarter Midterm I Review Topics.
Fork and Exec Unix Model Tutorial 3. Process Management Model The Unix process management model is split into two distinct operations : 1. The creation.
Unsigned and Signed Numbers. Hexadecimal Number 217A 16 Position Digits A Value = 2x x x16 + Ax1 = 2x x x16.
CSE 332: C++ program structure and development environment C++ Program Structure (and tools) Today we’ll talk generally about C++ development (plus a few.
SQLite 1 CS440. What is SQLite?  Open Source Database embedded in Android  SQL syntax  Requires small memory at runtime (250 Kbytes)  Lightweight.
Phonegap Bridge – File System CIS 136 Building Mobile Apps 1.
Command line arguments. – main can take two arguments conventionally called argc and argv. – Information regarding command line arguments are passed to.
Jolyon White GEC9, 4 th November 2010 Measurement Flow Architecture in OML.
Chapter 4 Introduction to MySQL. MySQL “the world’s most popular open-source database application” “commonly used with PHP”
File Handling Spring 2013Programming and Data Structure1.
ITEC 320 C++ Examples.
CISC105 – General Computer Science Class 9 – 07/03/2006.
Characters and Strings File Processing Exercise C Programming:Part 3.
File IO and command line input CSE 2451 Rong Shi.
APS105 Strings. C String storage We have used strings in printf format strings –Ex: printf(“Hello world\n”); “Hello world\n” is a string (of characters)
CSCI 130 Chapter 3. Variables & Names Variable Declarations: –reserve a storage location in memory –identify the name of the variable –identify the type.
Shell (Addendum). Example r What if we want to support something like this: m ps –le | sort r One process should execute ps –le and another should execute.
Lin Chen 09/13/2011. Count words number in the file arrayUtils.h include the adding functions template int addInOrder (T* array, int& size, T value);
1 CSC 201: Computer Programming I Lecture 2 B. S. Afolabi.
CPS4200 Unix Systems Programming Chapter 2. Programs, Processes and Threads A program is a prepared sequence of instructions to accomplish a defined task.
1 File Handling. 2 Storage seen so far All variables stored in memory Problem: the contents of memory are wiped out when the computer is powered off Example:
(language, compilation and debugging) David 09/16/2011.
Lecture 6 C++ Programming Arne Kutzner Hanyang University / Seoul Korea.
CSE 232: C++ memory management Overview of Arrays Arrays are the simplest kind of data structure –One item right after another in memory (“contiguous range”
C Programming Lecture 12 : File Processing
Pre/Post Condition Discussion 03/13/2013. Quicksort int main(int argc, char* argv[]) { int numbers[SIZE] = {2,5,3…} struct Sorter s; // initialize generic.
OML – I NFRASTRUCTURE OVERVIEW Igor Leonardo Eloy Macedo.
EGEE-III INFSO-RI Enabling Grids for E-sciencE EGEE and gLite are registered trademarks Programming with the DRMAA OGF Standard.
Data Types Always data types will decide which type of information we are storing into variables In C programming language we are having 3 types of basic.
Tutorial 3. In this tutorial we’ll see Fork() and Exec() system calls.
2.1 Processes  process = abstraction of a running program  multiprogramming = CPU switches from running program to running program  pseudoparallelism.
Connecting to Files In order to read or write to a file, we need to make a connection to it. There are several functions for doing this. fopen() – makes.
6/9/2016Course material created by D. Woit 1 CPS 393 Introduction to Unix and C START OF WEEK 10 (C-4)
Real Numbers Device driver process within the operating system that interacts with I/O controller logical record 1 logical record 2 logical record 3.
Congreso Cuidad, Spain May 15, 2007 GridWay 1/27, Programming with the DRMAA OGF Standard GridWay Distributed Systems Architecture Group Universidad Complutense.
Command Line Arguments
Command line arguments
Understand argc and argv
Structure of C Programs
More Examples of argc and argv
Command Line Arguments
Yung-Hsiang Lu Purdue University
Pointers.
Do Now:.
دانشگاه شهیدرجایی تهران
Pointers.
تعهدات مشتری در کنوانسیون بیع بین المللی
Process Creation Process Termination
Tutorial 3 Tutorial 3.
Programming and Data Structure
CREATE, INSERT, SELECT.
Local Variables, Global Variables and Variable Scope
Pointers.
C++ Pointers and Strings
Chapter 4 Introduction to MySQL.
Programming Language C Language.
COSMOS/ORBIT Tutorials (Introduction)
C++ Pointers and Strings
Pointers.
Data in a C++ Program Numeric data and character data
Presentation transcript:

OML Data Definition Igor Macedo, UNIFACS UNIFACS-Fibre Meeting 1

Agenda Measurement Point – Creation and Definition – Registration Data Persistence Data Export 2

Measurement Points (1) It’s the way OML define it data To define/register a OML MP: – Create a OmlMPDef array. This array defines the data to be stored in a relational database (sqlite3), like a table; – Use the function omlc_add_mp, to register the “table” in the database – To insert the data into the database, use the function oml_inject 3

Measurement Points (2) 4 #include int main (int argc, const char **argv) { int result = omlc_init ("Simple", &argc, argv, NULL); if (result == -1) { fprintf (stderr, "Could not initialize OML\n"); exit (1); } OmlMPDef mp_def [] = { { "count", OML_UINT32_VALUE }, { "count_str", OML_STRING_VALUE }, { "count_real", OML_DOUBLE_VALUE }, { NULL, (OmlValueT)0 } }; OmlMP *mp = omlc_add_mp ("counter", mp_def); if (mp == NULL) { fprintf (stderr, "Error: could not register Measurement Point 'counter'"); exit (1); } omlc_start(); int i = 0; for (i = 0; i < 1000; i++) { uint32_t count = (uint32_t)i; char count_str[16]; double count_real = (double)i; OmlValueU values[3]; snprintf(count_str, sizeof(count_str), "%d", i); omlc_set_uint32 (values[0], count); omlc_set_string (values[1], count_str); omlc_set_double (values[2], count_real); omlc_inject (mp, values); } omlc_close(); return 0; }

Measurement Points (3) 5... OmlMPDef mp_def = { {"oml_sender_id", OML_INT32_VALUE}, {"oml_seq", OML_INT32_VALUE}, {"oml_ts_client", OML_DOUBLE_VALUE}, {"oml_ts_server", OML_DOUBLE_VALUE}, {"ts", OML_DOUBLE_VALUE}, {"flow_id", OML_INT32_VALUE}, {"seq_no", OML_INT32_VALUE}, {"pkt_length", OML_INT32_VALUE}, {"dst_host", OML_STRING_VALUE}, {"dst_port", OML_INT32_VALUE} }... OmlMP *mp = oml_add_mp (“otg2_udp_out”, mp_def);... omlc_inject(mp, values); CREATE TABLE "otg2_udp_out" (oml_sender_id INTEGER, oml_seq INTEGER, oml_ts_client REAL, oml_ts_server REAL, "ts" REAL, "flow_id" INTEGER, "seq_no" UNSIGNED INTEGER, "pkt_length" UNSIGNED INTEGER, "dst_host" TEXT, "dst_port" UNSIGNED INTEGER); INSERT INTO "otg2_udp_out" VALUES(1,1, , , ,1,1,512,' ',3000); INSERT INTO "otg2_udp_out" VALUES(1,2, , , ,1,2,512,' ',3000); INSERT INTO "otg2_udp_out" VALUES(1,3, , , ,1,3,512,' ',3000); INSERT INTO "otg2_udp_out" VALUES(1,4, , , ,1,4,512,' ',3000);

Data Persistence 6

Data Export 7

MDIP Proposal 8

Thank you for your attention Igor Macedo 9