Implementation of Embedded OS Lab5 Real-time Programming on μ C/OS-III.

Slides:



Advertisements
Similar presentations
Review: Name/Address conversion: –What does the domain name system do? –Which system calls use the domain name system? –How does it work? –How does getservbyname.
Advertisements

Socket Programming 101 Vivek Ramachandran.
CDMA vs GSM -two main competing network technologies -Global System for Mobile Communications -Code Division Multiple Access.
Umut Girit  One of the core members of the Internet Protocol Suite, the set of network protocols used for the Internet. With UDP, computer.
Adobe’s Real Time Messaging Protocol
TCP - Part I Relates to Lab 5. First module on TCP which covers packet format, data transfer, and connection management.
UDP & TCP Where would we be without them!. UDP User Datagram Protocol.
1 TCP - Part I Relates to Lab 5. First module on TCP which covers packet format, data transfer, and connection management.
1 CS 4396 Computer Networks Lab Transmission Control Protocol (TCP) Part I.
Transport Layer – TCP (Part1) Dr. Sanjay P. Ahuja, Ph.D. Fidelity National Financial Distinguished Professor of CIS School of Computing, UNF.
COEN 445 Communication Networks and Protocols Lab 4
Geoff Salmon, Monia Ghobadi, Yashar Ganjali, Martin Labrecque, J. Gregory Steffan University of Toronto.
Panoptes: A Scalable Architecture for Video Sensor Networking Applications Wu-chi Feng, Brian Code, Ed Kaiser, Mike Shea, Wu-chang Feng (OGI: The Oregon.
Chapter 7 Protocol Software On A Conventional Processor.
Internet Control Message Protocol (ICMP)
Adaptive Sampling for Sensor Networks Ankur Jain ٭ and Edward Y. Chang University of California, Santa Barbara DMSN 2004.
A CHAT CLIENT-SERVER MODULE IN JAVA BY MAHTAB M HUSSAIN MAYANK MOHAN ISE 582 FALL 2003 PROJECT.
Chapter 11 Monitoring and Analyzing the Web Environment.
A Relative Positioning System for Co-located Mobile Devices Mike Hazas, Christian Kray, Hans Gellersen, Henoc Agbota, Gerd Kortuem,Computing Department,
CSE/EE 461 Getting Started with Networking. Basic Concepts  A PROCESS is an executing program somewhere.  Eg, “./a.out”  A MESSAGE contains information.
© Lethbridge/Laganière 2001 Chap. 3: Basing Development on Reusable Technology 1 Let’s get started. Let’s start by selecting an architecture from among.
Computer System Laboratory
Questions for Chapter 6,9 Ying Zhang.
CEG3185 Tutorial 4 Prepared by Zhenxia Zhang Revised by Jiying Zhao (2015w)
MICHAEL EDDINGTON Advanced Fuzzing with Peach 2.
NETWORK CENTRIC COMPUTING (With included EMBEDDED SYSTEMS)
1 Transport Layer Computer Networks. 2 Where are we?
Computer Networks  Network - A system of computers interconnected in order to share information.  Data transmission - consists of sending and receiving.
Offline Performance Monitoring for Linux Abhishek Shukla.
COMPUTER SYSTEM LABORATORY Lab10 - Sensor II. Lab 10 Experimental Goal Learn how to write programs on the PTK development board (STM32F207). 2013/11/19/
Socket Lab Info. Computer Network. Requirement Use TCP socket to implement a pair of programs, containing a server and a client. The server program shall.
1 Chapter Client-Server Interaction. 2 Functionality  Transport layer and layers below  Basic communication  Reliability  Application layer.
Midterm Review. Lab 4: dynamic routing protocols.
Hyung-Min Lee©Networking Lab., 2001 Chapter 11 User Datagram Protocol (UDP)
LWIP TCP/IP Stack 김백규.
School of Engineering and Computer Science Victoria University of Wellington Copyright: Peter Andreae, VUW Networking COMP # 21.
Lab 1 Department of Computer Science and Information Engineering National Taiwan University Lab1 - Sensor 2014/9/23/ 13 1.
TCP: A Closer Look Transmission Control Protocol.
Transport Layer: UDP, TCP
© Jörg Liebeherr (modified by M. Veeraraghavan) 1 ICMP: A helper protocol to IP The Internet Control Message Protocol (ICMP) is the protocol used for error.
Transport Layer Moving Segments. Transport Layer Protocols Provide a logical communication link between processes running on different hosts as if directly.
Chapter 2 Applications and Layered Architectures Sockets.
The Socket Interface Chapter 21. Application Program Interface (API) Interface used between application programs and TCP/IP protocols Interface used between.
2000 년 11 월 20 일 전북대학교 분산처리실험실 TCP Flow Control (nagle’s algorithm) 오 남 호 분산 처리 실험실
SNMP 1. SNMP is an Internet protocol developed by the IETF. It is designed to facilitate the exchange of management information between network elements.
Implementation of Embedded OS Lab3 Linux Kernel Modules.
Networking Tutorial Special Interest Group for Software Engineering Luke Rajlich.
Lab 13 Department of Computer Science and Information Engineering National Taiwan University Lab13 – Interrupt + Timer 2014/12/23 1 /16.
CPSC 441 TUTORIAL – FEB 13, 2012 TA: RUITNG ZHOU UDP REVIEW.
CSE/EE 461 Getting Started with Networking. 2 Basic Concepts A PROCESS is an executing program somewhere. –Eg, “./a.out” A MESSAGE contains information.
Chapter 24 Transport Control Protocol (TCP) Layer 4 protocol Responsible for reliable end-to-end transmission Provides illusion of reliable network to.
1 Client-Server Interaction. 2 Functionality Transport layer and layers below –Basic communication –Reliability Application layer –Abstractions Files.
Socket Programming Introduction. Socket Definition A network socket is one endpoint in a two-way communication flow between two programs running over.
Implementation of Embedded OS Lab4 Cortex-M3 Programming.
Implementation of Embedded OS Lab3 Porting μC/OS-II.
Prepared by Dr. Jiying Zhao University of Ottawa Canada.
Project Title: Establishing communication between the server and Envirobat using TCP/IP Presented by Apourva.P.
1 Kyung Hee University Chapter 11 User Datagram Protocol.
Implementation of Embedded OS
Lab 7 Department of Computer Science and Information Engineering National Taiwan University Lab7 – uCOS Application 2015/11/10/ 10 1.
INF3190 – Home Exam 2. Goal The goal of this exercise is to provide network layer reliability for the monitoring/administration tool presented in “home.
TCP/IP1 Address Resolution Protocol Internet uses IP address to recognize a computer. But IP address needs to be translated to physical address (NIC).
LonWorks Introduction Hwayoung Chae.
CSEN 404 Introduction to Networks Amr El Mougy Lamia AlBadrawy.
3. END-TO-END PROTOCOLS (PART 1) Rocky K. C. Chang Department of Computing The Hong Kong Polytechnic University 22 March
SNMP.
Networking COMP
Computer System Laboratory
Computer System Laboratory
TCP - Part I Relates to Lab 5. First module on TCP which covers packet format, data transfer, and connection management.
Presentation transcript:

Implementation of Embedded OS Lab5 Real-time Programming on μ C/OS-III

Lab5 Goal  Practice real-time programming on μ C/OS-III. 2015/6/9 /132 Source:

Lab5 Environment  Host System  Windows XP  Build System  VirtualBox + Ubuntu 8.04  Target System  PTK development board (STM32F207)  Software  Reference codes  You can download them from RSWiki IEOS Course SoftwareRSWiki IEOS Course Software 2015/6/9 /133

Lab5 Scenario 2015/6/9 /134  In sensor network, the main job of sensors is to transmit collected data to a server.  It is common to use multiple communication channels with different levels of priority between a sensor and the server.  Monitoring data versus alarm events  Control messages versus data traffic  … Sensor Server Message Channel (higher priority) Data Channel (lower priority)

Lab5 Problem 2015/6/9 /135  In this lab, we would like to implement the following communication model. PTKUbuntu Request 1 Response 1 Request 2 Response 2 Request 100 Response ms 10ms Message Channel PTKUbuntu Packet 1 Packet 2 random (ms) Data Channel TCP Sockets Sensor (PTK) Sensor (PTK) Server (Ubuntu) Server (Ubuntu) Message Channel Data Channel

Lab5 Specification (1/8) 2015/6/9 /136  Request Message Format  REQ_TS_SEC: a four-byte unsigned integer representing the time when the request is sent in seconds  REQ_TS_USEC: a four-byte unsigned integer representing the fractional part of the time when the request is sent in microseconds Request Message REQ_TS_SEC 4 bytes REQ_TS_USEC 4 bytes

Lab5 Specification (2/8) 2015/6/9 /137  Response Message Format  RECV_TS_TICK: a four-byte unsigned integer representing the arrival time of the request in ticks*  RECV_TS_CYCLE: a four-byte unsigned integer representing the arrival time of the request in cycles*  REP_TS_TICK: a four-byte unsigned integer representing the time when the response is sent in ticks  REP_TS_CYCLE: a four-byte unsigned integer representing the time when the response is sent in cycles RECV_TS_TICK 4 bytes Response Message RECV_TS_CYCLE 4 bytes REP_TS_TICK 4 bytes REP_TS_CYCLE 4 bytes *Please refer to P.11 for how to obtain these values.

Lab5 Specification (3/8) 2015/6/9 /138  Data Packet Format  LEN: a two-byte unsigned short integer representing the length of data payload  The value of LEN should range from 1 to  DATA[0..LEN-1]: data payload of LEN bytes  You should fill DATA with the values [0, 255] in sequence and wrapping around when LEN is larger than 255.  The data length and transmission interval are generated randomly by the algorithm shown on the next page. Data Packet LEN 2 bytes DATA LEN bytes

Lab5 Specification (4/8) 2015/6/9 /139  Random Number Generator  Please use the following C codes to generate random numbers.  Use (my_rand(0) % PACKET_SIZE) to generate random numbers for LEN, PACKET_SIZE <=  Use (my_rand(1) % TRANS_INT) to generate random numbers for transmission interval, TRANS_INT = 20. unsigned int my_seed[2] = {0x1234, 0x5678}; unsigned int my_rand(int idx) { my_seed[idx] = ((my_seed[idx] * ) ) & 0x7fffffff; return my_seed[idx]; }

Lab5 Specification (5/8) 2015/6/9 /1310  Timing  You need to measure the time of the following events for all messages and data.  In μ C/OS-III  Receiving time of each message request  Sending time of each message response  In Linux  Sending time of each message request  Receiving time of each message response  Start time of each incoming data transmission  Finish time of each data transmission  All measurement should be done right before the socket function send or after the socket function read.  You should stop the measurement as soon as the last response is processed.

Lab5 Specification (6/8) 2015/6/9 /1311  Timing Functions  In μ C/OS-III, you should use OSTimeGet to obtain the current value of the tick counter, and use OS_TS_GET to obtain the current value of the CPU cycle counter.  In Linux, you should use gettimeofday for all timing.

Lab5 Specification (7/8) 2015/6/9 /1312  Program Input  N, PACKET_SIZE,TRANS_INT  Program Output  In Linux, for each pair of request/response messages, output a comma-separated list per line as follows.  MSG_NO, REQ_TS_SEC, REQ_TS_USEC, RECV_TS_TICK, RECV_TS_CYCLE, REP_TS_TICK, REP_TS_CYCLE, REP_RECV_TS_SEC, REP_RECV_TS_USEC  MSG_NO is the message number from 1 to N.  REP_RECV_TS_SEC/REP_RECV_TS_USEC is the time when the response is received in Linux.  Others are specified in the message formats.

Lab5 Specification (8/8) 2015/6/9 /1313