#1
  1. Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Jul 2001
    Location
    world
    Posts
    293
    Rep Power
    13

    Question interface for code


    Hi, I want to do an interface, with text boxes in Visual C++ such that I can enter my data in that text box, and then click on the submit button,
    as the data goes in the program should accept it and start running.

    Thanks in advance,

    below are my codes:

    got to make changes to give input in this Pstatic.pp file and Peql.cpp //file.The inputs are: /* Get buffer length for each traffic type buffer */
    // QVBRVoD.FgetBL(1200);
    // QCLD.FgetBL(100);
    // QVBRVi.FgetBL(1200);
    // QCOD.FgetBL(3294967295); /* ULONG_MAX value */
    //1200,100,1200 and 3294 are the variable bit rate to change.You can see this //command below and in Peql.cpp file.

    Pstatic.cpp
    /************************************************************
    * *
    * Static Bandwidth Allocation *
    * *
    *************************************************************/

    #include <stdlib.h>
    #include <conio.h>
    #include <fstream.h>
    #include <iostream.h>
    #include <limits.h>
    #include <math.h>
    #include <time.h>
    #include <stddef.h>

    ofstream fPout, fSout, fQout, fQDout, fBWout, fout, ft;

    #include "c:/office/master/program/queue.h"
    #include "c:/office/master/program/source.h"
    #include "c:/office/master/program/strategy.h"

    void main()
    {
    #include "c:/office/master/program/declare.h"

    /* Get buffer length for each traffic type buffer */
    QVBRVoD.FgetBL(1200);
    QCLD.FgetBL(100);
    QVBRVi.FgetBL(1200);
    QCOD.FgetBL(3294967295); /* ULONG_MAX value */

    /* simulate for Time slots seconds */
    /* To get and validate the whole parameters table, set slot <= 200 to avoid large output files*/
    /* Else to get only results set slot <= 2000000 */
    for (slot = 0; slot <= 2000000; /*4294967295*/ slot++) {
    if (slot == 20000) {
    #include "c:/office/master/program/init.h"
    }

    #include "c:/office/master/program/check.h"
    #include "c:/office/master/program/tran-a.h"

    /* Start new BW allocation cycle */
    if (slot == BW.Fnext()) {
    /* This block is for static BW allocation */
    BW.FcalBW(slot);
    };

    BLVBRVoD += QVBRVoD.FgetQL();
    BLVBRVi += QVBRVi.FgetQL();
    BLCLD += QCLD.FgetQL();
    BLCOD += QCOD.FgetQL();
    };

    #include "c:/office/master/program/result.h"
    }

    Peql.cpp
    /****************************************************************
    * *
    * Bandwidth Allocated Proportional to Expected Queue Length *
    * *
    *****************************************************************/

    #include <stdlib.h>
    #include <conio.h>
    #include <fstream.h>
    #include <iostream.h>
    #include <limits.h>
    #include <math.h>
    #include <time.h>
    #include <stddef.h>

    ofstream fPout, fSout, fQout, fQDout, fBWout, fout, ft;

    #include "c:\office\master\program\source.h"
    #include "c:\office\master\program\queue.h"
    #include "c:\office\master\program\strategy.h"

    void main()
    {
    unsigned long BL1, BL2, temp;
    #include "c:\office\master\program\declare.h"

    /* BL1, Buffer length VBRVoD, VBRVi */
    /* BL2, Buffer length CLD */
    BL1 = 1400;
    BL2 = 100;
    //TBL = 2*BL1 + BL2;
    /* Get buffer length for each traffic type buffer */
    QVBRVoD.FgetBL(1400);
    QCLD.FgetBL(100);
    QVBRVi.FgetBL(1400);
    QCOD.FgetBL(3294967295); /* ULONG_MAX value = 4294967295*/

    /* simulate for Time slots seconds */
    /* To get and validate the whole parameters table, set slot <= 200 to avoid large output files*/
    /* Else to get only results set slot <= 2000000 */
    for (slot = 0; slot <= 200; /*4294967295*/ slot++) {
    if (slot == 20000) {
    #include "c:\office\master\program\init.h"
    }

    #include "c:\office\master\program\check.h"
    #include "c:\office\master\program\tran-a.h"

    /* Start new BW allocation cycle */
    if (slot == BW.Fnext()) {
    /* This block is for BW allocation prop. to expected QL */
    QLVBRVoD += QVBRVoD.FgetQL();
    if (QLVBRVoD > BL1)
    QLVBRVoD = BL1;
    QLVBRVi += QVBRVi.FgetQL();
    if (QLVBRVi > BL1)
    QLVBRVi = BL1;
    QLCLD += QCLD.FgetQL();
    if (QLCLD > BL2)
    QLCLD = BL2;
    temp = QLVBRVoD + QLCLD + QLVBRVi;
    //fSout << temp << endl;
    BW.FcalBW(slot,QLVBRVoD,QLCLD,QLVBRVi,temp);
    //BW.FcalBW(slot,temp);
    QLVBRVoD = 0;
    QLVBRVi = 0;
    QLCLD = 0;
    VBRVoD_Slot = true;
    CLD_Slot = false;
    VBRVi_Slot=false;
    VBRVoD_End = false;
    CLD_End = false;
    VBRVi_End = false; };
    BLVBRVoD += QVBRVoD.FgetQL();
    BLVBRVi += QVBRVi.FgetQL();
    BLCLD += QCLD.FgetQL();
    BLCOD += QCOD.FgetQL();
    };

    #include "c:\office\master\program\result.h"
    }
  2. #2
  3. No Profile Picture
    Junior Member
    Devshed Newbie (0 - 499 posts)

    Join Date
    Jul 2002
    Location
    Minnesota
    Posts
    0
    Rep Power
    0
    very, very strange coding style.

    #includes in the middle of your code?
    absolute paths to included files?

    very strange

IMN logo majestic logo threadwatch logo seochat tools logo