printout.ps

来自「obs网络试验平台」· PS 代码 · 共 1,912 行 · 第 1/4 页

PS
1,912
字号
  false BX  fHelvetica-Bold bfs scalefont setfont  Show } bind def/str{  false UL  false BX  fTimes-Roman bfs scalefont setfont  Show} bind def/e{  false UL  true BX  fHelvetica-Bold bfs scalefont setfont  Show} bind def%%EndResource%%EndProlog%%BeginSetup%%IncludeResource: font Courier%%IncludeResource: font Courier-Oblique%%IncludeResource: font Courier-Bold%%IncludeResource: font Times-Roman%%IncludeResource: font Symbol%%IncludeResource: font Courier-BoldOblique%%BeginResource: encoding ISO-8859-1Encoding/ISO-8859-1Encoding [/.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /space /exclam /quotedbl /numbersign /dollar /percent /ampersand /quoteright /parenleft /parenright /asterisk /plus /comma /minus /period /slash /zero /one /two /three /four /five /six /seven /eight /nine /colon /semicolon /less /equal /greater /question /at /A /B /C /D /E /F /G /H /I /J /K /L /M /N /O /P /Q /R /S /T /U /V /W /X /Y /Z /bracketleft /backslash /bracketright /asciicircum /underscore /quoteleft /a /b /c /d /e /f /g /h /i /j /k /l /m /n /o /p /q /r /s /t /u /v /w /x /y /z /braceleft /bar /braceright /asciitilde /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /space /exclamdown /cent /sterling /currency /yen /brokenbar /section /dieresis /copyright /ordfeminine /guillemotleft /logicalnot /hyphen /registered /macron /degree /plusminus /twosuperior /threesuperior /acute /mu /paragraph /bullet /cedilla /onesuperior /ordmasculine /guillemotright /onequarter /onehalf /threequarters /questiondown /Agrave /Aacute /Acircumflex /Atilde /Adieresis /Aring /AE /Ccedilla /Egrave /Eacute /Ecircumflex /Edieresis /Igrave /Iacute /Icircumflex /Idieresis /Eth /Ntilde /Ograve /Oacute /Ocircumflex /Otilde /Odieresis /multiply /Oslash /Ugrave /Uacute /Ucircumflex /Udieresis /Yacute /Thorn /germandbls /agrave /aacute /acircumflex /atilde /adieresis /aring /ae /ccedilla /egrave /eacute /ecircumflex /edieresis /igrave /iacute /icircumflex /idieresis /eth /ntilde /ograve /oacute /ocircumflex /otilde /odieresis /divide /oslash /ugrave /uacute /ucircumflex /udieresis /yacute /thorn /ydieresis ] def%%EndResource% Initialize page description variables./sh 595 def/sw 842 def/llx 24 def/urx 818 def/ury 571 def/lly 24 def/#copies 1 def/th 15.000000 def/fnfs 11 def/bfs 8.005733 def/cw 4.803440 def% Dictionary for ISO-8859-1 support/iso1dict 8 dict begin  /fCourier ISO-8859-1Encoding /Courier reencode_font  /fCourier-Bold ISO-8859-1Encoding /Courier-Bold reencode_font  /fCourier-BoldOblique ISO-8859-1Encoding /Courier-BoldOblique reencode_font  /fCourier-Oblique ISO-8859-1Encoding /Courier-Oblique reencode_font  /fHelvetica ISO-8859-1Encoding /Helvetica reencode_font  /fHelvetica-Bold ISO-8859-1Encoding /Helvetica-Bold reencode_font  /fTimes-Bold ISO-8859-1Encoding /Times-Bold reencode_font  /fTimes-Roman ISO-8859-1Encoding /Times-Roman reencode_fontcurrentdict end def/bgcolor [ 0 0 0 ] def/bg false def/ul false def/bx false def% The font for line numbering/f# /Helvetica findfont bfs .6 mul scalefont def/fSymbol /Symbol findfont def/hm fnfs 0.25 mul def/pw   cw 81.400000 muldef/ph   501.959430 th adddef/pmw urx llx sub pw 2 mul sub 1 div def/pmh 0 def/v 0 def/x [  0  dup pmw add pw add] def/y [  pmh ph add 0 mul ph add  dup] def/scx sw 2 div def/scy sh 2 div def/snx urx def/sny lly 2 add def/dx llx def/dy sny def/fnx scx def/fny dy def/lx snx def/ly ury fnfs 0.8 mul sub def/sx 0 def/tab 8 def/x0 0 def/y0 0 def%%EndSetup%%Page: (1-2) 1%%BeginPageSetup/pagesave save defsh 0 translate 90 rotate%%EndPageSetupiso1dict begingsavellx lly 12 add translate/v 0 store/x0 x v get 3.362408 add sx cw mul add store/y0 y v get bfs th add sub storex0 y0 moveto() p n(stdin) (Page 1/22) (Feb 24, 04 9:54) titleborder/v 1 store/x0 x v get 3.362408 add sx cw mul add store/y0 y v get bfs th add sub storex0 y0 moveto(Table of  Contents) K(                                     Tue Feb 24 09:54:38 2004) p n() N() N() N(    File: Table.cc                                               Page    1) N() N(    File: fdl-scheduler.cc                                       Page    4) N() N(    File: lauc-scheduler.cc                                      Page    6) N() N(    File: scheduler-group.cc                                     Page    9) N() N(    File: Table.h                                                Page   12) N() N(    File: fdl-scheduler.h                                        Page   14) N() N(    File: lauc-scheduler.h                                       Page   16) N() N(    File: scheduler-group.h                                      Page   19) N() N(stdin) (Page 2/22) (Feb 24, 04 9:54) titlebordergrestore(Printed by U-GMGPC2\\Geoffrey M. Garner) rhead(stdin) (1/11) (Tuesday February 24, 2004) footerend % of iso1dictpagesave restoreshowpage%%Page: (3-4) 2%%BeginPageSetup/pagesave save defsh 0 translate 90 rotate%%EndPageSetupiso1dict begingsavellx lly 12 add translate/v 0 store/x0 x v get 3.362408 add sx cw mul add store/y0 y v get bfs th add sub storex0 y0 moveto(Table.cc) K(  Aug 27 11:32 2003                                 Page:   1) p n() N(/* Copyright \(c\) University of Maryland, Baltimore County, 2003.) N( * Original Authors: Ramakrishna Shenai, Sunil Gowda and Krishna Sivalingam.) N( *) N( * This software is developed at the University of Maryland, Baltimore County un) N(der) N( * grants from Cisco Systems Inc and the University of Maryland, Baltimore Count) N(y.) N( *) N( * Permission to use, copy, modify, and distribute this software and its) N( * documentation in source and binary forms for non-commercial purposes) N( * and without fee is hereby granted, provided that the above copyright) N( * notice appear in all copies and that both the copyright notice and) N( * this permission notice appear in supporting documentation. and that) N( * any documentation, advertising materials, and other materials related) N( * to such distribution and use acknowledge that the software was) N( * developed by the University of Maryland, Baltimore County.  The name of) N( * the University may not be used to endorse or promote products derived from) N( * this software without specific prior written permission.) N( *) N( * Copyright \(C\) 2000-2003 Washington State University. All rights reserved.) N( * This software was originally developed at Alcatel USA and subsequently modifi) N(ed) N( * at Washington State University, Pullman, WA  through research work which was) N( * supported by Alcatel USA, Inc and Cisco Systems Inc.) N() N( * The  following notice is in adherence to the Washington State University) N( * copyright policy follows.) N( *) N( * License is granted to copy, to use, and to make and to use derivative) N( * works for research and evaluation purposes, provided that Washington) N( * State University is acknowledged in all documentation pertaining to any such) N( * copy or derivative work. Washington State University grants no other) N( * licenses expressed or implied. The Washington State University name) N( * should not be used in any advertising without its written permission.) N( *) N( * WASHINGTON STATE UNIVERSITY MAKES NO REPRESENTATIONS CONCERNING EITHER) N( * THE MERCHANTABILITY OF THIS SOFTWARE OR THE SUITABILITY OF THIS SOFTWARE) N( * FOR ANY PARTICULAR PURPOSE.  The software is provided "as is") N( *  without express or implied warranty of any kind. These notices must) N( * be retained in any copies of any part of this software.) N( */) N(#include "Table.h") N() N(// the lookup table map object) N(map <unsigned long, HashEntry*> LookupSwitch::table__;) N() N(void LookupSwitch::add\( u_long burstid, u_long inChannel, u_long outChannel,) N(                  double arrTime, double depTime, double expTime \) {) N(    HashEntry *e = new HashEntry\(\);) N(    e->burstId = burstid;) N(    e->inChannel = inChannel;) N(    e->outChannel = outChannel;) N(    e->arrTime = arrTime;) N(    e->depTime = depTime;) N(    e->expTime = expTime;) N() N(    add\( e \);) N(}) N() N(stdin) (Page 3/22) (Feb 24, 04 9:54) titleborder/v 1 store/x0 x v get 3.362408 add sx cw mul add store/y0 y v get bfs th add sub storex0 y0 moveto(Table.cc) K(  Aug 27 11:32 2003                                 Page:   2) p n() N() N(void LookupSwitch::add\( HashEntry* e \) {) N(    table__[e->burstId] = e;) N(}) N() N(HashEntry* LookupSwitch::lookup\( unsigned long key \) {) N( //   map<unsigned long, Entry>::iterator result = table__.find\( key \);) N( //   return \(*result\).second;) N() N(    if\( table__.find\( key \) != table__.end\(\) \) {) N(        return  table__.find\( key \)->second;) N(    } else {) N(        return NULL;) N(    }) N(}) N() N(HashEntry* LookupSwitch::erase\( unsigned long key \) {) N(    HashEntry *result = lookup\( key \);) N(    if\( result != NULL \)) N(        table__.erase\( key \);) N(    return \(result\);) N(}) N() N() N(// Displays the elements of the lookupswitch -used for diagnostic purposes only) N(void LookupSwitch::showall\(\) {) N(    map<unsigned long, HashEntry*>::const_iterator iter;) N(    for\( iter = table__.begin\(\); iter != table__.end\(\); iter++ \) {) N(        char s[300];) N(        HashEntry *e = iter->second;) N(        sprintf\( s, "bid: %ld, aT: %lf, eT: %lf",  e->burstId,) N(           e->arrTime, e->expTime \);) N(        Debug::debug\( s \);) N(    }) N(}) N() N(/*) N(int main\(\) {) N(    LookupSwitch ls;) N() N(    for\( int i = 0; i < 200; i++ \)) N(        ls.add\( i, 0, 0, 1.0, 0.0, 0.0 \);) N() N(    for\( int i = 0; i < 201; i++ \) {) N(        ls.erase\( i \);) N(        Entry e = ls.lookup\( i \);) N(        if\( e.arrTime != 0 \) {) N(            cout << "Found entry " << e.burstId << endl;) N(            cout << "Entry arr time " << e.arrTime << endl;) N(        } else {) N(            cout << "Unable to find entry with key " << i << endl;) N(        }) N(    }) N(    cout << "done" << endl;) N() N(}) N() N(stdin) (Page 4/22) (Feb 24, 04 9:54) titlebordergrestore(Printed by U-GMGPC2\\Geoffrey M. Garner) rhead(stdin) (2/11) (Tuesday February 24, 2004) footerend % of iso1dictpagesave restoreshowpage%%Page: (5-6) 3%%BeginPageSetup/pagesave save defsh 0 translate 90 rotate%%EndPageSetupiso1dict begingsavellx lly 12 add translate/v 0 store/x0 x v get 3.362408 add sx cw mul add store/y0 y v get bfs th add sub storex0 y0 moveto(Table.cc) K(  Aug 27 11:32 2003                                 Page:   3) p n() N(*/) N() N(stdin) (Page 5/22) (Feb 24, 04 9:54) titleborder/v 1 store/x0 x v get 3.362408 add sx cw mul add store/y0 y v get bfs th add sub storex0 y0 moveto(fdl-scheduler.cc) K(  Feb 24 09:27 2004                         Page:   4) p n() N(#include "fdl-scheduler.h") N() N(int FdlScheduler::option_ = 0;) N(int FdlScheduler::max_fdls_ = 0;) N() N(/* constructor */) N(FdlScheduler::FdlScheduler\(\)) N({) N(     bind \("option", &option\);) N(     bind \("maxfdls", &max_fdls_\);) N(}) N() N(/* alloc method */) N(void FdlScheduler:alloc\( u_int nfdl\)) N({) N(    unschTime_ = new double[nfdl];) N(    startTime_ = new double[nfdl];) N(    endTime_ = new double[nfdl];) N() N(    memset\( unschTime_, 0, nfdl * sizeof\( double \) \);) N(    memset\( startTime_, 0, nfdl * sizeof\( double \) \);) N(    memset\( endTime_, 0, nfdl * sizeof\( double \)  \);) N(}) N() N(/* Schedule an FDL at the proposed schedule time and duration */) N(FdlSchedule FdlScheduler::schedFdl\( double schedTime, double schedDur \)) N({) N() N(    // make sure the sched duration is greater than 0.) N(    assert\( \( schedTime >= 0. \) && \( schedDur > 0. \) \);) N(    assert\(nfdl_ > 0\);) N() N(    FdlSchedule result = search\( schedTime, schedDur \);) N() N(    int fdl = result.fdl\(\);) N(    if\( fdl >= 0 \)) N(        update\( fdl, result.startTime\(\), schedDur \);) N() N(    return result;) N(}) N() N(// search the scheduler and the voids for an appropriate schedule) N(FdlSchedule FdlScheduler::search\( double schedTime, double schedDur \)) N({) N(    FdlSchedule result;) N(    double   diffTime = HUGE_VAL;) N() N(    for\( u_int i = 0; i < nfdl_; i++ \) {) N(        // try to schedule in a void) N(        if\( schedTime >= startTime_[i] \)) N(           if\( \( endTime_[i] - schedTime \) >= schedDur \)) N(              if\( \( schedTime - startTime_[i] \) < diffTime \)) N(              {) N(                 diffTime = schedTime - startTime_[i];) N(                 result.fdl\(\) = i;) N() N(stdin) (Page 6/22) (Feb 24, 04 9:54) titlebordergrestore(Printed by U-GMGPC2\\Geoffrey M. Garner) rhead(stdin) (3/11) (Tuesday February 24, 2004) footerend % of iso1dictpagesave restoreshowpage%%Page: (7-8) 4%%BeginPageSetup/pagesave save defsh 0 translate 90 rotate%%EndPageSetupiso1dict begingsavellx lly 12 add translate/v 0 store/x0 x v get 3.362408 add sx cw mul add store/y0 y v get bfs th add sub storex0 y0 moveto(fdl-scheduler.cc) K(  Feb 24 09:27 2004                         Page:   5) p n() N(                 result.startTime\(\) = schedTime;) N(              }) N(        // try to schedule after the void) N(        if\( schedTime >= unschTime_[i] \)) N(           if\( \( schedTime - unschTime_[i] \) < diffTime \)) N(           {) N(              diffTime = schedTime - unschTime_[i];) N(              result.fdl\(\) = i;) N(              result.startTime\(\) = schedTime;) N(           }) N(    }) N(    return \(result\);) N(}) N() N(// update the $fdl information) N(void FdlScheduler::update\( u_int fdl, double schedTime, double schedDur \)) N({) N(    if\( schedTime >= unschTime_[fdl] \) {) N(        startTime_[fdl] = unschTime_[fdl];) N(        unschTime_[fdl] = schedTime + schedDur;) N(        endTime_[fdl] = schedTime;) N(    } else {) N(        // scheduled in the void) N(        // i.e sched_time < unsch_time[fdl]) N(        startTime_[fdl] = schedTime + schedDur;) N(    }) N(}) N() N(stdin) (Page 7/22) (Feb 24, 04 9:54) titleborder/v 1 store/x0 x v get 3.362408 add sx cw mul add store/y0 y v get bfs th add sub storex0 y0 moveto(lauc-scheduler.cc) K(  Aug 27 11:32 2003                        Page:   6) p n() N(/* Copyright \(c\) University of Maryland, Baltimore County, 2003.) N( * Original Authors: Ramakrishna Shenai, Sunil Gowda and Krishna Sivalingam.) N( *) N( * This software is developed at the University of Maryland, Baltimore County un) N(der) N( * grants from Cisco Systems Inc and the University of Maryland, Baltimore Count) N(y.) N( *) N( * Permission to use, copy, modify, and distribute this software and its) N( * documentation in source and binary forms for non-commercial purposes) N( * and without fee is hereby granted, provided that the above copyright) N

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?