Hi everyone,
I have tested how IPC works between Legato components
http://www.legato.io/legato-docs/14_10/componenthello_i_p_c.html#helloIPCDefiningTheAPI
Now, I would like to do it between a Component (working as a Server) and an Application (working as a Client). Make sense?
If not, how can I ‘invoke’ a Component function through an App?
I’ve try to solve it with no success following the next steps:
COMPONENT
The first step was to ‘provide’ the api file through the .cdef of the Component (myComponent):
provides: { api: { myapi = test.api } }
Also, within the .c file (of the Component), I’ve added the following line:
#include "interfaces.h"
APPLICATION
Then, in the App (client), I have included a reference of the Component: myApp -> References -> Edit dependencies … -> check myComponent
The next step (here is where I have the problem ) is to ‘require’ test.api file in the App (client). So, the .adef file looks like this:
requires:
{
api: { myapi = test.api }
}
The error:
myApp.adef:40: ERROR: Second '.' separator missing in internal interface specification 'test.api'. Should be of the form "exe.component.interface".
Also, I’ve change the .adef file following the above error suggestion:
requires:
{
api: { myapi = component.MyComponent.myapi }
}
The error:
myApp.adef:40: ERROR: Client-side IPC API interface 'component.MyComponent.myapi' not found in app 'myApp'. Component instance 'component.MyComponent' does not have a client-side interface named 'myapi'.
What can I do in order to ‘invoke’ a Component function from an App?
Thanks!
Information
Legato Application Framework version: 14.10