SwitchDependVerClockGenerator.java
Go to the documentation of this file.
00001 package com.generalrobotix.ui.depends.rtm;
00002 
00003 import com.generalrobotix.ui.depends.rtm.ClockGeneratorRtm_impl;
00004 
00005 public class SwitchDependVerClockGenerator extends ClockGeneratorRtm_impl{
00006     public String getDependencyModuleName()
00007     {
00008         return new String("OpenRTM");
00009     }
00010     
00014     public void resetClockReceivers(){
00015         for (int i=0; i<ecs_.size();){
00016             ExecutionContext ec = ecs_.get(i);
00017             try{
00018                 System.out.println(i+": rate = "+ec.ec_.get_rate());
00019                 ec.reset();
00020                 i++;
00021             }catch(Exception ex){
00022                 ecs_.remove(ec);
00023             }
00024         }
00025     }
00026     
00027     public void updateExecutionContext(double simTime)
00028     {
00029         for (int i=0; i<ecs_.size();){
00030             ExecutionContext ec = ecs_.get(i);
00031             if (ec.execute(simTime)){
00032                 i++;
00033             }else{
00034                 ecs_.remove(ec);
00035             }
00036         }
00037     }
00038 }


openhrp3
Author(s): AIST, General Robotix Inc., Nakamura Lab of Dept. of Mechano Informatics at University of Tokyo
autogenerated on Thu Apr 11 2019 03:30:19