Previous Tip  |  Next Tip  |  Design Tips   | [Bill's Home]

130. Enhancing the emulator

The key to any emulator is to make it feel like the real thing. Unfortunately the real thing requires a great deal of programming, so it is important that the user it either guided through the emulator in a defined way or that emulator displays which of the commands are not currently emulated. The following should indentify if the user has selected a given command. If the command is not yet implemented, the emulator should show the message: Not yet implemented. Please check back later. For example, type ? and view the avialable commands in this mode. If you enter session, the emulator should show the Not yet implemented message.

[Expand]

This is achieved by:

str=cmdline;
str=str.toLowerCase();

args=str.split(" ");
str=args[0];

.... code missed out

else if (level==4 && str=="autobaud" ) { msg="Not yet implemented. Check back soon<BR>"; }
else if (level==2 && str=="back-pressure" ) { msg="Not yet implemented. Check back soon<BR>"; }
else if (level==2 && str=="bridge" ) { msg="Not yet implemented. Check back soon<BR>"; }
else if (level==2 && str=="bridge-group" ) { msg="Not yet implemented. Check back soon<BR>"; }
else if (level==3 && str=="cdp" ) { msg="Not yet implemented. Check back soon<BR>"; }
else if (level==2 && str=="cgmp" ) { msg="Not yet implemented. Check back soon<BR>"; }
else if (level==1 && str=="clear" ) { msg="Not yet implemented. Check back soon<BR>"; }
else if (level==1 && str=="copy") { msg="Not yet implemented. Check back soon<BR>"; }
else if (level==4 && str=="databits" ) { msg="Not yet implemented. Check back soon<BR>"; }
else if (level==2 && str=="delete" ) { msg="Not yet implemented. Check back soon<BR>"; }
else if (level==3 && str=="description" ) { msg="Not yet implemented. Check back soon<BR>"; }
else if (level==1 && str=="disable" ) { msg="Not yet implemented. Check back soon<BR>"; }
else if (level==3 && str=="duplex" ) { msg="Not yet implemented. Check back soon<BR>"; }
else if (level==2 && str=="ecc" ) { msg="Not yet implemented. Check back soon<BR>"; }
else if (level==3 && str=="fddi" ) { msg="Not yet implemented. Check back soon<BR>"; }
else if (level==3 && str=="help" ) { msg="Not yet implemented. Check back soon<BR>"; }
else if (level==2 && str=="ip" ) { msg="Not yet implemented. Check back soon<BR>"; }
else if (level==2 && str=="line" ) { msg="Not yet implemented. Check back soon<BR>"; }
else if (level==2 && str=="login" ) { msg="Not yet implemented. Check back soon<BR>"; }
else if (level==2 && str=="mac-address-table" ) { msg="Not yet implemented. Check back soon<BR>"; }
else if (level==1 && str=="menu" ) { msg="Not yet implemented. Check back soon<BR>"; }
else if (level==4 && str=="modem" ) { msg="Not yet implemented. Check back soon<BR>"; }
else if (level==2 && str=="monitor-port" ) { msg="Not yet implemented. Check back soon<BR>"; }
else if (level==2 && str=="multicast-store-and-forward" ) { msg="Not yet implemented. Check back soon<BR>"; }
else if (level==2 && str=="network-port" ) { msg="Not yet implemented. Check back soon<BR>"; }
else if (level==3 && str=="no" ) { msg="Not yet implemented. Check back soon<BR>"; }
else if (level==3 && str=="pagp-port-priority" ) { msg="Not yet implemented. Check back soon<BR>"; }
else if (level==4 && str=="parity" ) { msg="Not yet implemented. Check back soon<BR>"; }
else if (level==0 && str=="ping" ) { msg="Not yet implemented. Check back soon<BR>"; }
else if (level==3 && str=="port" ) { msg="Not yet implemented. Check back soon<BR>"; }
else if (level==2 && str=="port-channel" ) { msg="Not yet implemented. Check back soon<BR>"; }
else if (level==3 && str=="port" ) { msg="Not yet implemented. Check back soon<BR>"; }
else if (level==1 && str=="reload" ) { msg="Not yet implemented. Check back soon<BR>"; }
else if (level==2 && str=="rip" ) { msg="Not yet implemented. Check back soon<BR>"; }
else if (level==2 && str=="service" ) { msg="Not yet implemented. Check back soon<BR>"; }
else if (level==0 && str=="session" ) { msg="Not yet implemented. Check back soon<BR>"; }
else if (level==1 && str=="show" ) { msg="Not yet implemented. Check back soon. Try show ?<BR>"; }
else if (level==3 && str=="shutdown" ) { msg="Not yet implemented. Check back soon<BR>"; }
else if (level==2 && str=="snmp-server" ) { msg="Not yet implemented. Check back soon<BR>"; }
else if (level==3 && str=="spantree" ) { msg="Not yet implemented. Check back soon<BR>"; }
else if (level==3 && str=="spantree-option" ) { msg="Not yet implemented. Check back soon<BR>"; }
else if (level==4 && str=="speed" ) { msg="Not yet implemented. Check back soon<BR>"; }
else if (level==4 && str=="stopbits" ) { msg="Not yet implemented. Check back soon<BR>"; }
else if (level==2 && str=="storm-control" ) { msg="Not yet implemented. Check back soon<BR>"; }
else if (level==2 && str=="switching-mode" ) { msg="Not yet implemented. Check back soon<BR>"; }
else if (level==2 && str=="tacacs-server" ) { msg="Not yet implemented. Check back soon<BR>"; }
else if (level==0 && str=="terminal" ) { msg="Not yet implemented. Check back soon<BR>"; }
else if (level==2 && str=="tftp" ) { msg="Not yet implemented. Check back soon<BR>"; }
else if (level==3 && str=="trunk" ) { msg="Not yet implemented. Check back soon<BR>"; }
else if (level==3 && str=="trunk-vlan" ) { msg="Not yet implemented. Check back soon<BR>"; }
else if (level==2 && str=="uplink-fast" ) { msg="Not yet implemented. Check back soon<BR>"; }
else if (level==2 && str=="vlan" ) { msg="Not yet implemented. Check back soon<BR>"; }
else if (level==3 && str=="vlan-membership" ) { msg="Not yet implemented. Check back soon<BR>"; }
else if (level==2 && str=="vtp" ) { msg="Not yet implemented. Check back soon<BR>"; }

else { msg= textmsg[1]; }