Ejemplo n.º 1
0
    def driver_dir(self):
        """
        @brief full path to the driver code
        @retval driver path
        """
        if not self.driver_make:
            raise DriverParameterUndefined("driver_make undefined in metadata")

        if not self.driver_model:
            raise DriverParameterUndefined(
                "driver_model undefined in metadata")

        if not self.driver_name:
            raise DriverParameterUndefined("driver_name undefined in metadata")

        return os.path.join(self.base_dir, "mi", "instrument",
                            self.relative_driver_path())
Ejemplo n.º 2
0
    def driver_dir(self):
        """
        @brief full path to the driver code
        @retval driver path
        """
        if not self.metadata.driver_path:
            raise DriverParameterUndefined("driver_path undefined in metadata")

        return os.path.join(self.driver_base_dir(), self.metadata.driver_path)
Ejemplo n.º 3
0
    def driver_base_dir(self):
        """
        @brief full path to the driver make dir
        @retval driver make path
        """
        if not self.metadata.driver_path:
            log.info("metadata is %s", self.metadata)
            raise DriverParameterUndefined("driver_path undefined in metadata")

        return os.path.join(Config().base_dir(), "mi", "dataset", "driver")
Ejemplo n.º 4
0
    def driver_dir(self):
        """
        @brief full path to the driver code
        @retval driver path
        """
        if not self.metadata.driver_name:
            raise DriverParameterUndefined("driver_name undefined in metadata")

        return os.path.join(self.driver_model_dir(),
                            self.metadata.driver_name.lower())
Ejemplo n.º 5
0
    def driver_make_dir(self):
        """
        @brief full path to the driver make dir
        @retval driver make path
        """
        if not self.metadata.driver_make:
            raise DriverParameterUndefined("driver_make undefined in metadata")

        return os.path.join(Config().base_dir(), "mi", "instrument",
                            self.metadata.driver_make.lower())