BroadView™ API Guide and Reference Manual
Source Code Organization

The Broadview Instrumentation agent source code organization is depicted in the figure below.

The top-level directory broadview contains source code for BroadView™ Agent application and Reference applications like BST and Packet Trace. The source code is organized into eight main directories namely src, bin, tools, example, vendor, platform, doc and output. These are explained below.

sourcecode.jpg
Figure 1: Source Code Organization

The src folder contains the Agent code. The source code under src is organized in multiple subdirectories as follows:

src/sb_plugin/sb_brcm/sb_common/system contains South Bound plugin APIs for system e.g. getting system name or MAC or IP address.

src/sb_plugin/sb_brcm/sb_common/<feature> contains silicon feature specific South Bound plugin APIs e.g. BST feature. The South Bound API makes OpenNSLAPI.

src/sb_plugin/sb_brcm/sb_opennsl contains system and feature specific South Bound plugin macros specific to OpenNSL SB Plugin.

src/sb_plugin/sb_redirector contains South Bound plugin redirector APIs.

src/nb_plugin/rest contains North Bound specific REST API code

src/apps/agent contains common agent code which initializes various modules

src/apps/<feature> contains silicon feature specific code that interacts with North Bound and South Bound APIs

src/infrastructure/module_mgr contains module manager code which finds out the right handler API for a particular feature specific REST request.

src/infrastructure/system contains system specific functions like timer.

src/infrastructure/logging contains logging module.

src/public contains common header files.

The tools directory is meant for source code build (compilation) purposes. It contains common Makefile for building BroadView™ Agent and the reference applications. The vendor directory contains the following.

Any third-party source code used for the BroadView™ Agent.

The platform directory contains silicon specific constants and kernel header files.

The output directory contains tool chain related information to cross compile for specific target platform. The various outputs of the build process are kept under output directory.

The example directory contains source code for reference application (BroadViewBstApp and BroadViewPacketTraceApp) which demonstrates the agent functionality by using REST API to communicate with the BroadView™ Agent.

The doc directory contains documentation like API references and details of Externally Licensed software in the codebase.

The bin directory contains executables and shared libraries.