Hello,
I believe the issue you are having is that you are sending a requestComponentControl to all components. This means you are also sending it to the NodeManager and possibly a Communicator component? You may actually be sending it to yourself as well (interesting thought there)... anyway, you want to explicitly send the request to the effector component and only the effector component. You can query the NodeManager for the JAUS address of the effector component by using the function nodeManagerLookupAddress() or nodeManagerLookupServiceAddress() in the nodeManagerInterface.h file. You can lookup the effector by component ID or service number.
There is an example of this in the ojVehicleSim in the wd.c file:
| Code: |
void wdInitState(OjCmpt wd)
{
WdData *data;
data = (WdData*)ojCmptGetUserData(wd);
if(data->pdAddress->node == 0)
{
if(ojCmptLookupAddress(wd, data->pdAddress))
{
jausAddressCopy(data->setWrench->destination, data->pdAddress);
}
}
|
Hope that helps!
~Danny