Example #1
0
def _sca_code(ossie_code):
    sca_code = spd.code(type_=ossie_code.get_type())
    sca_code.set_localfile(_sca_localfile(ossie_code.get_localfile()))

    # Optional elements
    ep = ossie_code.get_entrypoint()
    s = ossie_code.get_stacksize()
    p = ossie_code.get_priority()
    if ep:
        sca_code.set_entrypoint(spd.entrypoint(ep))
    if s:
        sca_code.set_stacksize(s)
    if p:
        sca_code.set_priority(p)
    return sca_code
Example #2
0
    def _setPythonImplementation(self):
        localfile = spd.localFile(name=self.implementation)
        code = spd.code(
            type_="Executable",
            localfile = localfile,
            entrypoint="python/" + self.name + ".py")

        implementation = spd.implementation(
            id_ = self.implementation,
            code = code,
            programminglanguage = spd.programmingLanguage(name="Python"),
            humanlanguage = spd.humanLanguage(name = "EN"),
            runtime = spd.runtime(version="2.4.4", name="python"))
        os = spd.os(name="Linux")
        implementation.add_os(value=os)

        self.spd.add_implementation(value = implementation)
Example #3
0
    def _setJavaImplementation(self):
        localfile = spd.localFile(name=self.implementation)
        code = spd.code(
            type_="Executable",
            localfile = localfile,
            entrypoint="java/startJava.sh")

        implementation = spd.implementation(
            id_ = self.implementation,
            code = code,
            compiler = spd.compiler(version="1.5", name="/usr/bin/javac"),
            programminglanguage = spd.programmingLanguage(name = "Java"),
            humanlanguage = spd.humanLanguage(name="EN"),
            runtime = spd.runtime(name = "/usr/bin/java", version="1.5"))
        os = spd.os(name="Linux")
        implementation.add_os(value=os)

        self.spd.add_implementation(value = implementation)
Example #4
0
 def _setCppImplementation(self):
     localfile = spd.localFile(name=self.implementation)
     code = spd.code(
         type_="Executable",
         localfile = localfile,
         entrypoint=self.implementation+"/"+self.name)
     compiler = spd.compiler(version="4.1.2", name="/usr/bin/gcc")
     implementation = spd.implementation(
         id_ = self.implementation,
         code=code,
         compiler=compiler,
         programminglanguage = spd.programmingLanguage(name="C++"),
         humanlanguage = spd.humanLanguage(name="EN"))
     os = spd.os(name="Linux")
     implementation.add_os(value=os)
     implementation.add_processor(spd.processor(name="x86"))
     implementation.add_processor(spd.processor(name="x86_64"))
     self.spd.add_implementation(value = implementation)
    def _setImplementation(self):
        '''
        Enter the appropriate values into the implementation element of the
        spd file.

        '''

        localfile = spd.localFile(name=self.implementation + "/share")
        code = spd.code(type_="SharedLibrary", localfile=localfile)
        compiler = spd.compiler(version="4.1.2", name="/usr/bin/gcc")

        implementation = spd.implementation(
            id_=self.implementation,
            description="",
            code=code,
            compiler=compiler,
            programminglanguage=spd.programmingLanguage(name="Octave"),
            humanlanguage=spd.humanLanguage(name="EN"))
        os = spd.os(name="Linux")
        implementation.add_os(value=os)
        self.spd.add_implementation(value=implementation)