I want to add a configuration parameter to my codec so that if I do this in my server .cfg:
MY_CODEC = xdc.useModule(codecs.my_codec.MY_CODEC);
MY_CODEC.maxArraySize = 15;
And use this as a constant in my_codec.c
unsigned int array[MY_CODEC.maxArraySize];
I have gone through the RTSC primers on http://rtsc.eclipse.org and have looked at how DMAN3, DSKT2, etc do the configuration parameters. The RTSC primers look so simple but I cannot get it to work.
package.xdc
package codecs.my_codec {
module MY_CODEC;
}
MY_CODEC.xdc (note in the RTSC primers there is no metaonly but i have to have it as inherits IVIDENC but DMAN3, etc have meta only and they can configure)
metaonly module VCA_TRACK_ENC inherits ti.sdo.ce.video.IVIDENC
{
config UInt maxArraySize = 5; // Default Value
}
server.cfg
MY_CODEC = xdc.useModule(codecs.my_codec.MY_CODEC);
MY_CODEC.maxArraySize = 15;
my_codec.c
unsigned int array[MY_CODEC.maxArraySize];