Example #1
0
    def __init__(self, event_callback):
        """
        Creates an RSNPlatformDriver instance.

        @param pnode           Root PlatformNode defining the platform network
                               rooted at this platform.
        @param event_callback  Listener of events generated by this driver
        """
        PlatformDriver.__init__(self, event_callback)

        # CIOMSClient instance created by connect() and destroyed by disconnect():
        self._rsn_oms = None

        # TODO(OOIION-1495) review the following. Commented out for the moment.
        # But yes, we would probably need some concept of currently "active
        # ports", probably defined as those where there are active instruments
        #  associated.
        """
        # Simple list of active ports in this deployment configuration:
        # (this should be all the ports that have devices attached. Used in go_active processing
        self._active_ports = []
        """

        # URL for the event listener registration/unregistration (based on
        # web server launched by ServiceGatewayService, since that's the
        # service in charge of receiving/relaying the OMS events).
        # NOTE: (as proposed long ago), this kind of functionality should
        # actually be provided by some component more in charge of the RSN
        # platform netwokr as a whole -- as opposed to platform-specific).
        self.listener_url = None
    def _configure(self, driver_config):
        """
        Nothing special done here, only calls super.configure(driver_config)

        @param driver_config with required 'oms_uri' entry.
        """
        
        log.error("%r: _configure...", self._platform_id)

        PlatformDriver._configure(self, driver_config)

        self.nodeCfg = NodeConfiguration()

        self._platform_id = driver_config['node_id']
        self.nodeCfg.openNode(self._platform_id, driver_config['driver_config_file']['node_cfg_file'])

        self.nms_source = self.nodeCfg.node_meta_data['nms_source']
            
        self.oms_sample_rate = self.nodeCfg.node_meta_data['oms_sample_rate']

        self.nodeCfg.Print()

        self._construct_resource_schema()
        
        self._lastRcvSampleTime = {}
    def __init__(self, event_callback):
        """
        Creates an RSNPlatformDriver instance.

        @param pnode           Root PlatformNode defining the platform network
                               rooted at this platform.
        @param event_callback  Listener of events generated by this driver
        """
        PlatformDriver.__init__(self, event_callback)

        # CIOMSClient instance created by connect() and destroyed by disconnect():
        self._rsn_oms = None

 

        # URL for the event listener registration/unregistration (based on
        # web server launched by ServiceGatewayService, since that's the
        # service in charge of receiving/relaying the OMS events).
        # NOTE: (as proposed long ago), this kind of functionality should
        # actually be provided by some component more in charge of the RSN
        # platform netwokr as a whole -- as opposed to platform-specific).
        self.listener_url = None
        
               # scheduler config is a bit redundant now, but if we ever want to
        # re-initialize a scheduler we will need it.
        self._scheduler = None
    def _configure(self, driver_config):
        """
        Nothing special done here, only calls super.configure(driver_config)

        @param driver_config with required 'oms_uri' entry.
        """
        PlatformDriver._configure(self, driver_config)

        self.nodeCfg = NodeConfiguration()
 
         
        self._platform_id = driver_config['node_id']
            
        
        self.nodeCfg.OpenNode(self._platform_id,driver_config['driver_config_file']['node_cfg_file'])

        
        if 'nms_source' in self.nodeCfg.node_meta_data :
            self.nms_source = self.nodeCfg.node_meta_data['nms_source']
        else:
            self.nms_source = 1
            
            
        if 'oms_sample_rate' in self.nodeCfg.node_meta_data :
            self.oms_sample_rate = self.nodeCfg.node_meta_data['oms_sample_rate']
        else:
            self.oms_sample_rate = 60
        




        self.nodeCfg.Print();
        
        self._construct_resource_schema()
    def __init__(self, event_callback):
        """
        Creates an RSNPlatformDriver instance.

        @param pnode           Root PlatformNode defining the platform network
                               rooted at this platform.
        @param event_callback  Listener of events generated by this driver
        """
        PlatformDriver.__init__(self, event_callback)

        # CIOMSClient instance created by connect() and destroyed by disconnect():
        self._rsn_oms = None

        # TODO(OOIION-1495) review the following. Commented out for the moment.
        # But yes, we would probably need some concept of currently "active
        # ports", probably defined as those where there are active instruments
        #  associated.
        """
        # Simple list of active ports in this deployment configuration:
        # (this should be all the ports that have devices attached. Used in go_active processing
        self._active_ports = []
        """

        # URL for the event listener registration/unregistration (based on
        # web server launched by ServiceGatewayService, since that's the
        # service in charge of receiving/relaying the OMS events).
        # NOTE: (as proposed long ago), this kind of functionality should
        # actually be provided by some component more in charge of the RSN
        # platform netwokr as a whole -- as opposed to platform-specific).
        self.listener_url = None
    def _configure(self, driver_config):
        """
        Nothing special done here, only calls super.configure(driver_config)

        @param driver_config with required 'oms_uri' entry.
        """

        log.error("%r: _configure...", self._platform_id)

        PlatformDriver._configure(self, driver_config)

        self.nodeCfg = NodeConfiguration()

        self._platform_id = driver_config['node_id']
        self.nodeCfg.openNode(
            self._platform_id,
            driver_config['driver_config_file']['node_cfg_file'])

        self.nms_source = self.nodeCfg.node_meta_data['nms_source']

        self.oms_sample_rate = self.nodeCfg.node_meta_data['oms_sample_rate']

        self.nodeCfg.Print()

        self._construct_resource_schema()

        self._lastRcvSampleTime = {}
