Network Designer

Authors

Details

Programming Language: Java

Tools: Maven2, Netbeans GUI Builder

Libraries: prefuse

svn: http://apatrz.org/svn/arkadius/netwdesign/

Short description

Integreted environmetn (compiler + editor) to computer network's projecting. You can make this by easy and intuitive language.

Application using prefuse library to drawing graph of network. It doesn't use analyzer generators because of this, it shows how from beginning to the end make simple compiler.

Example code

define StdKomp ("processor" = "AMD Athlon 2.7GHz",
		"RAM" = "1GB",
                "disk" = "80 GB") extends Desktop;
 
define StdSerwer (  "processor" = "Intel Pentium Core Quatro 2.4GHz",
                    "RAM" = "4GB",
                    "disk" = "200GB") extends Server;
 
define SubLan () {
    comp1 () extends StdKomp;
    comp2 () extends StdKomp;
    comp3 () extends StdKomp;
 
    comp1, comp2, comp3 <> *;
}
 
define Lan ("topology" = "star") {
    comp1 () extends StdKomp;
    comp2 () extends StdKomp;
    comp3 () extends StdKomp;
    comp4 () extends StdKomp;
    comp5 () extends StdKomp;
    comp6 () extends StdKomp;
    comp7 () extends StdKomp;
    printer () extends Printer;
    lan () extends SubLan;
    switch ("prducent" = "HP") extends Switch;
 
    switch <> comp1, comp2, comp3, comp4, comp5, comp6, comp7, printer;
    switch <> lan.comp1;
}
 
lan ("deskription" = "\"Some description\"") {
 
    lan1 () extends Lan;
    lan2 () extends Lan;
 
    serv1 () extends StdSerwer;
    serv2 () extends StdSerwer;
 
    apoint ("producent" = "Dell") extends AccessPoint;
 
    lan1.switch <> lan2.switch <> ^;
    apoint <> lan1.switch, serv1, serv2;
}
 
serv1 () extends StdSerwer;
serv2 () extends StdSerwer;
serv3 () extends StdSerwer;
serv4 () extends StdSerwer;
 
socket ("provider" = "SomeProvider") extends Socket;
 
serv1 <> serv2 <> serv3 <> serv4 <> ^;
 
socket <> lan.apoint, serv1;

Upper code shows wide functionality of language. At first you can put simple definitions which extends predefined definitions of computer, switch or other. Next, there are definitions of networks. All of definitions can be used below them.

In this part, there are sub-networks and main network which use defined elements of network. Sub-networks and main network can define connections between parts of network.

Operator <> means “every at left connected with every at right”
Operator * means “the same as at the left side”
Operator ^ means “first element in expression”

These operators are helpful in creation of standart topologies of network: star, token ring and other.

Screenshots

Editor

Graph

Detailed description

en/projects/netwdesign/main.txt · Last modified: 2010/07/25 18:16 (external edit)
Recent changes RSS feed Creative Commons License Donate Driven by DokuWiki