Welcome to Scribd, the world's digital library. Read, publish, and share books and documents. See more ➡
Download
Standard view
Full view
of .
Add note
Save to My Library
Sync to mobile
Look up keyword
Like this
3Activity
×
0 of .
Results for:
No results containing your search query
P. 1
Guide to Embedded System Architecture - Part2 PPstate Pseudo Code and Internet Protocol

Guide to Embedded System Architecture - Part2 PPstate Pseudo Code and Internet Protocol

Ratings: (0)|Views: 431|Likes:
Published by charliesteven

More info:

Categories:Topics, Art & Design
Published by: charliesteven on Jun 13, 2010
Copyright:Attribution Non-commercial

Availability:

Read on Scribd mobile: iPhone, iPad and Android.
download as PDF, TXT or read online from Scribd
See More
See less

04/09/2013

pdf

text

original

 
 
Part of the EE Times Network 
 
Top news from EE Times:
ST-Ericsson launches feature-rich mobile internet platform in China
 
All
Articles
Products
Course
TechPaper 
Webinars
Thursday, June 10, 2010
Guide to Embedded Systems Architecture - Part 2: PPP state pseudocode and Internet Protocol
Part 2 of an excerpt from the book "Embedded Systems Architecture: A Comprehensive Guide for Engineers and Programmers" offers pseudocode examples for PPPLink Control Protocol states and a look at the IP networking layer protocol.
 
 Part 1of this article begins by defining "middleware" and looking at some networking middleware driver examples.]
 
 PPP (LCP) State Pseudocode
 
 Initial 
: PPP link is in the Initial state, the lower layer is unavailable (Down), and no Open event has occurred. The Restart timer is not running in the Initial state.
[10-1]
 
 Starting 
: The Starting state is the Open counterpart to the Initial state. An administrative Open has been initiated, but the lower layer is still unavailable (Down). The Restart timer isot running in the Starting state. When the lower layer becomes available (Up), a Configure-Request is sent.
[10-1]
 
 Login 
|
 Register Welcome, Guest
HOME 
DESIGN 
FORUMS 
E-LEARNING 
PRODUCTS 
 
Page 1 of 9Guide to Embedded Systems Architecture - Part 2: PPP state pseudocode and Internet Protocol6/10/2010http://www.embeddedinternetdesign.com/dhandler.jhtml;jsessionid=NLRAM4NMLSHKVQE1GHOSKHWAT...
 
Closed 
: In the Closed state, the link is available (Up), but no Open has occurred. The Restart timer is not running in the Closed state. Upon reception of Configure-Request packets, aTerminate-Ack is sent. Terminate-Acks are silently discarded to avoid creating a loop.
[10-1]
 
 Stopped 
: The Stopped state is the Open counterpart to the Closed state. It is entered when the automaton is waiting for a Down event after the This-Layer-Finished action, or after sending a Terminate-Ack. The Restart timer is not running in the Stopped state.
[10-1]
 