Example #7
0
    def _configure(self, driver_config):
        """
        Nothing special done here, only calls super.configure(driver_config)

        @param driver_config with required 'oms_uri' entry.
        """
        PlatformDriver._configure(self, driver_config)

        self.nodeCfg = NodeConfiguration()

        self._platform_id = driver_config['node_id']
        self.nodeCfg.openNode(
            self._platform_id,
            driver_config['driver_config_file']['node_cfg_file'])

        self.nms_source = self.nodeCfg.node_meta_data['nms_source']

        self.oms_sample_rate = self.nodeCfg.node_meta_data['oms_sample_rate']

        self.read_only_mode = self.nodeCfg.node_meta_data['read_only_mode']
        log.info("READ ONLY MODE: %s" % self.read_only_mode)

        self.nodeCfg.Print()

        self._construct_resource_schema()
Example #8
0
    def configure(self, driver_config):
        """
        Nothing special done here, only calls super.configure(driver_config)

        @param driver_config with required 'oms_uri' entry.
        """
        PlatformDriver.configure(self, driver_config)
        self._construct_resource_schema()
Example #9
0
    def configure(self, driver_config):
        """
        Nothing special done here, only calls super.configure(driver_config)

        @param driver_config with required 'oms_uri' entry.
        """
        PlatformDriver.configure(self, driver_config)
        self._construct_resource_schema()
    def __init__(self, event_callback, refdes=None):
        """
        Creates an RSNPlatformDriver instance.
        @param event_callback  Listener of events generated by this driver
        """
        PlatformDriver.__init__(self, event_callback)

        # CIOMSClient instance created by connect() and destroyed by disconnect():
        self._rsn_oms = None
    def __init__(self, event_callback, refdes=None):
        """
        Creates an RSNPlatformDriver instance.
        @param event_callback  Listener of events generated by this driver
        """
        PlatformDriver.__init__(self, event_callback)

        # CIOMSClient instance created by connect() and destroyed by disconnect():
        self._rsn_oms = None
