Пример #1
0
 def configure(self, config):
     CompositeNode.configure(self, config)
     # get handle to ARM in arm.py.  
     # self.coprocessor is the surrogate parent this child.
     # 
     set_attributes(self, (('id',REQUIRED),('coprocessor',REQUIRED)), config)
     self._coprocessor = self.coprocessor._coprocessor # the moab megatron ARM object
Пример #2
0
 def configure(self, config):
     CompositeNode.configure(self, config)
     # get handle to ARM in arm.py.
     # self.coprocessor is the surrogate parent this child.
     #
     set_attributes(self, (('id', REQUIRED), ('coprocessor', REQUIRED)),
                    config)
     self._coprocessor = self.coprocessor._coprocessor  # the moab megatron ARM object
Пример #3
0
    def configure(self, config):
        CompositeNode.configure(self, config)
        set_attribute(self, 'dev', REQUIRED, config)
        set_attribute(self, 'parity', parity_to_int('none'), config,
                      parity_to_int)
        set_attribute(self, 'baud', 9600, config, str)
        if self.baud == 'Custom':
            self.baud = -1  # flag for later processing of custom_baud
        else:
            self.baud = int(self.baud)  # normal path
        set_attributes(self, (('bits', 8), ('stop_bits', 1), ('debug', 0),
                              ('dump_cpl', 16)), config, int)
        set_attribute(self, 'custom_baud', 76800, config, int)
        set_attribute(self, 'flow_control', flowctl_to_int('none'), config,
                      flowctl_to_int)
        set_attribute(self, 'lock_directory', properties.get('VAR_LOCK'),
                      config, str)

        set_attribute(self, 'VINTR', '\x03', config, str)
        set_attribute(self, 'VQUIT', '\x1c', config, str)
        set_attribute(self, 'VERASE', '\x7f', config, str)
        set_attribute(self, 'VKILL', '\x15', config, str)
        set_attribute(self, 'VEOF', '\x04', config, str)
        set_attribute(self, 'VTIME', 0, config, int)
        set_attribute(self, 'VMIN', 1, config, int)
        set_attribute(self, 'VSWTC', '\x00', config, str)
        set_attribute(self, 'VSTART', '\x11', config, str)
        set_attribute(self, 'VSTOP', '\x13', config, str)
        set_attribute(self, 'VSUSP', '\x1a', config, str)
        set_attribute(self, 'VEOL', '\x00', config, str)
        set_attribute(self, 'VREPRINT', '\x12', config, str)
        set_attribute(self, 'VDISCARD', '\x0f', config, str)
        set_attribute(self, 'VWERASE', '\x17', config, str)
        set_attribute(self, 'VLNEXT', '\x16', config, str)
        set_attribute(self, 'VEOL2', '\x00', config, str)
        set_attribute(self, 'cc17', '\x00', config, str)
        set_attribute(self, 'cc18', '/', config, str)
        set_attribute(self, 'cc19', '\x00', config, str)
        set_attribute(self, 'cc20', '\x00', config, str)
        set_attribute(self, 'cc21', '\x00', config, str)
        set_attribute(self, 'cc22', '\x00', config, str)
        set_attribute(self, 'cc23', '\x00', config, str)
        set_attribute(self, 'cc24', '\x00', config, str)
        set_attribute(self, 'cc25', '\x00', config, str)
        set_attribute(self, 'cc26', '\x00', config, str)
        set_attribute(self, 'cc27', '\x00', config, str)
        set_attribute(self, 'cc28', '\x00', config, str)
        set_attribute(self, 'cc29', '\x00', config, str)
        set_attribute(self, 'cc30', '\x00', config, str)
        set_attribute(self, 'cc31', '\x00', config, str)

        self._devlock = DeviceLock(self.dev, self.lock_directory)

        if self.is_open():
            self._set_serial()
        return
Пример #4
0
 def configure(self,config):
     CompositeNode.configure(self,config)
     set_attribute(self, 'dev', REQUIRED, config)
     set_attribute(self, 'parity', parity_to_int('none'), 
                   config, parity_to_int)
     set_attribute(self, 'baud', 9600, config, str)
     if self.baud == 'Custom':
         self.baud = -1 # flag for later processing of custom_baud
     else:
          self.baud = int(self.baud) # normal path  
     set_attributes(self, (('bits',8), ('stop_bits',1),
                       ('debug',0), ('dump_cpl',16)), config, int)
     set_attribute(self, 'custom_baud', 76800, config, int)
     set_attribute(self, 'flow_control', flowctl_to_int('none'), 
                   config, flowctl_to_int)
     set_attribute(self, 'lock_directory', properties.get('VAR_LOCK'), config, str)
     
     set_attribute(self, 'VINTR', '\x03', config, str)
     set_attribute(self, 'VQUIT', '\x1c', config, str)
     set_attribute(self, 'VERASE', '\x7f', config, str)
     set_attribute(self, 'VKILL', '\x15', config, str)
     set_attribute(self, 'VEOF', '\x04', config, str)
     set_attribute(self, 'VTIME', 0, config, int)
     set_attribute(self, 'VMIN', 1, config, int)
     set_attribute(self, 'VSWTC', '\x00', config, str)
     set_attribute(self, 'VSTART', '\x11', config, str)
     set_attribute(self, 'VSTOP', '\x13', config, str)
     set_attribute(self, 'VSUSP', '\x1a', config, str)
     set_attribute(self, 'VEOL', '\x00', config, str)
     set_attribute(self, 'VREPRINT', '\x12', config, str)
     set_attribute(self, 'VDISCARD', '\x0f', config, str)
     set_attribute(self, 'VWERASE', '\x17', config, str)
     set_attribute(self, 'VLNEXT', '\x16', config, str)
     set_attribute(self, 'VEOL2', '\x00', config, str)
     set_attribute(self, 'cc17', '\x00', config, str)
     set_attribute(self, 'cc18', '/', config, str)
     set_attribute(self, 'cc19', '\x00', config, str)
     set_attribute(self, 'cc20', '\x00', config, str)
     set_attribute(self, 'cc21', '\x00', config, str)
     set_attribute(self, 'cc22', '\x00', config, str)
     set_attribute(self, 'cc23', '\x00', config, str)
     set_attribute(self, 'cc24', '\x00', config, str)
     set_attribute(self, 'cc25', '\x00', config, str)
     set_attribute(self, 'cc26', '\x00', config, str)
     set_attribute(self, 'cc27', '\x00', config, str)
     set_attribute(self, 'cc28', '\x00', config, str)
     set_attribute(self, 'cc29', '\x00', config, str)
     set_attribute(self, 'cc30', '\x00', config, str)
     set_attribute(self, 'cc31', '\x00', config, str)
     set_attribute(self, 'raw_mode', 0, config, as_boolean)
     self._devlock = DeviceLock(self.dev, self.lock_directory)
     
     if self.is_open():
         self._set_serial()