Closing 
: In the Closing state, an attempt is made to terminate the connection. A Terminate-Request has been sent and the Restart timer is running, but a Terminate-Ack has not yet been received. Upon reception of a Terminate-Ack, the Closed state is entered. Upon the expiration of the Restart timer, a new Terminate-Request is transmitted, and the Restarttimer is restarted. After the Restart timer has expired Max-Terminate times, the Closed state is entered.
[10-1]
 starting() {if (event) {= UP:irc(event); //actionscr(true); //actiontransition(REQSENT); //transition to REQSENT stateend UP;= OPEN:end OPEN; //no action or state transition= CLOSE:tlf(); //actiontransition(INITIAL); //transition to initial stateend CLOSE;= any other event :wrongEvent++; //indicate that when PPP in starting state no other event is processed}}closed (){if (event) {= DOWN :transition(INITIAL) ; //transition to initial stateend DOWN;= OPEN :irc(event); //actionscr(true); //actiontransition(REQSENT); //transition to REQSENT stateend OPEN;= RCRP, RCRN, RCA, RCN, or RTR:sta(... ); //actionend EVENT;= RTA, RXJP, RXR, CLOSE :end EVENT; //no action or state transition= RUC:scj(... ); //actionend RUC;= RXJN:tlf(); //actionend RXJN;= any other event :wrongEvent; //indicate that when PPP in closed state no other event is processed}}stopped (){if (event) {= DOWN : tls(); //actiontransition(STARTING) ; //transition to starting stateend DOWN;= OPEN : initializeLink(); //initialize variablesend OPEN;= CLOSE : transition(CLOSED) ; //transition to closed stateend CLOSE;= RCRP : irc(event); //actionscr(true); //actionsca(... ); //actiontransition(ACKSENT) ; //transition to ACKSENT stateend RCRP;= RCRN : irc(event); //actionscr(true); //actionscn(... ); //actiontransition(REQSENT) ; //transition to REQSENT stateend RCRN;= RCA ,RCN or RTR : sta(... ); //actionend EVENT;= RTA, RXJP, or RXR :end EVENT;= RUC : scj(... ); //actionend RUC;= RXJN : tlf(); //actionend RXJN;= any other event :wrongEvent; //indicate that when PPP in stopped state no other event is processed}}
Page 2 of 9Guide to Embedded Systems Architecture - Part 2: PPP state pseudocode and Internet Protocol6/10/2010http://www.embeddedinternetdesign.com/dhandler.jhtml;jsessionid=NLRAM4NMLSHKVQE1GHOSKHWAT...
 
 Stopping 
: The Stopping state is the Open counterpart to the Closing state. A Terminate-Request has been sent and the Restart timer is running, but a Terminate-Ack has not yet beenreceived.
[10-1]
 
 Request-Sent 
: In the Request-Sent state an attempt is made to configure the connection. A Configure-Request has been sent and the Restart timer is running, but a Configure-Ack hasnot yet been received nor has one been sent.
[10-1]
 closing (){if (event) {= DOWN : transition(INITIAL) ; //transition to initial stateend DOWN;= OPEN : transition(STOPPING); //transition to stopping stateinitializeLink(); //initialize variablesend OPEN;= TOP : str(... ); //actioninitializePPPTimer; //initialize PPP Timer variableend TOP;= TON : tlf(); //actioninitializePPPTimer; //initialize PPP Timer variabletransition(CLOSED); //transition to CLOSED stateend TON;= RTR : sta(... ); //actionend RTR;= CLOSE, RCRP, RCRN, RCA,RCN, RXR, or RXJP:end EVENT; //no action or state transition= RTA : tlf(); //actiontransition(CLOSED); //transition to CLOSED stateend RTA;= RUC : scj(... ); //actionend RUC;= RXJN : tlf(); //actionend RXJN;= any other event :wrongEvent; //indicate that when PPP in closing state no other event is processed}}stopping (){if (event) {= DOWN : transition(STARTING) ; //transition to STARTING stateend DOWN;= OPEN : initializeLink(); //initialize variablesend OPEN;= CLOSE : transition(CLOSING); //transition to CLOSE stateend CLOSE;= TOP : str(... .); //actioninitialize PPPTimer(); //initialize PPP timer end TOP;= TON : tlf(); //actioninitialize PPPTimer(); //initialize PPP timer transition(STOPPED); //transition to STOPPED stateend TON;= RCRP, RCRN, RCA , RCN, RXJP, RXR :end EVENT; // no action or state transition= RTR : sta(... ); //actionend RTR;= RTA : tlf(); //actiontransition(STOPPED); //transition to STOPPED stateend RTA;= RUC : scj(... ); //actionend RUC;= RXJN : tlf(); //actiontransition(STOPPED); //transition to STOPPED stateend RXJN;= any other event :wrongEvent; //indicate that when PPP in stopping state no other event is processed}}reqsent (){if (event) {= DOWN : transition(STARTING); //transition to STARTING stateend DOWN;= OPEN : transition(REQSENT); //transition to REQSENT stateend OPEN;= CLOSE : irc(event); //actionstr(... ); //actiontransition(CLOSING); //transition to closing stateend CLOSE;= TOP : scr(false); //actioninitialize PPPTimer(); //initialize PPP timer end TOP;= TON, RTA, RXJP, or RXR :end EVENT; //no action or state transition= RCRP : sca(... ); //action if (PAP= Server) { tlu(); //action
Page 3 of 9Guide to Embedded Systems Architecture - Part 2: PPP state pseudocode and Internet Protocol6/10/2010http://www.embeddedinternetdesign.com/dhandler.jhtml;jsessionid=NLRAM4NMLSHKVQE1GHOSKHWAT...

You're Reading a Free Preview

Download
/*********** DO NOT ALTER ANYTHING BELOW THIS LINE ! ************/ var s_code=s.t();if(s_code)document.write(s_code)//-->