This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

xDAIS Package with Source

Hello!

 

Is there any documentation that describes how to make an xDAIS package containing just source code (i.e., no libraries)?

 

Basically, I implemented an IUNIVERSAL based algorithm in templated C++, because I want a generic typed implementation. However, obviously, the complier cannot generate code until the actual algorithm is referenced (i.e., used in other code -- e.g., the codec server). So, I am hoping that I can just package up the code that I wrote and reference that in our codec server and have it get compiled in as needed.

 

Otherwise, I am going to have to put C wrappers around each of my C++ class methods, which is work that I am hoping to avoid.

 

Have a great day!

 

Take care,

Darwin

  • Darwin

    I am not sure if I understand your question, but I will give it a shot.  By the way, what platform are you using (DM6446)?

    Since you mention codec server, I assume you are working under codec engine framework.  Since there can only be on executable running on DSP side at amy one time, algorithms such as IUNIVERSAL are normally libraries; the concept behind the codec engine framework is to allow your library (algorithm) and anybody else's library to co-exist.  The codec server is the executable image (x64P file) which includes a collection of all the libraries that can be called via codec engine APIs, normally you only instantiate the library (algorithm) you need.

    That said, having the codec server instatiate your algorithm breaks this model, the coder server does not do this, it is the user application which loads codec server image and isntantiates algorithms.  You also do not have to include one C++ method per algorithm, you can use the control API to send a variety of different requests to your algorithm and have it call the multiple C++ class methods on your one and only algorithm. 

    I hope this helps and apologies if I misunderstood anything; if I did, please feel free to clarify your position and I will do my best to respond.

     

     

  • Juan,

     

    Thanks for your response.

     

    Do you have an example of having the control API call my C++ class' algorithms?

     

    BTW, I am using templated C++. Thus, I do not have a class, per se, but a template that tells the compiler how to build a class. (If I had a class, I could just build it into a library.)

     

    I am trying to avoid having to create a particular class (e.g., by instantiating a particular class via the template and then creating wrapper methods to ensure that each of the methods that gets used gets instantiated).

     

    I hope that this is clear. If it is not, perhaps you can give me a call? (I believe that you still have my number, correct?)

     

    Have a great day!

     

    Take care,

    Darwin

     

    P.S. Yes, we are working on a DM6446 platform.

  • The FAQ section here specifies that while XDAIS allows algorithms to be consumed inside a C++ environment, it does not support C++ algorithms.  You would also have issues with the package itself (i.e. the RTSC portion).  Part of the package specification is a meta-function called getLibs which returns the name of the appropriate library to be consumed.

  • Brad,

     

    Yes, actually, it is just our internal implementation that is done in C++. The external module and IALG interfaces are done in C. I used C wrapper functions to call the various static C++ class methods.

     

    However, now I have everything done and the algorithm package and library built, but my server is balking when I try to build my algorithm into it. Here is the error that it is producing: js: "./codec.cfg", line 44: algorithms.ssr.SSR: no property named 'alg'.

     

    Is there a way to dump the contents of the library (.l64P) file, since I suspect that one of the symbols may not be getting named correctly or something in the library.

     

    If you have any other helpful suggestions, they would be appreciated.

     

    Have a great day!

     

    Take care,

    Darwin

  • HyperGalaxy said:

    However, now I have everything done and the algorithm package and library built, but my server is balking when I try to build my algorithm into it. Here is the error that it is producing: js: "./codec.cfg", line 44: algorithms.ssr.SSR: no property named 'alg'.

    So what is line 44 of codec.cfg?

     

  • Brad,

     

    Here it is:

     

    SSR.alg.watermark    = true   ;

     

    It is just trying to access the alg property of the SSR algorithm, but it cannot seem to find it. Thus, I was hoping that it might be possible to dump the algorithm library (.l64P) file to see how things are getting labeled...

     

    I am not really sure what else to do, and I am wrapping up with this client. So, I am currently migrating everything to C, which is not ideal, since now they are going to need to create new C implementations for each underlying data type that they want to use in the future. (With my C++ implementation, they only needed to change certain class template parameters to get the compiler to generate the appropriate methods for the new data types.)

     

    Have a great day!

     

    Take care,

    Darwin

  • This has nothing to do with C/C++ (good!) or even your codec library at all(!); it has to do with the XDC packaging around your library and the fact that the Server config script is trying to access/change something that's not in your codec package - namely, the SSR.alg.watermark config param.

    Can you post your codec.cfg file?

    Did you use the RTSC codec packaging wizard to generate your codec package?  If so, did you check the 'create ce content' box:

    http://tiexpressdsp.com/index.php?title=RTSC_Codec_Package_Wizard_FAQ#What_does_the_.22Create_ce_content.22_checkbox_do.3F

    You may have a file in a 'ce' subdirectory named "SSR.xdc" - if you do, can you post that as well?

    Chris

  • Chris,

     

    Thank the Lord!

     

    Okay, here are the files for building the algorithm package: 0677.AlgorithmBuildFiles.zip

     

    Here are the files for building the server: 8206.ServerBuildFiles.zip

     

    No, I did not use the package wizard. I just created these files by hand. (I have always done this in the past without any issues.)

     

    BTW, I am working on a Linux platform...

     

    Have a great day, and thanks, much, for your help!

     

    Take care,

    Darwin

  • Your codec.cfg script just needs a little tweak.  The 'SSR' Module in the algorithms.ssr package doesn't have an 'ialg' config param.  (You said 'alg' above, but the code attached has 'ialg').

    You should be able to just change this:

        SSR.ialg.watermark = true;

    to this

        SSR.watermark = true;

    (And similarly for the SSR.*Section config lines).

    Finally, it looks like you used the Server Wizard to generate your Server package... which unfortunately does "special stuff" based on the way the _Codec_ Wizard generates its codec packages.  :(  You may get bitten by the server's validate() fxn (in package.xs) which is going to try looking for a algorithms.ssr.ce.SSR module (that doesn't exist - but would if you used the Codec Wizard).  You can just comment out/remote the 'validate_one_codec()' call in the Server's package.xs script.

    Chris

  • Hey, thanks, Chris.

     

    BTW, I tried removing the references to .alg and .ialg, previously, but that produces the following error (which I do not understand):

     

    configuring ssr_server.x64P from package/cfg/ssr_server_x64P.cfg ...

    platform   = ti.platforms.evmDM6446

    js: "./codec.cfg", line 64: ti.sdo.ce.Server/algs/0: incompatible assignment to mod :xdc.services.intern.xsr.Value$Obj@1a7ddcf::algorithms.ssr.SSR

        "./server.cfg", line 64

        "./package/cfg/ssr_server_x64P.cfg", line 763

        "./package/cfg/ssr_server_x64P.cfg", line 722

    gmake: *** [package/cfg/ssr_server_x64P.xdl] Error 1

    gmake: *** [package/cfg/ssr_server_x64P.xdl] Deleting file `package/cfg/ssr_server_x64Pcfg.cmd'

    gmake: *** [package/cfg/ssr_server_x64P.xdl] Deleting file `package/cfg/ssr_server_x64Pcfg_c.c'

    gmake: *** [package/cfg/ssr_server_x64P.xdl] Deleting file `package/cfg/ssr_server_x64Pcfg.s62'

     

    It is complaining about my Server.algs array, but it looks fine to me. Thus, I assumed that there must be some naming issue in my algorithm library. So, I went back to try to track down why the .alg property is missing.

     

    Also, I was using .alg but later changed it to .ialg, since that is what I call the IALG_Obj property in my C++ implementation. So, I thought that I might need to nail down that error, first, before proceeding in hopes that it would make this mystery error go away, if that makes any sense.

     

    Do you know what these errors mean, by any chance?

     

    Have a great day!

     

    Take care,

    Darwin

  • I think the error your getting on line 64 is a [horribly explained] type assignment error.

    Each element in the Server.algs array needs a "mod: " assignment to a module that inherits from 'ti.sdo.ce.ICodec'.  You're assigning a module (i.e. the "algorithm.ssr.SSR" Module) that doesn't inherit from ti.sdo.ce.ICodec.  Do you have a second package (e.g. algorithm.ssr.ce) with a Module in it (e.g. algortihm.ssr.ce.SSR) that inherits from ti.sdo.ce.ICodec?  (Or more accurately, if your alg implements IUNIVERSAL, your module may inherit from ti.sdo.ce.universal.IUNIVERSAL - which itself inherits from ti.sdo.ce.ICodec?)

    If not, stop here.  If so, read on...

    Change your codec.cfg's xdc.useModule from this:

        var SSR = xdc.useModule('algorithm.ssr.SSR');

    to

        var SSR = xdc.useModule('algorithm.ssr.ce.SSR');

    ... _AND_ (assuming your algorithm.ssr.ce.SSR module _does_ have an 'alg' config param in it's algorithm/ssr/ce/SSR.xdc file!) restore the '.alg' reference we just removed above.  That is, the following should work again:

        SSR.alg.watermark = true;

    You basically need the "SSR" variable to be a handle to a Module that implements an interface derived from ti.sdo.ce.ICodec.  Your algorithm.ssr.SSR does _not_.  I'm hoping you have a algorithm.ssr.ce.SSR that does.

    Chris

  • Chris,

     

    Our algorithm does not have a CE directory. Also, I just took the algorithm's configuration files from an analogous algorithm that seemed to build fine. I wonder if I should go ahead and recreate the build files using the wizard?

     

    Have a great day!

     

    Take care,

    Darwin

  • Yep, that's what I'd recommend.  Be sure to check the "create ce content" option since you want to integrate your alg into Codec Engine.

    http://tiexpressdsp.com/index.php?title=RTSC_Codec_Package_Wizard_FAQ#What_does_the_.22Create_ce_content.22_checkbox_do.3F

    Chris

  • Thanks, Chris.

     

    BTW, this is probably a really ignorant question, but when I use the Linux version of the RTSC Codec Package Wizard (xs ti.sdo.codecutils.genpackage -g), it will not allow me to proceed past step 2 of 6 (Library Information). Is this a known problem?

     

    Also, I recevie the following error when I start the wizard, even though my MOZILLA_FIVE_HOME enviroment variable is set correctly:

     

    **** warning: package xdc.tools.sg.linux_swt depends on the

    Mozilla browser for some functionality. Your environment doesn't

    currently point to Mozilla, so some XDC graphical tools may fail.

    To prevent this, please set up the following in your environment:

     

     - set the MOZILLA_FIVE_HOME environment variable. Its value

       should be the directory that contains the file run-mozilla.sh,

       which you can find using the command:

           locate run-mozilla.sh

     

    Have a great day!

     

    Take care,

    Darwin

     

  • Chris,

     

    Do you have any idea why the RTSC codec package wizard is not working for me???

     

    Have a great weekend!

     

    Take care,

    Darwin

  • Step 2 makes you set a library name for each configuration, and won't let you continue until you've done that.  Did you pick a library for each configuration?

    If you don't have different configurations (e.g. watermark) and therefore different libs, you can 'remove' all boolean configs and then you just have to specify your single library.  A double click of the default 'null' value will let you pick the file name of your library.  Once that's set, the "Next" button should be enabled.


    (FWIW, each of the steps has a "help | Instructions" that's relevant to the step you're on.)

    I think you can ignore the MOZILLA warning.

    Chris