[Fun] [Bayfront Technologies] [Just for Fun]

DataXfer Protocol Simulation in JavaScript

DataXfer is a simplex data exchange protocol. It was developed for our documentation to demonstrate the use of timers. It is not robust and will abort the transfer on most errors. Only errors in data transmission are handled and retried. Even for this simple protocol the description is complex.

The Bayfront CAPE Tools™ compile the DataXfer protocol PDL and generate C code output files. These C files were hand converted to JavaScript, a C-like language for web page interaction control, and inserted on a web page. You can see the JavaScript source code by viewing the source of this page which is embedded in frames on the simulator page. You can see the JavaScript code is very similar to the raw C CAPE output code shown in Application Note 5.

The actions and decisions invoked by the executing protocol would usually call your linked routines. For purposes of simulation these actions and decisions are shown as text messages. Decisions will stop and ask for a yes/no confirmation. The technique used is general and could be used to build sophisticated web page interactions with JavaScript timers based on user interaction protocols.

How to Run the Simulation

To operate the simulation select a state, select an event, and press the "GO" button. The state transition diagram and current state SDL flow diagram produced by the CAPE tools during compilation are displayed to guide your choices. The SDL diagram will change as the protocol changes states. If the protocol is executing properly, you should be able to follow the actions and decisions invoked by the executing protocol in the SDL diagram.

Full operation this simulation requires a web browser with frames and JavaScript enabled. If a link to the simulation does not appear below, then your browser may have JavaScript disabled or it is unable to display frames.

[index] Back to index page
Valid HTML 4.01 Transitional
copyright © 2008 Bayfront Technologies, Inc.