Comprehedible ping cpp sample files listing

Hi, the page Developing Codelets in C++ — ISAAC 2020.2 documentation
seems quite cumbersome as it doesn’t reflect complete but fragmentory files BUILD, .app.json.
It is very ambigious if every sequential code fragment needs to be added as continuation or instead of the code from fragment before added to file earlier.
could someone share complete tested BUILD/ .app.json for the very basic ping cpp example, please?
E.g.
first we create with the tutorial the json file with the content

{
  "name": "ping"
}

then it is suggested to add it it the following:

{
  "name": "ping",
  "graph": {
    "nodes": [
      {
        "name": "ping",
        "components": []
      }
    ],
    "edges": []
  }
}

Does it need to be added as in “appended” or added as in substituted regarding previous entry?
Moreover, further it is suggested that the following needs to be added to the very same json file, right?


isaac_app(
    name = "ping",
    modules = ["//packages/ping:ping_components"]
)
{
  "name": "ping",
  "modules": [
    "ping:ping_components"
  ],
  "graph": {
    ...
  }
}

the continuation suggests to add

{
  "name": "ping",
  "modules": [
    "ping:ping_components"
  ],
  "graph": {
    ...
  },
  "config": {
    "ping" : {
      "ping" : {
        "tick_period" : "1Hz"
      }
    }
  }
}

I am having hard time guessing gaps in the instruction in regards on how to populate the sample app.json & BUILD files
Is the correct resulting .json file is just merging of all pieces above?
like depicted below?

{
  "name": "ping"
}
{
  "name": "ping",
  "graph": {
    "nodes": [
      {
        "name": "ping",
        "components": []
      }
    ],
    "edges": []
  }
}
isaac_app( name = "ping", modules = ["//packages/ping:ping_components"] )
{
  "name": "ping",
  "modules": [
    "ping:ping_components"
  ],
  "graph": {
    ...
  }
}
{
  "name": "ping",
  "modules": [
    "ping:ping_components"
  ],
  "graph": {
    ...
  },
  "config": {
    "ping" : {
      "ping" : {
        "tick_period" : "1Hz"
      }
    }
  }
}

or thr fragment in the output above has lines that related to isaac but shouldn’t go into the json file ? but to BUILD only? so could you list full examples please, if it is possible to share.

Tried version of BUILD file


load("@com_nvidia_isaac_sdk//bzl:module.bzl", "isaac_app")

isaac_app(
     name = "ping"
)
isaac_app(
  ...
)

isaac_cc_module(
  name = "ping_components",
  srcs = ["Ping.cpp"],
  hdrs = ["Ping.hpp"],
)

isaac_app(
    name = "ping",
    modules = ["//packages/ping:ping_components"]
)

Ping.cpp

void Ping::stop() {}
void Ping::start() {
  tickPeriodically();
}
void Ping::tick() {
  LOG_INFO("ping");
}