Example #12
0
    def _configure(self, driver_config):
        """
        Nothing special done here, only calls super.configure(driver_config)

        @param driver_config with required 'oms_uri' entry.
        """
        PlatformDriver._configure(self, driver_config)
        self.nodeCfgFile = NodeConfiguration()
        #self.nodeCfgFile.Open(self._platform_id,self._driver_config['driver_cfg_file']['default_cfg_file'],self._driver_config['driver_cfg_file']['node_cfg_file'])

        self._construct_resource_schema()
    def _configure(self, driver_config):
        """
        Nothing special done here, only calls super.configure(driver_config)

        @param driver_config with required 'oms_uri' entry.
        """
        PlatformDriver._configure(self, driver_config)
        self.nodeCfgFile = NodeConfiguration()
        #self.nodeCfgFile.Open(self._platform_id,self._driver_config['driver_cfg_file']['default_cfg_file'],self._driver_config['driver_cfg_file']['node_cfg_file'])

        self._construct_resource_schema()
    def _configure(self, driver_config):
        """
        Nothing special done here, only calls super.configure(driver_config)

        @param driver_config with required 'oms_uri' entry.
        """
        PlatformDriver._configure(self, driver_config)

        self.node_config = NodeConfiguration(driver_config["driver_config_file"]["node_cfg_file"])

        self._platform_id = self.node_config.platform_id

        self.nms_source = self.node_config.node_meta_data["nms_source"]

        self.oms_sample_rate = self.node_config.node_meta_data["oms_sample_rate"]

        self.read_only_mode = self.node_config.node_meta_data["read_only_mode"]
        log.info("READ ONLY MODE: %s" % self.read_only_mode)

        self._construct_resource_schema()
    def __init__(self, event_callback):
        """
        Creates an RSNPlatformDriver instance.
        @param event_callback  Listener of events generated by this driver
        """
        PlatformDriver.__init__(self, event_callback)

        # CIOMSClient instance created by connect() and destroyed by disconnect():
        self._rsn_oms = None

        # URL for the event listener registration/unregistration (based on
        # web server launched by ServiceGatewayService, since that's the
        # service in charge of receiving/relaying the OMS events).
        # NOTE: (as proposed long ago), this kind of functionality should
        # actually be provided by some component more in charge of the RSN
        # platform netwokr as a whole -- as opposed to platform-specific).
        self.listener_url = None

        # scheduler config is a bit redundant now, but if we ever want to
        # re-initialize a scheduler we will need it.
        self._scheduler = None
Example #16
0
    def __init__(self, pnode, event_callback, create_event_subscriber,
                 destroy_event_subscriber):
        """
        Creates an RSNPlatformDriver instance.

        @param pnode           Root PlatformNode defining the platform network
                               rooted at this platform.
        @param event_callback  Listener of events generated by this driver

        @param create_event_subscriber
        @param destroy_event_subscriber
        """
        PlatformDriver.__init__(self, pnode, event_callback,
                                create_event_subscriber,
                                destroy_event_subscriber)

        # CIOMSClient instance created by connect() and destroyed by disconnect():
        self._rsn_oms = None

        # TODO(OOIION-1495) review the following. Commented out for the moment.
        # What does "ports that have devices attached" mean?
        """
        # Simple list of active ports in this deployment configuration:
        # (this should be all the ports that have devices attached. Used in go_active processing
        self._active_ports = []
        """

        self._instr_port_map = {}

        # URL for the event listener registration/unregistration (based on
        # web server launched by ServiceGatewayService, since that's the
        # service in charge of receiving/relaying the OMS events).
        # NOTE: (as proposed long ago), this kind of functionality should
        # actually be provided by some component more in charge of the RSN
        # platform netwokr as a whole -- as opposed to platform-specific).
        self.listener_url = None

        # external event listener: created in _start_event_dispatch
        self._event_listener = None
Example #17
0
    def __init__(self, pnode, event_callback,
                 create_event_subscriber, destroy_event_subscriber):
        """
        Creates an RSNPlatformDriver instance.

        @param pnode           Root PlatformNode defining the platform network
                               rooted at this platform.
        @param event_callback  Listener of events generated by this driver

        @param create_event_subscriber
        @param destroy_event_subscriber
        """
        PlatformDriver.__init__(self, pnode, event_callback,
                                create_event_subscriber, destroy_event_subscriber)

        # CIOMSClient instance created by connect() and destroyed by disconnect():
        self._rsn_oms = None

        # TODO(OOIION-1495) review the following. Commented out for the moment.
        # What does "ports that have devices attached" mean?
        """
        # Simple list of active ports in this deployment configuration:
        # (this should be all the ports that have devices attached. Used in go_active processing
        self._active_ports = []
        """

        self._instr_port_map = {}

        # URL for the event listener registration/unregistration (based on
        # web server launched by ServiceGatewayService, since that's the
        # service in charge of receiving/relaying the OMS events).
        # NOTE: (as proposed long ago), this kind of functionality should
        # actually be provided by some component more in charge of the RSN
        # platform netwokr as a whole -- as opposed to platform-specific).
        self.listener_url = None

        # external event listener: created in _start_event_dispatch
        self._event_listener = None