Changes between Version 41 and Version 42 of Writing Rules/Tlmt


Ignore:
Timestamp:
Feb 19, 2008, 9:29:52 PM (16 years ago)
Author:
fpecheux
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • Writing Rules/Tlmt

    v41 v42  
    3030= C) VCI initiator Modeling =
    3131
    32 In the proposed example, the initiator module is modeled by the '''!VciSimpleInitiator''' class. This class inherits from the '''soclib::tlmt::BaseModule''' class, that acts as the root class for all TLM-T modules. The process time, as well as other useful process attributes, is contained in a C++ structure called a '''tlmt_thread_context'''.As there is only one thread in this module, there is only one member variable '''c0''' of type '''tlmt_core::tlmt_thread_context'''. '''c0''' mostly corresponds to the PDES process local time ('''H''' on the figure). Time associated to the '''c0''' object can be accessed through the getter function '''time()''', and setter functions '''set_time()''' and '''update_time()'''.
    33 
    34 The '''execLoop()''' method, describing the initiator activity must be declared as a member function of the '''my_initiator''' class.
    35 
    36 Finally, the class '''my_initiator''' must contain a member variable '''p_vci''', of type '''!VciInitiatorPort'''. This object has a template parameter <'''vci_param'''> defining the widths of the VCI ADRESS & DATA fields.
     32In the proposed example, the initiator module is modeled by the '''!VciSimpleInitiator''' class. This class inherits from the '''soclib::tlmt::!BaseModule''' class, that acts as the root class for all TLM-T modules. The process time, as well as other useful process attributes, is contained in a C++ structure called a '''tlmt_core::tlmt_thread_context'''.As there is only one thread in this module, there is only one member variable '''c0''' of type '''tlmt_core::tlmt_thread_context'''. '''c0''' mostly corresponds to the PDES process local time ('''H''' on the figure). In all the TLM-T models, time is handled by the '''tlmt_core::tlmt_time''' class. In order to get the time associated to the initiator process, one should use the getter function '''time()''' on the '''c0''' object, and the setter functions '''set_time()''' and '''update_time()''' to assign a new time to the process.
     33
     34The '''execLoop()''' method, describing the initiator behaviour must be declared as a member function of the '''!VciSimpleInitiator''' class.
     35
     36Finally, the class '''!VciSimpleInitiator''' must contain a member variable '''p_vci''', of type '''!VciInitiator'''. This object has a template parameter <'''vci_param'''> defining the widths of the VCI ADDRESS and DATA fields.
    3737
    3838== C.1) Sending a VCI command packet ==
     
    4141{{{
    4242void send(vci_cmd_t     *cmd,   // VCI command packet   
    43                    uint32_t time);      // initiator local time
     43          uint32_t time);       // initiator local time
    4444}}}
    4545