Ejemplo n.º 1
0
    def __init__(self, iotype, client, rpath):
        ProxyMixin.__init__(self, client, rpath)

        default = float(self._valstr)
        desc = client.get(rpath + '.description')
        as_units = client.get(rpath + '.units')
        if as_units:
            om_units = get_translation(as_units)
        else:
            om_units = None
        if client.get(rpath + '.hasUpperBound') == 'true':
            high = float(client.get(rpath + '.upperBound'))
        else:
            high = None
        if client.get(rpath + '.hasLowerBound') == 'true':
            low = float(client.get(rpath + '.lowerBound'))
        else:
            low = None

        Float.__init__(self,
                       default_value=default,
                       iotype=iotype,
                       desc=desc,
                       low=low,
                       high=high,
                       units=om_units)
Ejemplo n.º 2
0
    def __init__(self, iotype, client, rpath):
        ProxyMixin.__init__(self, client, rpath)

        default = self._value = float(self._valstr)
        desc = client.get(rpath+'.description')
        as_units = client.get(rpath+'.units')
        if as_units:
            om_units = get_translation(as_units)
        else:
            om_units = None
        if client.get(rpath+'.hasUpperBound') == 'true':
            high = float(client.get(rpath+'.upperBound'))
        else:
            high = None
        if client.get(rpath+'.hasLowerBound') == 'true':
            low = float(client.get(rpath+'.lowerBound'))
        else:
            low = None

        Float.__init__(self, default_value=default, iotype=iotype, desc=desc,
                       low=low, high=high, units=om_units)
Ejemplo n.º 3
0
 def __init__(self, **metadata):
     self._vals = {}
     Float.__init__(self, **metadata)
     self._metadata['type'] = 'property'  # Just to show correct type.