locked
access to simulated time and halt/continuation of services RRS feed

  • Question

  • Hi,

     

    I want to develop a simulation consisting of several MSRS services and a NS2 communication simulation running on a Linux machine. One of the MSRS services, called the Interface Service, communicates with the NS2 simulation over TCP.

     

    To synchronize the MSRS part and the NS2 part of the simulation, I need to halt all MSRS services except the Interface Service at time instances specified by the NS2 simulation. At other subsequent time instances, I want to continue the MSRS services.

     

    I have two questions:

     

    1) Is there a simulated time provided by the MSRS suitable to check when some predefined time instance is passed in the simulation? How can I access this time?

     

    2) How can I halt and continue MSRS services at certain time instances controlled by my Interface Service?

     

    Thank you very much!

     

    Markus

    Tuesday, June 3, 2008 2:24 PM

Answers

  • 1) there is a simulated time available that you can use to synchronize Entity updates (based on predefined times). The time is available in the engie state and also passed to every entity on Update

     

    2) MSRS services dont do any work unless there ismessaging. To stop messgae processing temporarily, an djust have messages queuede up on our ports, teardown the mainPortInterleave in the service class (post a tear down message other than drop, using a custom teardowen handler). Then when you are ready to restart, reactivate the interleave (call  ActivateDsspOperationHandlers()) and the message will be active again.

     

    we do this in the SickLRF service for example when we need to reset the serial port and other such transitions

     

    Tuesday, June 17, 2008 3:44 PM

All replies

  • 1) there is a simulated time available that you can use to synchronize Entity updates (based on predefined times). The time is available in the engie state and also passed to every entity on Update

     

    2) MSRS services dont do any work unless there ismessaging. To stop messgae processing temporarily, an djust have messages queuede up on our ports, teardown the mainPortInterleave in the service class (post a tear down message other than drop, using a custom teardowen handler). Then when you are ready to restart, reactivate the interleave (call  ActivateDsspOperationHandlers()) and the message will be active again.

     

    we do this in the SickLRF service for example when we need to reset the serial port and other such transitions

     

    Tuesday, June 17, 2008 3:44 PM
  • Hello George,

     

    thank you for your reply.

     

    Concerning my second question (How can I halt and continue MSRS services...), our services include communication with other (non-MSRS) software modules over TCP as well as timer threads which both are independent of any messaging between MSRS services over service ports.

     

    How can we control the run of a service including TCP communication and timer threads from outside the service?

     

    Best regards,
    Markus

     

    Thursday, June 19, 2008 7:03 AM
  • Hi,  i am doing a similar project with you . I have the same problems and how did you solve it ? Could you contact with me ? my email : liyuzhuo1987@gmail.com ,

     

    thank you !

    Friday, June 18, 2010 1:29 PM