Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

With this information we are ready to compile our first component that will print the "Hello World" message.

Client

For simplicity, we implement a simple client in Python to communicate with the 3 programming languages:

Code Block
languagepy
linenumberstrue
collapsetrue
from Acspy.Clients.SimpleClient import PySimpleClient


client = PySimpleClient()

hc_py = c.getComponent("PY_HELLO_COMP")
hc_java = c.getComponent("JAVA_HELLO_COMP")
hc_cpp = c.getComponent("CPP_HELLO_COMP")

hc_py.printHello()
hc_java.printHello()
hc_cpp.printHello()

Output

The output is seen on each container:

Py

Code Block
...
2020-07-28T21:14:29.850 aragornContainer run - Calling maci::CBComponentInfo::done with descOut.id_tag = 2 for 'PY_HELLO_COMP'
2020-07-28T21:14:29.858 aragornContainer run - Call to maci::CBComponentInfo::done with descOut.id_tag = 2 for 'PY_HELLO_COMP' completed
Just printing 'Hello World!'
...

Java

Code Block
...
2020-07-28T21:09:13.385 DELOUSE [frodoContainer] Calling maci::CBComponentInfo::done with descOut.id_tag = %d.1 for 'JAVA_HELLO_COMP'
2020-07-28T21:09:13.411 DELOUSE [frodoContainer] Call to maci::CBComponentInfo::done with descOut.id_tag = %d.1 for 'JAVA_HELLO_COMP' completed
2020-07-28T21:09:16.598 DELOUSE [frodoContainer] intercepted a call to 'JAVA_HELLO_COMP#printHello'.
Just printing 'Hello World!'
2020-07-28T21:09:16.599 DELOUSE [frodoContainer] returning from JAVA_HELLO_COMP#printHello after 0 ms.
...

C++

Code Block
...
2020-07-28T21:19:53.080 [Container-ActivationMethod - maci::ActivationMethod::call] Calling maci::CBComponentInfo::done with descOut.id_tag = 4.
2020-07-28T21:19:53.082 [Container-ActivationMethod - maci::ActivationMethod::call] Call to maci::CBComponentInfo::done with descOut.id_tag = 4 completed.
Just saying 'Hello World!'
...