inc. vxworks lesson-3 1 - devi ahilya vishwavidyalaya , …€¦ · the reader may refer to vxworks...
TRANSCRIPT
![Page 1: Inc. VxWorks Lesson-3 1 - Devi Ahilya Vishwavidyalaya , …€¦ · The reader may refer to VxWorks Programmer’s Guide when using these APIs and ... End of Lesson-3 of chapter 11](https://reader035.vdocuments.us/reader035/viewer/2022062504/5af87ecb7f8b9a5f588cd796/html5/thumbnails/1.jpg)
2008Chapter-11 L03: "Embedded Systems - Architecture,
Programming and Design" , Raj Kamal, Publs.: McGraw-Hill, Inc.
1
Design Examples and Case Studies of Design Examples and Case Studies of Program Modeling and Programming with Program Modeling and Programming with
RTOSRTOS--1:1:
Lesson-3 CASE STUDY OF CODING FOR SENDING CASE STUDY OF CODING FOR SENDING APPLICATION LAYER BYTE STREAMS APPLICATION LAYER BYTE STREAMS ON A TCP/IP NETWORK USING RTOS ON A TCP/IP NETWORK USING RTOS
VxWorksVxWorks
![Page 2: Inc. VxWorks Lesson-3 1 - Devi Ahilya Vishwavidyalaya , …€¦ · The reader may refer to VxWorks Programmer’s Guide when using these APIs and ... End of Lesson-3 of chapter 11](https://reader035.vdocuments.us/reader035/viewer/2022062504/5af87ecb7f8b9a5f588cd796/html5/thumbnails/2.jpg)
2008Chapter-11 L03: "Embedded Systems - Architecture,
Programming and Design" , Raj Kamal, Publs.: McGraw-Hill, Inc.
2
1. Specifications1. Specifications
![Page 3: Inc. VxWorks Lesson-3 1 - Devi Ahilya Vishwavidyalaya , …€¦ · The reader may refer to VxWorks Programmer’s Guide when using these APIs and ... End of Lesson-3 of chapter 11](https://reader035.vdocuments.us/reader035/viewer/2022062504/5af87ecb7f8b9a5f588cd796/html5/thumbnails/3.jpg)
2008Chapter-11 L03: "Embedded Systems - Architecture,
Programming and Design" , Raj Kamal, Publs.: McGraw-Hill, Inc.
3
TCP/IP StackTCP/IP Stack
� In TCP/IP suite of protocols, application layer transfers the data with appropriate header words to transport layer.
� At transport layer, either UDP or TCP protocol is used and additional header words placed.
![Page 4: Inc. VxWorks Lesson-3 1 - Devi Ahilya Vishwavidyalaya , …€¦ · The reader may refer to VxWorks Programmer’s Guide when using these APIs and ... End of Lesson-3 of chapter 11](https://reader035.vdocuments.us/reader035/viewer/2022062504/5af87ecb7f8b9a5f588cd796/html5/thumbnails/4.jpg)
2008Chapter-11 L03: "Embedded Systems - Architecture,
Programming and Design" , Raj Kamal, Publs.: McGraw-Hill, Inc.
4
TCP/IP Stack transmitting subsystem
![Page 5: Inc. VxWorks Lesson-3 1 - Devi Ahilya Vishwavidyalaya , …€¦ · The reader may refer to VxWorks Programmer’s Guide when using these APIs and ... End of Lesson-3 of chapter 11](https://reader035.vdocuments.us/reader035/viewer/2022062504/5af87ecb7f8b9a5f588cd796/html5/thumbnails/5.jpg)
2008Chapter-11 L03: "Embedded Systems - Architecture,
Programming and Design" , Raj Kamal, Publs.: McGraw-Hill, Inc.
5
TCP/IP StackTCP/IP Stack
� UDP is connection-less protocol for datagram transfer of total size including headers of less than 216 Byte.
� TCP is connection oriented protocol, in which data of unlimited size can be transferred in multiple sequences to the internet layer
� At internet layer, the IP protocol is used and IP packets are formed, each packet with an IP header transfers to the network through network driver subsystem.
![Page 6: Inc. VxWorks Lesson-3 1 - Devi Ahilya Vishwavidyalaya , …€¦ · The reader may refer to VxWorks Programmer’s Guide when using these APIs and ... End of Lesson-3 of chapter 11](https://reader035.vdocuments.us/reader035/viewer/2022062504/5af87ecb7f8b9a5f588cd796/html5/thumbnails/6.jpg)
2008Chapter-11 L03: "Embedded Systems - Architecture,
Programming and Design" , Raj Kamal, Publs.: McGraw-Hill, Inc.
6
TCP/IP stackTCP/IP stack
� A TCP/IP stack network driver is available in the RTOSes
� It has a library, sockLib for socket programming.
� The reader may refer to VxWorks Programmer’s Guide when using these APIs and sockLib.
![Page 7: Inc. VxWorks Lesson-3 1 - Devi Ahilya Vishwavidyalaya , …€¦ · The reader may refer to VxWorks Programmer’s Guide when using these APIs and ... End of Lesson-3 of chapter 11](https://reader035.vdocuments.us/reader035/viewer/2022062504/5af87ecb7f8b9a5f588cd796/html5/thumbnails/7.jpg)
2008Chapter-11 L03: "Embedded Systems - Architecture,
Programming and Design" , Raj Kamal, Publs.: McGraw-Hill, Inc.
7
TCP/IP stackTCP/IP stack
� Since the objective of case study is to learn the use of IPCs in multitasking RTOS through a case study.
� However, the present case study, without resorting to the network socket driver APIs in VxWorks, the required software to be embedded in the system is described to understand applications of IPC functions in VxWorks.
![Page 8: Inc. VxWorks Lesson-3 1 - Devi Ahilya Vishwavidyalaya , …€¦ · The reader may refer to VxWorks Programmer’s Guide when using these APIs and ... End of Lesson-3 of chapter 11](https://reader035.vdocuments.us/reader035/viewer/2022062504/5af87ecb7f8b9a5f588cd796/html5/thumbnails/8.jpg)
2008Chapter-11 L03: "Embedded Systems - Architecture,
Programming and Design" , Raj Kamal, Publs.: McGraw-Hill, Inc.
8
2. Requirements2. Requirements
![Page 9: Inc. VxWorks Lesson-3 1 - Devi Ahilya Vishwavidyalaya , …€¦ · The reader may refer to VxWorks Programmer’s Guide when using these APIs and ... End of Lesson-3 of chapter 11](https://reader035.vdocuments.us/reader035/viewer/2022062504/5af87ecb7f8b9a5f588cd796/html5/thumbnails/9.jpg)
2008Chapter-11 L03: "Embedded Systems - Architecture,
Programming and Design" , Raj Kamal, Publs.: McGraw-Hill, Inc.
9
Purpose Purpose
� To generate the byte stream for sending on the network using TCP or UDP protocol at transport layer and IP protocol at network layer
![Page 10: Inc. VxWorks Lesson-3 1 - Devi Ahilya Vishwavidyalaya , …€¦ · The reader may refer to VxWorks Programmer’s Guide when using these APIs and ... End of Lesson-3 of chapter 11](https://reader035.vdocuments.us/reader035/viewer/2022062504/5af87ecb7f8b9a5f588cd796/html5/thumbnails/10.jpg)
2008Chapter-11 L03: "Embedded Systems - Architecture,
Programming and Design" , Raj Kamal, Publs.: McGraw-Hill, Inc.
10
Inputs Inputs
� Bytes from application layer � Notification SemTCPFlag or
SemUDPFlag in case of TCP sequences or UDP datagram, respectively
![Page 11: Inc. VxWorks Lesson-3 1 - Devi Ahilya Vishwavidyalaya , …€¦ · The reader may refer to VxWorks Programmer’s Guide when using these APIs and ... End of Lesson-3 of chapter 11](https://reader035.vdocuments.us/reader035/viewer/2022062504/5af87ecb7f8b9a5f588cd796/html5/thumbnails/11.jpg)
2008Chapter-11 L03: "Embedded Systems - Architecture,
Programming and Design" , Raj Kamal, Publs.: McGraw-Hill, Inc.
11
Signals, Events and Notifications Signals, Events and Notifications
� After forming the packets at IP layer, SemPktFlag for network driver task
![Page 12: Inc. VxWorks Lesson-3 1 - Devi Ahilya Vishwavidyalaya , …€¦ · The reader may refer to VxWorks Programmer’s Guide when using these APIs and ... End of Lesson-3 of chapter 11](https://reader035.vdocuments.us/reader035/viewer/2022062504/5af87ecb7f8b9a5f588cd796/html5/thumbnails/12.jpg)
2008Chapter-11 L03: "Embedded Systems - Architecture,
Programming and Design" , Raj Kamal, Publs.: McGraw-Hill, Inc.
12
Outputs Outputs
� TCP or UDP Byte stream to destination socket
![Page 13: Inc. VxWorks Lesson-3 1 - Devi Ahilya Vishwavidyalaya , …€¦ · The reader may refer to VxWorks Programmer’s Guide when using these APIs and ... End of Lesson-3 of chapter 11](https://reader035.vdocuments.us/reader035/viewer/2022062504/5af87ecb7f8b9a5f588cd796/html5/thumbnails/13.jpg)
2008Chapter-11 L03: "Embedded Systems - Architecture,
Programming and Design" , Raj Kamal, Publs.: McGraw-Hill, Inc.
13
Functions of the system Functions of the system
� An HTTP application data is sent after encoding headers at transport and network layers.
� Tasks are scheduled in five sequences (i) Task_StrCheck, (ii)Task_OutStream, (iii) Task_TCPSegment or Task_UDPDatagram, (iv) Task_IPPktStream(v) Task_NetworkDrv
![Page 14: Inc. VxWorks Lesson-3 1 - Devi Ahilya Vishwavidyalaya , …€¦ · The reader may refer to VxWorks Programmer’s Guide when using these APIs and ... End of Lesson-3 of chapter 11](https://reader035.vdocuments.us/reader035/viewer/2022062504/5af87ecb7f8b9a5f588cd796/html5/thumbnails/14.jpg)
2008Chapter-11 L03: "Embedded Systems - Architecture,
Programming and Design" , Raj Kamal, Publs.: McGraw-Hill, Inc.
14
Test and validation conditions Test and validation conditions
� A loop back from destination socket should enable retrieval of application data stream as originally sent
� Buffer Memory over flow tests
![Page 15: Inc. VxWorks Lesson-3 1 - Devi Ahilya Vishwavidyalaya , …€¦ · The reader may refer to VxWorks Programmer’s Guide when using these APIs and ... End of Lesson-3 of chapter 11](https://reader035.vdocuments.us/reader035/viewer/2022062504/5af87ecb7f8b9a5f588cd796/html5/thumbnails/15.jpg)
2008Chapter-11 L03: "Embedded Systems - Architecture,
Programming and Design" , Raj Kamal, Publs.: McGraw-Hill, Inc.
15
3. Classes and Objects 3. Classes and Objects
![Page 16: Inc. VxWorks Lesson-3 1 - Devi Ahilya Vishwavidyalaya , …€¦ · The reader may refer to VxWorks Programmer’s Guide when using these APIs and ... End of Lesson-3 of chapter 11](https://reader035.vdocuments.us/reader035/viewer/2022062504/5af87ecb7f8b9a5f588cd796/html5/thumbnails/16.jpg)
2008Chapter-11 L03: "Embedded Systems - Architecture,
Programming and Design" , Raj Kamal, Publs.: McGraw-Hill, Inc.
16
Tasks and their scheduling sequence in TCP/IP Stack transmitting subsystem
![Page 17: Inc. VxWorks Lesson-3 1 - Devi Ahilya Vishwavidyalaya , …€¦ · The reader may refer to VxWorks Programmer’s Guide when using these APIs and ... End of Lesson-3 of chapter 11](https://reader035.vdocuments.us/reader035/viewer/2022062504/5af87ecb7f8b9a5f588cd796/html5/thumbnails/17.jpg)
2008Chapter-11 L03: "Embedded Systems - Architecture,
Programming and Design" , Raj Kamal, Publs.: McGraw-Hill, Inc.
17
Classes Classes for TCP or UDP byte for TCP or UDP byte treamtream on on TCP/IP networkTCP/IP network
� Task_TCP is an abstract class � Extended class(es) is derived to
create objects TCP or UDP packet streams to a network.
![Page 18: Inc. VxWorks Lesson-3 1 - Devi Ahilya Vishwavidyalaya , …€¦ · The reader may refer to VxWorks Programmer’s Guide when using these APIs and ... End of Lesson-3 of chapter 11](https://reader035.vdocuments.us/reader035/viewer/2022062504/5af87ecb7f8b9a5f588cd796/html5/thumbnails/18.jpg)
2008Chapter-11 L03: "Embedded Systems - Architecture,
Programming and Design" , Raj Kamal, Publs.: McGraw-Hill, Inc.
18
Classes Classes for TCP or UDP byte for TCP or UDP byte treamtream on on TCP/IP networkTCP/IP network
� Task_StrCheck is to check and get the string.
� Task_OutStream extends from the two classes Task_StrCheck and Task_TCP.
� Task_TCPSegment creates a stream from TCP segment for IP layer. When datagram is to be sent then Task_UDPDatagram creates a stream using from Task_OutStream output bytes.
![Page 19: Inc. VxWorks Lesson-3 1 - Devi Ahilya Vishwavidyalaya , …€¦ · The reader may refer to VxWorks Programmer’s Guide when using these APIs and ... End of Lesson-3 of chapter 11](https://reader035.vdocuments.us/reader035/viewer/2022062504/5af87ecb7f8b9a5f588cd796/html5/thumbnails/19.jpg)
2008Chapter-11 L03: "Embedded Systems - Architecture,
Programming and Design" , Raj Kamal, Publs.: McGraw-Hill, Inc.
19
Class Task_OutStream
![Page 20: Inc. VxWorks Lesson-3 1 - Devi Ahilya Vishwavidyalaya , …€¦ · The reader may refer to VxWorks Programmer’s Guide when using these APIs and ... End of Lesson-3 of chapter 11](https://reader035.vdocuments.us/reader035/viewer/2022062504/5af87ecb7f8b9a5f588cd796/html5/thumbnails/20.jpg)
2008Chapter-11 L03: "Embedded Systems - Architecture,
Programming and Design" , Raj Kamal, Publs.: McGraw-Hill, Inc.
20
task objectstask objects
� The task objects are instances of the classes (i) Task_StrCheck, (ii)Task_OutStream, (iii) Task_TCPSegment or Task_UDPDatagram, (iv) Task_IPPktStream (v) Task_NetworkDrv.
![Page 21: Inc. VxWorks Lesson-3 1 - Devi Ahilya Vishwavidyalaya , …€¦ · The reader may refer to VxWorks Programmer’s Guide when using these APIs and ... End of Lesson-3 of chapter 11](https://reader035.vdocuments.us/reader035/viewer/2022062504/5af87ecb7f8b9a5f588cd796/html5/thumbnails/21.jpg)
2008Chapter-11 L03: "Embedded Systems - Architecture,
Programming and Design" , Raj Kamal, Publs.: McGraw-Hill, Inc.
21
Object task_OutStreamAppl
![Page 22: Inc. VxWorks Lesson-3 1 - Devi Ahilya Vishwavidyalaya , …€¦ · The reader may refer to VxWorks Programmer’s Guide when using these APIs and ... End of Lesson-3 of chapter 11](https://reader035.vdocuments.us/reader035/viewer/2022062504/5af87ecb7f8b9a5f588cd796/html5/thumbnails/22.jpg)
2008Chapter-11 L03: "Embedded Systems - Architecture,
Programming and Design" , Raj Kamal, Publs.: McGraw-Hill, Inc.
22
4. Class diagrams4. Class diagrams
![Page 23: Inc. VxWorks Lesson-3 1 - Devi Ahilya Vishwavidyalaya , …€¦ · The reader may refer to VxWorks Programmer’s Guide when using these APIs and ... End of Lesson-3 of chapter 11](https://reader035.vdocuments.us/reader035/viewer/2022062504/5af87ecb7f8b9a5f588cd796/html5/thumbnails/23.jpg)
2008Chapter-11 L03: "Embedded Systems - Architecture,
Programming and Design" , Raj Kamal, Publs.: McGraw-Hill, Inc.
23
Class diagram for sending TCP/IP stack
![Page 24: Inc. VxWorks Lesson-3 1 - Devi Ahilya Vishwavidyalaya , …€¦ · The reader may refer to VxWorks Programmer’s Guide when using these APIs and ... End of Lesson-3 of chapter 11](https://reader035.vdocuments.us/reader035/viewer/2022062504/5af87ecb7f8b9a5f588cd796/html5/thumbnails/24.jpg)
2008Chapter-11 L03: "Embedded Systems - Architecture,
Programming and Design" , Raj Kamal, Publs.: McGraw-Hill, Inc.
24
5. Hardware architecture5. Hardware architecture
![Page 25: Inc. VxWorks Lesson-3 1 - Devi Ahilya Vishwavidyalaya , …€¦ · The reader may refer to VxWorks Programmer’s Guide when using these APIs and ... End of Lesson-3 of chapter 11](https://reader035.vdocuments.us/reader035/viewer/2022062504/5af87ecb7f8b9a5f588cd796/html5/thumbnails/25.jpg)
2008Chapter-11 L03: "Embedded Systems - Architecture,
Programming and Design" , Raj Kamal, Publs.: McGraw-Hill, Inc.
25
HardwareHardware
� TCP stack will run on same hardware as for the system which is networked with other system.
� Only additional hardware needed is memory for codes, data and queue for data streams, packets and sockets.
� A single TCP packet or UDP datagram is of maximum 216 bytes.
� 2 MB (512 × 216 bytes) RAM can be taken as additional memory requirement
![Page 26: Inc. VxWorks Lesson-3 1 - Devi Ahilya Vishwavidyalaya , …€¦ · The reader may refer to VxWorks Programmer’s Guide when using these APIs and ... End of Lesson-3 of chapter 11](https://reader035.vdocuments.us/reader035/viewer/2022062504/5af87ecb7f8b9a5f588cd796/html5/thumbnails/26.jpg)
2008Chapter-11 L03: "Embedded Systems - Architecture,
Programming and Design" , Raj Kamal, Publs.: McGraw-Hill, Inc.
26
6. Modeling of State diagram for of TCP/IP 6. Modeling of State diagram for of TCP/IP stack tasksstack tasks
![Page 27: Inc. VxWorks Lesson-3 1 - Devi Ahilya Vishwavidyalaya , …€¦ · The reader may refer to VxWorks Programmer’s Guide when using these APIs and ... End of Lesson-3 of chapter 11](https://reader035.vdocuments.us/reader035/viewer/2022062504/5af87ecb7f8b9a5f588cd796/html5/thumbnails/27.jpg)
2008Chapter-11 L03: "Embedded Systems - Architecture,
Programming and Design" , Raj Kamal, Publs.: McGraw-Hill, Inc.
27
State diagram for synchronization of TCP/IP stack tasks- Part 1
![Page 28: Inc. VxWorks Lesson-3 1 - Devi Ahilya Vishwavidyalaya , …€¦ · The reader may refer to VxWorks Programmer’s Guide when using these APIs and ... End of Lesson-3 of chapter 11](https://reader035.vdocuments.us/reader035/viewer/2022062504/5af87ecb7f8b9a5f588cd796/html5/thumbnails/28.jpg)
2008Chapter-11 L03: "Embedded Systems - Architecture,
Programming and Design" , Raj Kamal, Publs.: McGraw-Hill, Inc.
28
State diagram for synchronization of TCP/IP stack tasks- Part 2
![Page 29: Inc. VxWorks Lesson-3 1 - Devi Ahilya Vishwavidyalaya , …€¦ · The reader may refer to VxWorks Programmer’s Guide when using these APIs and ... End of Lesson-3 of chapter 11](https://reader035.vdocuments.us/reader035/viewer/2022062504/5af87ecb7f8b9a5f588cd796/html5/thumbnails/29.jpg)
2008Chapter-11 L03: "Embedded Systems - Architecture,
Programming and Design" , Raj Kamal, Publs.: McGraw-Hill, Inc.
29
7. Software architecture7. Software architecture
![Page 30: Inc. VxWorks Lesson-3 1 - Devi Ahilya Vishwavidyalaya , …€¦ · The reader may refer to VxWorks Programmer’s Guide when using these APIs and ... End of Lesson-3 of chapter 11](https://reader035.vdocuments.us/reader035/viewer/2022062504/5af87ecb7f8b9a5f588cd796/html5/thumbnails/30.jpg)
2008Chapter-11 L03: "Embedded Systems - Architecture,
Programming and Design" , Raj Kamal, Publs.: McGraw-Hill, Inc.
30
Software architecture TCP/IP Stack
![Page 31: Inc. VxWorks Lesson-3 1 - Devi Ahilya Vishwavidyalaya , …€¦ · The reader may refer to VxWorks Programmer’s Guide when using these APIs and ... End of Lesson-3 of chapter 11](https://reader035.vdocuments.us/reader035/viewer/2022062504/5af87ecb7f8b9a5f588cd796/html5/thumbnails/31.jpg)
2008Chapter-11 L03: "Embedded Systems - Architecture,
Programming and Design" , Raj Kamal, Publs.: McGraw-Hill, Inc.
31
8. Multiple tasks and their 8. Multiple tasks and their synchronization modelsynchronization model
![Page 32: Inc. VxWorks Lesson-3 1 - Devi Ahilya Vishwavidyalaya , …€¦ · The reader may refer to VxWorks Programmer’s Guide when using these APIs and ... End of Lesson-3 of chapter 11](https://reader035.vdocuments.us/reader035/viewer/2022062504/5af87ecb7f8b9a5f588cd796/html5/thumbnails/32.jpg)
2008Chapter-11 L03: "Embedded Systems - Architecture,
Programming and Design" , Raj Kamal, Publs.: McGraw-Hill, Inc.
32
Multiple tasks and their synchronization model using Multiple tasks and their synchronization model using semaphores and mailbox messages semaphores and mailbox messages
![Page 33: Inc. VxWorks Lesson-3 1 - Devi Ahilya Vishwavidyalaya , …€¦ · The reader may refer to VxWorks Programmer’s Guide when using these APIs and ... End of Lesson-3 of chapter 11](https://reader035.vdocuments.us/reader035/viewer/2022062504/5af87ecb7f8b9a5f588cd796/html5/thumbnails/33.jpg)
2008Chapter-11 L03: "Embedded Systems - Architecture,
Programming and Design" , Raj Kamal, Publs.: McGraw-Hill, Inc.
33
9. Tasks and their priority, action and 9. Tasks and their priority, action and IPCsIPCs
![Page 34: Inc. VxWorks Lesson-3 1 - Devi Ahilya Vishwavidyalaya , …€¦ · The reader may refer to VxWorks Programmer’s Guide when using these APIs and ... End of Lesson-3 of chapter 11](https://reader035.vdocuments.us/reader035/viewer/2022062504/5af87ecb7f8b9a5f588cd796/html5/thumbnails/34.jpg)
2008Chapter-11 L03: "Embedded Systems - Architecture,
Programming and Design" , Raj Kamal, Publs.: McGraw-Hill, Inc.
34
Application Layer Application Layer Task_StrCheckTask_StrCheck
� Priority─ 120� Action─ Get a string from the
application � IPC pending: ─� IPC posted: SemFlag1
![Page 35: Inc. VxWorks Lesson-3 1 - Devi Ahilya Vishwavidyalaya , …€¦ · The reader may refer to VxWorks Programmer’s Guide when using these APIs and ... End of Lesson-3 of chapter 11](https://reader035.vdocuments.us/reader035/viewer/2022062504/5af87ecb7f8b9a5f588cd796/html5/thumbnails/35.jpg)
2008Chapter-11 L03: "Embedded Systems - Architecture,
Programming and Design" , Raj Kamal, Publs.: McGraw-Hill, Inc.
35
Application Layer Application Layer Task_OutStreamTask_OutStream
� Priority ─ 121� Action─ Read string and put bytes into
an output stream � IPC pending: SemFlag1, SemFlag2� IPC posted: QStreamInputID
![Page 36: Inc. VxWorks Lesson-3 1 - Devi Ahilya Vishwavidyalaya , …€¦ · The reader may refer to VxWorks Programmer’s Guide when using these APIs and ... End of Lesson-3 of chapter 11](https://reader035.vdocuments.us/reader035/viewer/2022062504/5af87ecb7f8b9a5f588cd796/html5/thumbnails/36.jpg)
2008Chapter-11 L03: "Embedded Systems - Architecture,
Programming and Design" , Raj Kamal, Publs.: McGraw-Hill, Inc.
36
Transmission Control (Transport) Transmission Control (Transport) Task_TCPSegmentTask_TCPSegment
� Priority ─ 122� Action─ Insert TCP header to the
stream � IPC pending: SemTCPFlag,
SemMKey1, QStreamInputID� IPC posted: QStreamInputID and
SemMKey1
![Page 37: Inc. VxWorks Lesson-3 1 - Devi Ahilya Vishwavidyalaya , …€¦ · The reader may refer to VxWorks Programmer’s Guide when using these APIs and ... End of Lesson-3 of chapter 11](https://reader035.vdocuments.us/reader035/viewer/2022062504/5af87ecb7f8b9a5f588cd796/html5/thumbnails/37.jpg)
2008Chapter-11 L03: "Embedded Systems - Architecture,
Programming and Design" , Raj Kamal, Publs.: McGraw-Hill, Inc.
37
Transmission Control (Transport) Transmission Control (Transport) Task_UDPDatagramTask_UDPDatagram
� Priority ─ 122� Action─ Insert UDP header to the
stream sent as a datagram � IPC pending: SemUDPFlag,
SemMKey1, QStreamInputID� IPC posted: QStreamInputID, SemM-
Key1
![Page 38: Inc. VxWorks Lesson-3 1 - Devi Ahilya Vishwavidyalaya , …€¦ · The reader may refer to VxWorks Programmer’s Guide when using these APIs and ... End of Lesson-3 of chapter 11](https://reader035.vdocuments.us/reader035/viewer/2022062504/5af87ecb7f8b9a5f588cd796/html5/thumbnails/38.jpg)
2008Chapter-11 L03: "Embedded Systems - Architecture,
Programming and Design" , Raj Kamal, Publs.: McGraw-Hill, Inc.
38
internet (network) layer internet (network) layer Task_IPPktStreamTask_IPPktStream
� Priority ─ 124� Action─ Form the packets of
maximum 216 bytes � IPC pending: SemMKey1,
QStreamInputID� IPC posted: SemMKey1, SemPktFlag,
QPktInputID
![Page 39: Inc. VxWorks Lesson-3 1 - Devi Ahilya Vishwavidyalaya , …€¦ · The reader may refer to VxWorks Programmer’s Guide when using these APIs and ... End of Lesson-3 of chapter 11](https://reader035.vdocuments.us/reader035/viewer/2022062504/5af87ecb7f8b9a5f588cd796/html5/thumbnails/39.jpg)
2008Chapter-11 L03: "Embedded Systems - Architecture,
Programming and Design" , Raj Kamal, Publs.: McGraw-Hill, Inc.
39
Task_NetworkDrvTask_NetworkDrv
� Priority ─ 124� Action─ Send the packets as the
frames � IPC pending: SemPktFlag,
QPktInputID, SemMKey1 � IPC posted: SemFinishFlag, SemFlag2
![Page 40: Inc. VxWorks Lesson-3 1 - Devi Ahilya Vishwavidyalaya , …€¦ · The reader may refer to VxWorks Programmer’s Guide when using these APIs and ... End of Lesson-3 of chapter 11](https://reader035.vdocuments.us/reader035/viewer/2022062504/5af87ecb7f8b9a5f588cd796/html5/thumbnails/40.jpg)
2008Chapter-11 L03: "Embedded Systems - Architecture,
Programming and Design" , Raj Kamal, Publs.: McGraw-Hill, Inc.
40
10. Coding using VxWorks RTOS IPC functions
![Page 41: Inc. VxWorks Lesson-3 1 - Devi Ahilya Vishwavidyalaya , …€¦ · The reader may refer to VxWorks Programmer’s Guide when using these APIs and ... End of Lesson-3 of chapter 11](https://reader035.vdocuments.us/reader035/viewer/2022062504/5af87ecb7f8b9a5f588cd796/html5/thumbnails/41.jpg)
2008Chapter-11 L03: "Embedded Systems - Architecture,
Programming and Design" , Raj Kamal, Publs.: McGraw-Hill, Inc.
41
Coding using Coding using VxWorksVxWorks RTOSRTOS
• Refer Example 11.2 in Section 11.3.4• At each step the explanation for the set of statements given there.
![Page 42: Inc. VxWorks Lesson-3 1 - Devi Ahilya Vishwavidyalaya , …€¦ · The reader may refer to VxWorks Programmer’s Guide when using these APIs and ... End of Lesson-3 of chapter 11](https://reader035.vdocuments.us/reader035/viewer/2022062504/5af87ecb7f8b9a5f588cd796/html5/thumbnails/42.jpg)
2008Chapter-11 L03: "Embedded Systems - Architecture,
Programming and Design" , Raj Kamal, Publs.: McGraw-Hill, Inc.
42
SummarySummary
![Page 43: Inc. VxWorks Lesson-3 1 - Devi Ahilya Vishwavidyalaya , …€¦ · The reader may refer to VxWorks Programmer’s Guide when using these APIs and ... End of Lesson-3 of chapter 11](https://reader035.vdocuments.us/reader035/viewer/2022062504/5af87ecb7f8b9a5f588cd796/html5/thumbnails/43.jpg)
2008Chapter-11 L03: "Embedded Systems - Architecture,
Programming and Design" , Raj Kamal, Publs.: McGraw-Hill, Inc.
43
We learntWe learnt� TCP stack generation is modeled by class
Task_TCP, which is an abstract class from which the extended class (es) is derived to create TCP or UDP packet to a socket.
� The task objects are instances of the classes (i) Task_StrCheck, (ii)Task_OutStream, (iii) Task_TCPSegment or Task_UDPDatagram, (iv) Task_IPPktStream (v) Task_NetworkDrv
![Page 44: Inc. VxWorks Lesson-3 1 - Devi Ahilya Vishwavidyalaya , …€¦ · The reader may refer to VxWorks Programmer’s Guide when using these APIs and ... End of Lesson-3 of chapter 11](https://reader035.vdocuments.us/reader035/viewer/2022062504/5af87ecb7f8b9a5f588cd796/html5/thumbnails/44.jpg)
2008Chapter-11 L03: "Embedded Systems - Architecture,
Programming and Design" , Raj Kamal, Publs.: McGraw-Hill, Inc.
44
We learntWe learnt� VxWorks RTOS used for embedded
system codes for driving a network card after generating the TCP/IP stack.
� Exemplary codes show a method of code designing for sending the byte streams on a network.
![Page 45: Inc. VxWorks Lesson-3 1 - Devi Ahilya Vishwavidyalaya , …€¦ · The reader may refer to VxWorks Programmer’s Guide when using these APIs and ... End of Lesson-3 of chapter 11](https://reader035.vdocuments.us/reader035/viewer/2022062504/5af87ecb7f8b9a5f588cd796/html5/thumbnails/45.jpg)
2008Chapter-11 L03: "Embedded Systems - Architecture,
Programming and Design" , Raj Kamal, Publs.: McGraw-Hill, Inc.
45
End of Lesson-3 of chapter 11 onCASE STUDY OF CODING FOR SENDING CASE STUDY OF CODING FOR SENDING
APPLICATION LAYER BYTE STREAMS ON APPLICATION LAYER BYTE STREAMS ON A TCP/IP NETWORK USING RTOS VxWorksA TCP/IP NETWORK USING RTOS VxWorks