Example #1
0
    def __call__(self):
        """ Returns the probe value """
        if self.attribute is not None:
            if self.element is not None:
                value = getattr( self.object , self.attribute )[self.element]
            else:
                value = getattr( self.object , self.attribute )
        else:
            value = self.object

        if callable(value) : v = value()
        else: v = value
        self.timestamp = respkernel.get_simulated_time()

        return v
Example #2
0
 def get_current_time(self):
     time = respkernel.get_simulated_time()
     if not time:
         return 1
     else:
         return time