Skip to content

Latest commit

 

History

History
111 lines (93 loc) · 3.48 KB

File metadata and controls

111 lines (93 loc) · 3.48 KB

Copyright (c) Microsoft Corporation. Licensed under the MIT license.

1. Intructions

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.

2. Steps

2.1. Build the jbpf

cd $JRTC_PATH/jbpf-protobuf/jbpf
./init_and_patch_submodules.sh
source setup_jbpf_env.sh
mkdir -p build
cd build
cmake ../
make -j

2.2. Build the jrtc

cd $JRTC_PATH
./init_submodules.sh
source setup_jrtc_env.sh
mkdir -p build
cd build
cmake ../
make

2.3. Build the Jbpf codelets

cd $JRTC_PATH/sample_apps/first_example_py
source ../../setup_jrtc_env.sh
make -C ../jbpf_codelets/data_generator
make -C ../jbpf_codelets/simple_input

2.4. Build the Jbpf IPC agent

cd $JRTC_PATH/sample_apps/first_example_py
source ../../setup_jrtc_env.sh
make -C simple_agent_ipc

2.5. Open a terminal and run jrtc ..

cd $JRTC_PATH/sample_apps/first_example_py
source ../../setup_jrtc_env.sh
sudo -E ./run_jrtc.sh

2.6. Open a separate terminal and run the Jbpf IPC agent

cd $JRTC_PATH/sample_apps/first_example_py
source ../../setup_jrtc_env.sh
sudo -E ./run_simple_agent_ipc.sh

If successful, one of the log messages at the agent side should report Registration succeeded:.

2.7. Open a separate terminal and run reverse proxy

cd $JRTC_PATH/sample_apps/first_example_py
source ../../setup_jrtc_env.sh
sudo -E ./run_reverse_proxy.sh

2.8. Open a separate terminal and run decoder

cd $JRTC_PATH/sample_apps/first_example_py
source ../../setup_jrtc_env.sh
sudo -E ./run_decoder.sh

2.9. Open a separate terminal and load the yaml

cd $JRTC_PATH/sample_apps/first_example_py
source ../../setup_jrtc_env.sh
sudo -E ./load_app.sh

2.10. To unload the codelets and the application, use the following command:

cd $JRTC_PATH/sample_apps/first_example_py
source ../../setup_jrtc_env.sh
sudo -E ./unload_app.sh