def __init__(self,phase,portTable): self.phase = phase self.domip="" self.port_table=bindpyrame.init_ports_table(portTable) self.apipools=apipools.api_pool() self.devices_lifo=[] self.current_id=0
def get_frequency(self,multimeter_id,range="undef",resolution="undef",channel="undef"): return self.relay(multimeter_id,"get_frequence",range,resolution,channel) def get_period(self,multimeter_id,range="undef",resolution="undef",channel="undef"): return self.relay(multimeter_id,"get_period",range,resolution,channel) def free_command(self,multimeter_id): return self.relay(multimeter_id,"free_command","undef","undef","undef") def get_error_queue(self,multimeter_id): return self.relay(multimeter_id,"get_error_queue","undef","undef","undef") # CREATE POOL #################################################### me = multimeter_class() api_pool = apipools.api_pool() # COMMANDS ####################################################### # Put serialized API in memory if not called via import if __name__=='__main__': global api; api = getapi.load_api(__file__) # Functions def getapi_multimeter(): submod.setres(1,api) def init_multimeter(conf_string): """Registers in the pool and initializes a new MULTIMETER. *conf_string* is the configuration string for the module to be initialized. Returns its multimeter_id."""