Tutorial4 Addingsomedetails 120206080818 Phpapp01

download Tutorial4 Addingsomedetails 120206080818 Phpapp01

of 17

Transcript of Tutorial4 Addingsomedetails 120206080818 Phpapp01

  • 8/16/2019 Tutorial4 Addingsomedetails 120206080818 Phpapp01

    1/17

    By

    Mohammed Amer Al-Batati

    OMNet+

    +Step by Step

    Part - 4

  • 8/16/2019 Tutorial4 Addingsomedetails 120206080818 Phpapp01

    2/17

    Let every node send a pa!et periodially"

    #o$% &ime to 'o to (++ )les" &he model behavior is de)ned by the *ser as (++

    ode"

    Lets Add some Ations,

     &he lass has to be re'istered $ith

    OMNe&++ via the e)ne.Mod*le/maro" &he e)ne. Mod*le/ line sho*ld al$ays be p*tinto " or "pp )les and not header)le /"h"

  • 8/16/2019 Tutorial4 Addingsomedetails 120206080818 Phpapp01

    3/17

    1 initialie/"  &his method is invo!ed aterOMNe&++ has set *p the net$or!"

    2 handleMessa'e/Messa'e 3ms'" t is

    invo!ed $ith the messa'e as parameter$henever the mod*le reeives amessa'e" handleMessa'e/ is e5peted toproess the messa'e6 and then ret*rn"

    7 )nish/" t is alled $hen the sim*lationhas terminated s*ess*lly6 and itsreommended *se is the reordin' o

    s*mmary statistis"

    Main Member 8*ntions

  • 8/16/2019 Tutorial4 Addingsomedetails 120206080818 Phpapp01

    4/17

     &he messa'e an arrive9

    1"  8rom another mod*le or

    2"  8rom the same mod*le /sel-messa'es are *sed to implementtimers"

    Messa'es So*res

  • 8/16/2019 Tutorial4 Addingsomedetails 120206080818 Phpapp01

    5/17

    Add the ollo$in' ode in Node"

    (++ Simple (ode

    Why??

  • 8/16/2019 Tutorial4 Addingsomedetails 120206080818 Phpapp01

    6/17

  • 8/16/2019 Tutorial4 Addingsomedetails 120206080818 Phpapp01

    7/17

    1" Modiyin' N: )le9

    Addin' Some etails > ont"

  • 8/16/2019 Tutorial4 Addingsomedetails 120206080818 Phpapp01

    8/17

    2" Modiyin' "h )le

    Addin' Some etails > ont"

    Is itimportant??

  • 8/16/2019 Tutorial4 Addingsomedetails 120206080818 Phpapp01

    9/17

    7" Modiyin' " )le

    Addin' Some etails > ont"

  • 8/16/2019 Tutorial4 Addingsomedetails 120206080818 Phpapp01

    10/17

    7" Modiyin' " )le

    Addin' Some etails > ont"

    Sir, Can I useCTRL+SHIFT+Fand CTRL+SPACEhere?

  • 8/16/2019 Tutorial4 Addingsomedetails 120206080818 Phpapp01

    11/17

    7" Modiyin' " )le

    Addin' Some etails > ont"

    Sir, Can I useCTRL+SHIFT+Fand CTRL+SPACEhere?

    Thanks

  • 8/16/2019 Tutorial4 Addingsomedetails 120206080818 Phpapp01

    12/17

    Be s*re that the previo*s r*n $as losed"

    ?*n the e5periment6 every thin' sho*ld $or!)ne"

     &he events are sho$n in the &!env vie$"nspet the net$or!

    By do*ble-li!in' on either node1 or node 26$e an see the detailed implementation o o*r

    Nodes"B*t the variables /t5.interval and ener'y are

    not there"

     &o $ath them6 add

  • 8/16/2019 Tutorial4 Addingsomedetails 120206080818 Phpapp01

    13/17

    OMNe&++ provides

  • 8/16/2019 Tutorial4 Addingsomedetails 120206080818 Phpapp01

    14/17

    n previo*s e5periments6 $e $ere *sin' thedea*lt val*es o both &5.interval and :ner'y"

    @sin' dierent parameters an be ahieved

    *sin' the N )le"Open omnetpp"iniC )le"

     &here are t$o modes6 open the So*re mode"

    (hoosin' ierent Dal*es

  • 8/16/2019 Tutorial4 Addingsomedetails 120206080818 Phpapp01

    15/17

    n previo*s e5periments6 $e $ere *sin' thedea*lt val*es o both &5.interval and :ner'y"

    @sin' dierent parameters an be ahieved

    *sin' the N )le"Open omnetpp"iniC )le"

     &here are t$o modes6 open the So*re mode"

    (hoosin' ierent Dal*es

    Wo$,CTRL+SPACE$ou#d he#p mu%h

    here& 'a(I kno$

  • 8/16/2019 Tutorial4 Addingsomedetails 120206080818 Phpapp01

    16/17

    Models an have a lar'e n*mber oparameters to be on)'*red6 and it $o*ld betedio*s to set them one-by-one inomnetpp"ini"

    OMNe&++ s*pports $ildard patterns $hihallo$ or settin' several model parameters atone"

    @sin'

  • 8/16/2019 Tutorial4 Addingsomedetails 120206080818 Phpapp01

    17/17

    Ass*me $e $ant to test o*r system /Node$ith t$o types o traE9 hi'h and lo$"