Hi team,
I’m trying to execute a Server Component and a Client Component inside the same application and process following the documentation.
Documentation link:
[url]http://www.legato.io/legato-docs/15_01_1/component_putting_into_app.html[/url]
Adapting documentation code to the ‘helloIpc’ example (obteined from devstudio), I’ve created this example:
executables:
{
myServer = ( printServer )
myClient = ( printClient )
}
processes:
{
run:
{
(myServer)
(myClient)
}
}
bindings:
{
myClient.printClient.printer -> myServer.printServer.printer
}
This code works properly and client asks for the running server and prints the information.
And this is what I’m trying to do:
executables:
{
myApp = ( printServer printClient )
}
processes:
{
run:
{
(myApp)
}
}
bindings:
{
myApp.printClient.printer -> myApp.printServer.printer
}
Note: printClient and printServer were extracted from the ‘helloIpc’ application example
In this case the client and server don’t work properly.
Is it possible to do this ‘merge’ in the same process?
Does it make sense?
I know what I’m asking is for a comunication between 2 components inside the same process. Because of the ‘requires’ (api) inside the client cdef file, if my .adef changes to this:
executables:
{
myServer = ( printServer printClient )
}
processes:
{
run:
{
(myServer)
}
}
The compilation crashes with this error:
Description Resource Path Location Type
Client-side (required) interface 'myServer.printClient.printer' is unsatisfied. It has not been declared an external (inter-app) required interface (in a "requires: api:" section in the .adef) and has not been bound to any service (in the "bindings:" section of the .adef). IPCTest line 13 C/C++ Problem
Thanks,
Daniel