Проектування мережі Ethernet, страница 6

if (min1<mini) {mini=min1;fl=2;}

}

setcolor(GREEN);

circle(1.4*(g-3),1.4*(h-dh+3),2);

setcolor(WHITE);

rectangle(1.4*(g-7),1.4*(h-dh-4),1.4*(g-5),1.4*(h-dh-2));

rectangle(1.4*(g-3),1.4*(h-dh-4),1.4*(g-1),1.4*(h-dh-2));

rectangle(1.4*(g+1),1.4*(h-dh-4),1.4*(g+3),1.4*(h-dh-2));

}

void drawopto(void)

{setcolor(BROWN);

line(1.4*(a-10),1.4*(s+4),1.4*(a-10),1.4*(h-dh-3));

line(1.4*(a-10),1.4*(h-dh-3),1.4*(g-7),1.4*(h-dh-3));

line(1.4*(c-1),1.4*(p+4),1.4*(c-1),1.4*(s+20));

line(1.4*(c-1),1.4*(s+20),1.4*(g-2),1.4*(s+20));

line(1.4*(g-2),1.4*(s+20),1.4*(g-2),1.4*(h-dh-5));

line(1.4*(f+2),1.4*(m-dm/2-6),1.4*(f+2),1.4*(h-dh-3));

line(1.4*(f+2),1.4*(h-dh-3),1.4*(g+3),1.4*(h-dh-3));

}

void oboznach(void)

{settextstyle(TRIPLEX_FONT,HORIZ_DIR,4);

outtextxy(400,30,"-3 fl");

outtextxy(400,40,"-2 fl");

outtextxy(400,50,"-1 fl");

outtextxy(400,60,"-Hub(switch) on n-th fl");

outtextxy(400,70,"-transiver");

outtextxy(400,80,"-optovolokno");

setcolor(GREEN);

circle(390,43,4);

setcolor(WHITE);

rectangle(390,71,392,73);

setcolor(MAGENTA);

circle(390,53,3);

setcolor(RED);

circle(390,31,5);

setcolor(LIGHTGRAY);

circle(390,63,2);

setcolor(BROWN);

line(385,83,390,83);

}

void dlinasegmentov234(void)

{printf("Dlina segmentov v zdaniah:\n");

printf("5-H: %d m\n",int(ds+1));

dlina+=int(ds+1);

printf("6-H: %d m\n",int(3+ds/2+da));

dlina+=int(3+ds/2+da);

printf("7-H: %d m\n",int(da+3));

dlina+=int(da+3);

printf("8-H: %d m\n",int(1));

dlina+=int(1);

printf("9-S: %d m\n",int(3+dm/2-1));

dlina+=int(3+dm/2-1);

printf("10-S: %d m\n",int(df+dm/2-1));

dlina+=int(df+dm/2-1);

printf("11-S: %d m\n",int(3+df/2|dm/2+1));

dlina+=int(3+df/2|dm/2+1);

printf("12-S: %d m\n",int(1));

dlina+=int(1);

printf("13-S: %d m\n",int(3));

dlina+=int(3);

printf("14-S: %d m\n",int(dg));

dlina+=int(dg);

printf("15-S: %d m\n",int(dg/2+dh));

dlina+=int(dg/2+dh);

printf("16-S: %d m\n",dh+3);

dlina+=dh+3;

printf("dlina vit par: %dm\n",dlina);

printf("dlina koaksial (1->2->3->4->H): %dm\n",int (dc+dp/2+dp/2+3+dc+6));

dlina=0;

dlina=g-a+1+k-s;

dlina+=k-p+g-b;

dlina+=k-m+dm/2+1+f-g;

printf("dlina optovolokna: %dm\n",dlina);

float cena=0;

getch();

clrscr();

printf("Цена оборудования:\n\n\n");

printf("Сетевые адаптеры для коаксиала(4шт):");

printf("Surecom Combo PCI  -  %f\n",8.10*4*5.35);cena+=8.10*4*5.35;

printf("Сетевые адаптеры для витой пары(12шт):");

printf("SurecomEP-320x R1 10/100Mb/s - %f\n",9*12*5.35);cena+=9*12*5.35;

printf("Switch 5 Port CargonCN 310 10/100Mb/s (2шт):%f\n",20*2*5.35);cena+=20*2*5.35;

printf("Switch 8 Port Planet 10/100Mb/s (1шт):%f\n",30*1*5.35);cena+=30*1*5.35;

printf("Hub 5 Port Genius PCI (3шт):%f\n",24*3*5.35);cena+=24*3*5.35;

printf("Трансивер ET 118 Ethernet Fiber Optic (6шт):%f\n",104*6*5.35);cena+=104*6*5.35;

printf("BNC разьем (8шт):%f\n",0.58*8*5.35);cena+=0.58*8*5.35;

printf("T-конектор (5шт):%f\n",0.59*9*5.35);cena+=0.59*9*5.35;

printf("Заглушка (50 Ом) (2шт):%f\n",0.27*2*5.35);cena+=0.27*2*5.35;

printf("Конектор RJ-45 (24шт):%f\n",0.10*24*5.35);cena+=0.1*24*5.35;

printf("Кабель UTP 5кат. неэк. 755м:%f\n",0.14*755*5.35);cena+=0.14*755*5.35;

printf("Оптоволокно MM 850нм 662м:%f\n",1.7*662*5.35);cena+=1.7*662*5.35;

printf("Кабель RG-58 79м:%f\n\n\n",0.15*79*5.35);cena+=0.15*79*5.35;

printf("ОБЩАЯ СТОИМОСТЬ ОБОРУДОВАНИЯ:   %fгрн.",cena);

}

void aa(void)

{clrscr();

initgr();

outtextxy(200,5,"Pri min dline optovolokna");

settextstyle(TRIPLEX_FONT,HORIZ_DIR,4);

outtextxy(400,30,"-3 fl");

outtextxy(400,40,"-2 fl");

outtextxy(400,50,"-1 fl");