Hi,
Now after developing the component we need to use the xml or cpf file for setting the properties.
Using non-ROS method, we deploy the component into Orocos, and We need to know how to install the XML and CPF files. which will allowing the code to be dynamic
from:
this->getProvider<Marshalling>("marshalling")->readProperties("Hard Code Path To File.cpf");
To:
this->getProvider<Marshalling>("marshalling")->readProperties(this->getName() + ".cpf");
Finally, Is this the right track, or there is another usage for this CPF files?
What is the best practice to install the CPF and XML file of my
On Mon, Apr 20, 2015 at 10:36 AM, <alaaeldeen [dot] abdalrahman [..] ....j
wrote:
> Hi,
>
> Now after developing the component we need to use the xml or cpf file for
> setting the properties.
>
> Using non-ROS method, we deploy the component into Orocos, and We need to
> know how to install the XML and CPF files. which will allowing the code to
> be
> dynamic
>
> from:
>
> this->getProvider("marshalling")->readProperties("Hard Code Path To
> File.cpf");
>
> To:
>
> this->getProvider("marshalling")->readProperties(this->getName() + ".cpf");
>
I usually never load the properties from file by the component itself but
by the deployer script or XML file, these give you a little bit more
flexibility on how you can add paths to the cpf file.
You could also add a property to your component that has a basePath that
you could set from somewhere else and do:
````
std::string base_path_prop;
this->addProperty("base",base_path_prop);
//Set the property in your deployment or something alike
this->getProvider("marshalling")->readProperties(this->base_path_prop + "/"
+ this->getName() + ".cpf");
````
R.
> Finally, Is this the right track, or there is another usage for this CPF
> files?
> --
> Orocos-Users mailing list
> Orocos-Users [..] ...
> http://lists.mech.kuleuven.be/mailman/listinfo/orocos-users
>
What is the best practice to install the CPF and XML file of my
This is a great solution, and it will solve a lot of issues for me.
Many Thanks!!
A.