Copyright (c) Microsoft Corporation. Licensed under the MIT license.
- 1. Intructions
- 2. Steps
- 2.1. Build the jbpf
- 2.2. Build the jrtc
- 2.3. Build the Jbpf codelets
- 2.4. Build the Jbpf IPC agent
- 2.5. Open a terminal and run jrtc ..
- 2.6. Open a separate terminal and run the Jbpf IPC agent
- 2.7. Open a separate terminal and run reverse proxy
- 2.8. Open a separate terminal and run decoder
- 2.9. Open a separate terminal and load the yaml
- 2.10. To unload the codelets and the application, use the following command:
This example demonstrates a simple JRTC application that loads two codelets to a simple jbpf agent. The data_generator codelet increments a counter and sends the data to the JRTC app via an output map. The JRTC application aggregates the counter, prints a message about the aggregate value and sends this value to the simple_input codelet via a control_input channel. The simple_input codelet prints the received values.
This example assumes that you already have Jbpf and you have already built the Jbpf library without DPDK support (cmake option -DUSE_DPDK=off).
Also, it assumes that you are running all the below steps as root.
Steps to run the example.
cd $JRTC_PATH/jbpf-protobuf/jbpf
./init_and_patch_submodules.sh
source setup_jbpf_env.sh
mkdir -p build
cd build
cmake ../
make -jcd $JRTC_PATH
./init_submodules.sh
source setup_jrtc_env.sh
mkdir -p build
cd build
cmake ../
makecd $JRTC_PATH/sample_apps/first_example_py
source ../../setup_jrtc_env.sh
make -C ../jbpf_codelets/data_generator
make -C ../jbpf_codelets/simple_inputcd $JRTC_PATH/sample_apps/first_example_py
source ../../setup_jrtc_env.sh
make -C simple_agent_ipccd $JRTC_PATH/sample_apps/first_example_py
source ../../setup_jrtc_env.sh
sudo -E ./run_jrtc.shcd $JRTC_PATH/sample_apps/first_example_py
source ../../setup_jrtc_env.sh
sudo -E ./run_simple_agent_ipc.shIf successful, one of the log messages at the agent side should report Registration succeeded:.
cd $JRTC_PATH/sample_apps/first_example_py
source ../../setup_jrtc_env.sh
sudo -E ./run_reverse_proxy.shcd $JRTC_PATH/sample_apps/first_example_py
source ../../setup_jrtc_env.sh
sudo -E ./run_decoder.shcd $JRTC_PATH/sample_apps/first_example_py
source ../../setup_jrtc_env.sh
sudo -E ./load_app.shcd $JRTC_PATH/sample_apps/first_example_py
source ../../setup_jrtc_env.sh
sudo -E ./unload_app.sh