Пример #5
0
    def configure(self, config):
        CompositeNode.configure(self, config)
        set_attribute(self, "dev", REQUIRED, config)
        set_attribute(self, "parity", parity_to_int("none"), config, parity_to_int)
        set_attribute(self, "baud", 9600, config, str)
        if self.baud == "Custom":
            self.baud = -1  # flag for later processing of custom_baud
        else:
            self.baud = int(self.baud)  # normal path
        set_attributes(self, (("bits", 8), ("stop_bits", 1), ("debug", 0), ("dump_cpl", 16)), config, int)
        set_attribute(self, "custom_baud", 76800, config, int)
        set_attribute(self, "flow_control", flowctl_to_int("none"), config, flowctl_to_int)
        set_attribute(self, "lock_directory", properties.get("VAR_LOCK"), config, str)

        set_attribute(self, "VINTR", "\x03", config, str)
        set_attribute(self, "VQUIT", "\x1c", config, str)
        set_attribute(self, "VERASE", "\x7f", config, str)
        set_attribute(self, "VKILL", "\x15", config, str)
        set_attribute(self, "VEOF", "\x04", config, str)
        set_attribute(self, "VTIME", 0, config, int)
        set_attribute(self, "VMIN", 1, config, int)
        set_attribute(self, "VSWTC", "\x00", config, str)
        set_attribute(self, "VSTART", "\x11", config, str)
        set_attribute(self, "VSTOP", "\x13", config, str)
        set_attribute(self, "VSUSP", "\x1a", config, str)
        set_attribute(self, "VEOL", "\x00", config, str)
        set_attribute(self, "VREPRINT", "\x12", config, str)
        set_attribute(self, "VDISCARD", "\x0f", config, str)
        set_attribute(self, "VWERASE", "\x17", config, str)
        set_attribute(self, "VLNEXT", "\x16", config, str)
        set_attribute(self, "VEOL2", "\x00", config, str)
        set_attribute(self, "cc17", "\x00", config, str)
        set_attribute(self, "cc18", "/", config, str)
        set_attribute(self, "cc19", "\x00", config, str)
        set_attribute(self, "cc20", "\x00", config, str)
        set_attribute(self, "cc21", "\x00", config, str)
        set_attribute(self, "cc22", "\x00", config, str)
        set_attribute(self, "cc23", "\x00", config, str)
        set_attribute(self, "cc24", "\x00", config, str)
        set_attribute(self, "cc25", "\x00", config, str)
        set_attribute(self, "cc26", "\x00", config, str)
        set_attribute(self, "cc27", "\x00", config, str)
        set_attribute(self, "cc28", "\x00", config, str)
        set_attribute(self, "cc29", "\x00", config, str)
        set_attribute(self, "cc30", "\x00", config, str)
        set_attribute(self, "cc31", "\x00", config, str)

        self._devlock = DeviceLock(self.dev, self.lock_directory)

        if self.is_open():
            self._set_serial()
        return
Пример #6
0
 def configure(self,config):
     set_attribute(self, 'mac_address', self.mac_address, config) #mac address of client
     self.mac_address = aero.MacAddress(self.mac_address)
     self.dev = self.mac_address.value
     Port.configure(self,config)
     set_attribute(self, 'parity', parity_to_int('none'), 
                   config, parity_to_int)
     set_attribute(self, 'baud', 9600, config, str)
     if self.baud == 'Custom':
         self.baud = -1 # flag for later processing of custom_baud
     else:
          self.baud = int(self.baud) # normal path  
     set_attributes(self, (('bits',8), ('stop_bits',1),
                       ('dump_cpl',16)), config, int)
     set_attribute(self, 'custom_baud', 76800, config, int)
     set_attribute(self, 'flow_control', flowctl_to_int('none'), 
                   config, flowctl_to_int)
     set_attribute(self, 'lock_directory', properties.get('VAR_LOCK'), config, str)
     set_attribute(self, 'debug', self.parent.debug, config, int)
Пример #7
0
 def configure(self, config):
     CompositeNode.configure(self, config)
     set_attribute(self, 'unit', None, config)
     set_attributes(self, (('min', None), ('max', None)), config, float)
Пример #8
0
 def configure(self, config):
     CompositeNode.configure(self,config)
     set_attribute(self, 'unit',None, config)
     set_attributes(self, (('min',None),('max',None)), config, float)
Пример #9
0
 def configure(self, config):
     CompositeNode.configure(self, config)
     set_attributes(self, (('id',REQUIRED),('avr',REQUIRED)), config)