How to Contribute

Created on July 7, 2023


Work in progress

Code Contribution Process

Code Contribution Workflow

  • Deployment ready Product Branch has been created for RDK components that the community will push changes to review & It is with higher standards of test qualification

  • Monthly Sprint Branch (rdk-dev-yymm) is a new CMF integration branch, created monthly and baseline off Product Branch Branch. This branch will be hosted per repository in conjunction with Product branch with the goal of incorporating community changes at the earliest juncture.
  • Community changes, once approved, will be cherry-picked to Monthly Sprint branch (rdk-dev-yymm) and will thus be available prior to the completion of down-streaming/ round-trip process.
  • Approved contributions will be down-streamed to Regression Branch for pre-deployment validation using their test process
    • Defects will be planned in monthly sprints
    • Features will be presented for Architecture Review to be scheduled to an upcoming sprint. Sprint timelines to be published to contributor.
    • Contributions pending validation will be available in monthly development iteration branches
  • Down streamed Community changes, successfully merged to Regression branch, after pre-deployment test validation, the code changes will be cherry-picked to Product Branch

Code Contribution Workflow Diagram

  1. User will do code contribution to rdk-next branch. This will undergo:
    1. Code reviews
    2. Build verification
    3. License compliance scan
    4. Test validation
  2. Once successful, the change will get cherry-picked to Monthly Sprint Branch (rdk-dev-yymm)
  3. This code is then down-streamed to Regression Branch where pre-deployment test validation are done
  4. Once Comcast accepts, the change-set is cherry picked to Product Branch.
  5. Thus the change gets merged to Product Branch

Component owners/reviewers/approvers, defined as specific groups in Gerrit, will be added to the review by default. You may request additional feedback by specifically adding reviewers via the Gerrit web GUI. 

Product Branch

Product branch is a deployment ready branch is created for RDK components that the community will push changes to review.

Refer to Product Branch for the Components hosted in CMF Gerrit (https://code.rdkcentral.com)

Refer to RDK Central GitHub Components & its Branches hosted in https://github.com/rdkcentral/

Monthly Sprint Branch

Monthly Sprint Branch (rdk-dev-yymm) is a new CMF integration branch, created monthly and baseline off Product Branch. This branch will be hosted per repository in conjunction with Product branch with the goal of incorporating community changes at the earliest juncture.

Once community changes is  approved, will be cherry-picked to Monthly Sprint branch (rdk-dev-yymm) and will thus be available prior to the completion of down-streaming to Regression Branch / round-trip process.

Regression Branch

Regression branch is the branch used for validation of the contributions. Approved contributions will be down-streamed to Regression Branch for pre-deployment validation using their test process.

  • Defects will be planned in monthly sprints
  • Features will be presented for Architecture Review to be scheduled to an upcoming sprint. Sprint timelines to be published to contributor.
  • Contributions pending validation will be available in monthly development iteration branches

Down streamed Community changes, successfully merged to Regression branch, after pre-deployment test validation, the code changes will be cherry-picked to Product Branch. 

Development Workflow

This section describes the general RDK development work-flow and related topics.

The general pattern for successfully accepting a change is as follows:

  • Discuss on mailing list to get general consensus about approach
  • Pull latest code
  • Build on your supported platform
  • Develop feature or fix bug following RDK Coding standards
  • Submitt to gerrit for review
  • Review and Respond to reviewer comments
  • Change accepted and Merged

For an in detail step by step description please refer : Gerrit Development Workflow

Code Management Facility (CMF)

On a periodic basis, RDK code is tested and released to the community as CMF releases. This will be generic RDK code without dependency to any platform. CMF code can be built for emulator or raspberry-pi or can be ported to a specific platform (RDK Porting).

Routine Releases

  • Tagged every two weeks
  • Built and tested
  • Only tagged if Black Duck, Build and Test successful
  • Changes pulled from Comcast every two weeks 

CMF Contributions

While working with CMF stack, one might find ways to enhance RDK code by adding new features or bug fixes as RDK contribution. The general CMF contribution workflow is as follows:

Detailed information on contributing code changes to RDK can be found here:  Code Management Documentation

Getting Support

Support tickets can be raised to get request support from RDK Community Support team. This can be for the bugs you faced, doubts you have or any code contributions which you think might enhance RDK.

RDK Support ticket can be raised here: https://jira.rdkcentral.com/jira

Categories of support tickets are:

Issue typeNameDescription
General Support IssuesRDK_JIRA_<Company_Name>

Raise a JIRA ticket in your Company Specific Project. This project is accessible only to Preferred member companies.

Code Management Facility SupportRDKCMFCode contributions to CMF as part of bug fixing or feature enhancement comes under this category. Updating of code from RDK to CMF is also tracked in these.
RDK SupportRDKAnybody with RDK Support credentials can create this category of tickets.
Raspberry-pi (HDP) SupportRPIRapsberry-pi support tickets (only for Preferred members)
DefaultRDK_JIRA_TRIAGE

By default, support type will be RDK_JIRA_TRIAGE. All normal users without RDK support credentials can create these JIRA tickets via mailing to support@rdkcentral.com. This will be filtered to appropriate category by triage team.

Code Submission Process – RDK Central Gerrit

In order to contribute code, first-time users are requested to agree to the license at https://wiki.rdkcentral.com/signup.action.

RDK components are hosted at code.rdkcentral.com. You can submit your code changes for review via that site using the workflow outlined below.

Create a JIRA ticket

Clone the Repository

Clone the component repository from the Gerrit server https://code.rdkcentral.com/r/ into a local workspace

Clone with commit-msg hook (to add Change-ID footer to commit messages)

git clone https://code.rdkcentral.com/r/<component-name> <component-name> -b <branch-name> 
cd <component-name>
gitdir=$(git rev-parse --git-dir); curl -o ${gitdir}/hooks/commit-msg https://code.rdkcentral.com/r/tools/hooks/commit-msg ; chmod +x ${gitdir}/hooks/commit-msg

Click here to find the details about <component-name> & <branch-name> for code submission .

Note: The commit-msg hook is installed in the local Git repository and is a prerequisite for Gerrit to accept commits. The inclusion of the unique Change-ID in the commit message allows Gerrit to automatically associate a new version of a change back to its original review.

Note: You may need to configure your Git identity on the cloned repository. The email address that your local Git uses should match the email address listed in Gerrit.

  • Cloning the code before login in once to code.rdkcentral.com, the user would get the Authentication error, even though the account is in good standing and has all the required access.
  • Please login to code.rdkcentral.com before attempting to clone.

Example commands to run are as follows:

$ git config user.name "John Doe"

$ git config user.email "john.doe@example.org"

Work on the change, commit to the local clone

Each commit constitutes a change in Gerrit and must be approved separately. It is recommended to squash several commits into one that represents a change to the project.

If necessary, it is possible to squash a series of commits into a single commit before publishing them, using interactive rebase:

$ git rebase --interactive

It is important to preserve the Change-Id line when editing and there should only be one “pick” entry at the end of this process. The end result is to submit one change to Gerrit.

Push the new changes for Gerrit for review

Commits will be BLOCKED if the format of the commit message does not comply with the standard. You will see a warning as to why the commit was blocked.

Mandatory Information in Commit Message

  1. Associated JIRA ticket (Follow the Jira Guidelines to create a JIRA)
  2. Reason for changing information
  3. Test procedure by which change can be verified
  4. Possible risks of failure
$ git commit --amend

<Add your commit message in the below format>

<JIRA TICKET #1>, <JIRA TICKET #2>, <JIRA TICKET #n> : <one line summary of change>
<empty line>
Reason for change: <explanation of change>
Test Procedure: < test procedure>
Risks: <side effects and other considerations> [Note: state None if there are no other considerations]
<empty line>
Signed-off-by: Your Name <your_name@email.com>

Submit your code changes for review

$ git push origin HEAD:refs/for/<branch>

When interfacing with Gerrit you push to a virtual branch /refs/for/<branch>, representing “code review before submission to branch”. Gerrit will subsequently assign a unique URL for the change, to facilitate access and review via the web UI.

Notes: 

  • HEAD is a Git symbolic reference to the most recent commit on the current branch. When you change branches, HEAD is updated to refer to the new branch’s latest commit.
  • The refspec in the git push operation takes the form source:destination (source is the local ref being pushed, destination is the remote ref being updated).

Review notifications and addition of new reviewers

Component owners/reviewers/approvers, defined as specific groups in Gerrit, will be added to the review by default. You may request additional feedback by specifically adding reviewers via the Gerrit web GUI. 

Scan and build on code submission

BlackDuck, copyright scanning and build jobs will be triggered automatically from CMF Jenkins. The output of these jobs is integrated into the Gerrit voting process via custom labels and will reflect any ‘red flag’ in a file that has new code changes, whether introduced in the new change/patch-set or not. Scans will post any findings as comments in the Gerrit review. Build jobs also do that, but in addition, will upload the build log to the corresponding JIRA ticket (if there is one) as an attachment.

Code review and scoring process

Reviewers can comment on and score a given change.
The default set of rules for enabling a code change for submission requires:

  • a Code Review score of +2; this can only be provided by the component owner or an admin;
  • +1 score on any mandatory Gerrit labels configured for the project.

The result of the scoring process and validation rules is to enable the Submit action on the Gerrit Web UI and subsequent merge capability to the target branch.

Label: Code Review(Highlighted in yellow color)  For a change to be mergeable, the latest patch set must have a ‘+2’ value approval in this category or label, and no ‘-2 Do not submit’. Thus -2 on any patch set can block a submit, while +2 on the latest patch set enables it for merging.

Labels: Blackduck/Copyright/Component-Build (Highlighted in yellow color) For a change to be mergeable, the change must have a ‘+1’ score on these labels, and no ‘-1 Fails’. Thus, ‘-1 Fails’ can block a submit, while ‘+1’ enables a submit.

 Review input is generally referred to as labelling with a positive/negative score.

Submit code change

Only authorized users, i.e. component owners, component approvers or admins, can submit the change allowing Gerrit to merge it to the target branch as soon as possible. A change can be submitted, having satisfied the approval conditions described earlier, by clicking the ‘Submit Patch Set n’ button within the Gerrit UI. When a change has been submitted, it is automatically merged to the target branch by Gerrit.

Abandon change

Depending on the review outcome, it might be decided to abandon the change. The component owner or an authorised user may abandon the change by clicking the “Abandon Change” button. The abandoned changes are not removed from the Gerrit database and can be restored at a later stage.

Submitted, Merge Pending

If a change depends on another change that is still in review, it will enter this state. It will be merged automatically by Gerrit once all its dependencies are submitted and merged.

Change needs to be reworked

If you need to rework a change, you need to push another commit with the same Change-ID as the original in its commit message.
This is the mechanism Gerrit uses to associate or link the two items. The `–amend` option to the Git commit command prevents a new Change-ID from being generated by the commit-msg hook.

The basic steps are outlined below.

First, fetch the change. If you still have the checkout that was used to push the original change, you can skip this step.

$ git fetch https://user@code.rdkcentral.com/r/component1 refs/changes/02/2/1 && git checkout FETCH_HEAD

where the numbering scheme for fetching the changes is as follows:

refs/changes/<last two digits of change number> <change number> <patch set number>

Gerrit will specify this fetch URL via the web UI on the ‘Download‘ link on the review page for the change in question, you just paste it into the command line.

Next, make any necessary source changes, and do:

$ git commit --amend
$ git push origin HEAD:refs/for/<branch>

A new patch set is now appended to the Gerrit review item, and this will go through the same review process as before.

  • The ‘change number’ referenced above is different to the underlying Git commit ID.
  • Patch-sets are numbered (starting from 1) for each review and incremented whenever a change is amended with another Git commit.
  • FETCH_HEAD is a Git symbolic reference and shorthand for the head of the last branch fetched and is valid only immediately after the fetch operation.

Gerrit merge failure as a result of a conflict

Essentially this means that the remote branch has evolved since this change was started and now software conflicts with changes in the remote branch. The developer must resolve the merge conflicts in their local clone and then push another patch-set.
The process is resumed at step 4, with the important distinction of committing with the –amend option, once the developer pulls the latest changes. Note: A summary of the steps involved, assuming the local branch still exists: 

Rebase the local branch to the latest state of origin/<branch>; Resolve all conflicts; Commit with the `–amend` option; Push changes to Gerrit for review. After this change, a new patch set is created for the change.

Note: If the local branch no longer exists, the steps are as follows :

$ git fetch https://user@code.rdkcentral.com/r/rdk_component_1 refs/changes/58/58/2 && git checkout FETCH_HEAD
$ git rebase origin/<branch>
[Edit the conflicting file, cleaning up the <<<<, ==== >>> markers surrounding the conflicting lines]
$ git add <file>
$ git commit --amend
$ git push origin HEAD:refs/for/<branch>

RDK Components – Product Branch

Following RDK components are hosted at code.rdkcentral.com. Follow the instructions to submit your code changes.

Example of how to use git clone for meta-rdk-ext component:  git clone https://code.rdkcentral.com/r/rdk/components/generic/rdk-oe/meta-rdk-ext -b rdk-next

Below is the list of opensourced repositories on CMF Gerrit:

#ComponentProduct Branch
1components/opensource/gdbus-client                                          master
2components/opensource/rpcserver                                             master
3components/opensource/v4l2test                                              master
4components/opensource/wayland-egl-icegdlmaster
5components/opensource/waymetric                                             master
6components/opensource/westeros                                              master
7devices/intel-x86-pc/rdkri/westerosmaster
8rdk/components/generic/cobalt                                               master
9rdk/components/generic/cobalt-launcher                                      master
10rdk/components/generic/lxc-container-generator                              master
11rdk/components/generic/lxccpid                                              master
12rdk/components/generic/xconf-simulator                                      master
13rdk/components/generic/xconfserver                                          master
14rdkb/devices/ci20/hal                                                       master
15components/generic/rdk-oe/meta-cmf-camera                                   rdk-next
16components/generic/rdk-oe/meta-cmf-qt5                                      rdk-next
17components/generic/rdk-oe/meta-cmf-video                                    rdk-next
18components/generic/rdk-oe/meta-rdk-camera                                   rdk-next
19components/opensource/RDK_apps                                              rdk-next
20components/opensource/patches/qtbase-5.1.1                                  master
21components/opensource/patches/qtwebsockets-0.9.0                            master
22rdk/components/generic/OvsAgent                                             rdk-next
23rdk/components/generic/WebconfigFramework                                   rdk-next
24rdk/components/generic/aamp                                                 stable2
25rdk/components/generic/aampabr                                              stable2
26rdk/components/generic/aampmetrics                                          master
27rdk/components/generic/appmanager                                           rdk-next
28rdk/components/generic/audiocapturemgr                                      rdk-next
29rdk/components/generic/audioserver                                          rdk-next
30rdk/components/generic/avs/alexa_skill_mapper                               rdk-next
31rdk/components/generic/avs/xr-speech-avs-sdk                                rdk-next
32rdk/components/generic/blercudaemon                                         rdk-next
33rdk/components/generic/bluetooth                                            rdk-next
34rdk/components/generic/bluetooth_leAppMgr                                   rdk-next
35rdk/components/generic/bluetooth_mgr                                        rdk-next
36rdk/components/generic/breakpad_wrapper                                     rdk-next
37rdk/components/generic/cpuprocanalyzer                                      rdk-next
38rdk/components/generic/crashlog                                             rdk-next
39rdk/components/generic/crashupload                                          rdk-next
40rdk/components/generic/dca                                                  rdk-next
41rdk/components/generic/dcm                                                  rdk-next
42rdk/components/generic/devicesettings                                       rdk-next
43rdk/components/generic/diagnostics                                          rdk-next
44rdk/components/generic/dtcp                                                 rdk-next
45rdk/components/generic/gst_svp_ext                                          rdk-next
46rdk/components/generic/hdmicec                                              rdk-next
47rdk/components/generic/hwselftest                                           rdk-next
48rdk/components/generic/iarmbus                                              rdk-next
49rdk/components/generic/iarmmgrs                                             rdk-next
50rdk/components/generic/injectedbundle                                       rdk-next
51rdk/components/generic/jst                                                  rdk-next
52rdk/components/generic/ledmgr                                               rdk-next
53rdk/components/generic/libSyscallWrapper                                    rdk-next
54rdk/components/generic/libunpriv                                            rdk-next
55rdk/components/generic/libusbctrl                                           rdk-next
56rdk/components/generic/media_utils                                          rdk-next
57rdk/components/generic/mediaframework                                       rdk-next
58rdk/components/generic/mfrlibs                                              rdk-next
59rdk/components/generic/mocahal                                              rdk-next
60rdk/components/generic/netmonitor                                           rdk-next
61rdk/components/generic/netsrvmgr                                            rdk-next
62rdk/components/generic/rdk-oe/meta-cmf                                      rdk-next
63rdk/components/generic/rdk-oe/meta-cmf-broadband                            rdk-next
64rdk/components/generic/rdk-oe/meta-cmf-mesh                                 rdk-next
65rdk/components/generic/rdk-oe/meta-cmf-raspberrypi                          rdk-next
66rdk/components/generic/rdk-oe/meta-rdk                                      rdk-next
67rdk/components/generic/rdk-oe/meta-rdk-broadband                            rdk-next
68rdk/components/generic/rdk-oe/meta-rdk-cobalt                              rdk-next
69rdk/components/generic/rdk-oe/meta-rdk-ext                                  rdk-next
70rdk/components/generic/rdk-oe/meta-rdk-video                                rdk-next
71rdk/components/generic/rdk-oe/meta-rdk-voice                                rdk-next
72rdk/components/generic/rdk-oe/meta-rdk-voice-sdk                            rdk-next
73rdk/components/generic/rdk_logger                                           rdk-next
74rdk/components/generic/rdkapps                                              rdk-next
75rdk/components/generic/rdkat                                                rdk-next
76rdk/components/generic/rdkbrowser                                           rdk-next
77rdk/components/generic/rdkbrowser2                                          rdk-next
78rdk/components/generic/rdkmediaplayer                                       rdk-next
79rdk/components/generic/rdkssa                                               rdk-next
80rdk/components/generic/rdkversion                                           rdk-next
81rdk/components/generic/rdkx_logger                                          rdk-next
82rdk/components/generic/rdm                                                  rdk-next
83rdk/components/generic/rfc                                                  rdk-next
84rdk/components/generic/rmf_tools/generate_si_cache                          rdk-next
85rdk/components/generic/rmf_tools/tenableHDCP                                rdk-next
86rdk/components/generic/rne                                                  rdk-next
87rdk/components/generic/streamfs                                             rdk-next
88rdk/components/generic/streamfs_fcc                                         rdk-next
89rdk/components/generic/sys_mon_tools/analyzers/scripts/host                 rdk-next
90rdk/components/generic/sys_mon_tools/analyzers/scripts/target               rdk-next
91rdk/components/generic/sys_mon_tools/hostdataconverter                      rdk-next
92rdk/components/generic/sys_mon_tools/iarm_event_sender                      rdk-next
93rdk/components/generic/sys_mon_tools/iarm_query_powerstate                  rdk-next
94rdk/components/generic/sys_mon_tools/iarm_set_powerstate                    rdk-next
95rdk/components/generic/sys_mon_tools/key_simulator                          rdk-next
96rdk/components/generic/sys_mon_tools/mem_analyser_tools                     rdk-next
97rdk/components/generic/sys_mon_tools/mfr_data                               rdk-next
98rdk/components/generic/sys_mon_tools/mfr_utils                              rdk-next
99rdk/components/generic/sys_mon_tools/power-state-monitor                    rdk-next
100rdk/components/generic/sys_mon_tools/rdklogctrl                             rdk-next
101rdk/components/generic/sys_mon_tools/si_cache_parser                        rdk-next
102rdk/components/generic/sys_mon_tools/sys_resource                           rdk-next
103rdk/components/generic/sys_mon_tools/sys_utils                              rdk-next
104rdk/components/generic/sys_mon_tools/udhcpc-opt43                           rdk-next
105rdk/components/generic/syslog_helper                                        rdk-next
106rdk/components/generic/telemetry                                            rdk-next
107rdk/components/generic/tr69hostif                                           rdk-next
108rdk/components/generic/trm                                                  rdk-next
109rdk/components/generic/ttsengine                                            rdk-next
110rdk/components/generic/wifi                                                 rdk-next
111rdk/components/generic/xr-fdc                                               rdk-next
112rdk/components/generic/xr-speech-router                                     rdk-next
113rdk/components/generic/xr-speech-vrex                                       rdk-next
114rdk/components/generic/xr-timer                                             rdk-next
115rdk/components/generic/xr-timestamp                                         rdk-next
116rdk/components/generic/xr-voice-sdk                                         rdk-next
117rdk/components/generic/xr_atomic                                            rdk-next
118rdk/components/generic/xr_mq                                                rdk-next
119rdk/components/generic/xraudio                                              rdk-next
120rdk/components/generic/xraudio-adpcm                                        rdk-next
121rdk/components/generic/xraudio-hal_ctrlm                                    rdk-next
122rdk/components/generic/xraudio-opus                                         rdk-next
123rdk/components/generic/xraudio-utils                                        rdk-next
124rdk/components/generic/xrpSMEngine                                          rdk-next
125rdk/components/generic/xupnp                                                rdk-next
126rdk/components/opensource/gstreamer-direct-platform                         rdk-next
127rdk/components/opensource/ipoe_health_check                                 rdk-next
128rdk/components/opensource/sysint                                            rdk-next
129rdk/components/opensource/tvsettings                                        rdk-next
130rdk/components/opensource/tvsettings/stubs                                  rdk-next
131rdk/devices/intel-x86-pc/emulator/devicesettings                            rdk-next
132rdk/devices/intel-x86-pc/emulator/iarmmgrs                                  rdk-next
133rdk/devices/intel-x86-pc/emulator/rdkbrowser                                rdk-next
134rdk/devices/intel-x86-pc/rdkemulator/mfrlibs                                rdk-next
135rdk/devices/intel-x86-pc/rdkemulator/tdk                                    rdk-next
136rdk/devices/opensource/intel-x86-pc/emulator/sysint                         rdk-next
137rdk/devices/opensource/raspberrypi/sysint                                   rdk-next
138rdk/devices/raspberrypi/devicesettings                                      rdk-next
139rdk/devices/raspberrypi/iarmmgrs                                            rdk-next
140rdk/devices/raspberrypi/mfrlibs                                             rdk-next
141rdk/devices/raspberrypi/tdk                                                 rdk-next
142rdk/devices/raspberrypi/webpa-client                                        rdk-next
143rdk/devices/raspberrypi/wifi                                                rdk-next
144rdk/tools/automatics                                                        rdk-next
145rdk/tools/automatics/automatics-core                                        rdk-next
146rdk/tools/automatics/automatics-props                                       rdk-next
147rdk/tools/automatics/dev-ops                                                rdk-next
148rdk/tools/automatics/generic-automation-tests                               rdk-next
149rdk/tools/automatics/lightning-apps                                         rdk-next
150rdk/tools/automatics/rdkb-test-utils                                        rdk-next
151rdk/tools/automatics/rdkb-tests                                             rdk-next
152rdk/tools/automatics/rdkv-test-utils                                        rdk-next
153rdk/tools/automatics/rdkv-tests                                             rdk-next
154rdk/tools/automatics/rpi-provider/java-handler                              rdk-next
155rdk/tools/automatics/scriptless-automation                                  rdk-next
156rdk/tools/automatics/scriptless-service                                     rdk-next
157rdk/tools/automatics/scriptless-test-config                                 rdk-next
158rdk/tools/device-manager                                                    rdk-next
159rdk/tools/device-manager-ui                                                 rdk-next
160rdk/tools/tdk                                                               rdk-next
161rdk/tools/tdk-tools                                                         rdk-next
162rdk/tools/wt-service                                                        rdk-next
163rdkb/components/generic/CcspLogAgent                                        rdk-next
164rdkb/components/generic/harvester                                           rdk-next
165rdkb/components/generic/json-rpc                                            rdk-next
166rdkb/components/generic/mtu_modifier                                        rdk-next
167rdkb/components/generic/notify_comp                                         rdk-next
168rdkb/components/generic/servicemanager                                      rdk-next
169rdkb/components/generic/sso                                                 rdk-next
170rdkb/components/generic/startParodus                                        rdk-next
171rdkb/components/opensource/ccsp/CcspAdvSecurity                             rdk-next
172rdkb/components/opensource/ccsp/CcspCMAgent                               rdk-next
173rdkb/components/opensource/ccsp/CcspCommonLibrary                           rdk-next
174rdkb/components/opensource/ccsp/CcspCr                                     rdk-next
175rdkb/components/opensource/ccsp/CcspDmCli                                 rdk-next
176rdkb/components/opensource/ccsp/CcspEPONAgent                              rdk-next
177rdkb/components/opensource/ccsp/CcspEthAgent                                rdk-next
178rdkb/components/opensource/ccsp/CcspHomeSecurity                          rdk-next
179rdkb/components/opensource/ccsp/CcspLMLite                                  rdk-next
180rdkb/components/opensource/ccsp/CcspMisc                                   rdk-next
181rdkb/components/opensource/ccsp/CcspMoCA                                  rdk-next
182rdkb/components/opensource/ccsp/CcspMtaAgent                               rdk-next
183rdkb/components/opensource/ccsp/CcspPandM                                   rdk-next
184rdkb/components/opensource/ccsp/CcspPsm                                   rdk-next
185rdkb/components/opensource/ccsp/CcspSnmpPa                                rdk-next
186rdkb/components/opensource/ccsp/CcspTr069Pa                                rdk-next
187rdkb/components/opensource/ccsp/CcspWifiAgent                             rdk-next
188rdkb/components/opensource/ccsp/CcspXDNS                                  rdk-next
189rdkb/components/opensource/ccsp/CoreNetLib                                rdk-next
190rdkb/components/opensource/ccsp/DhcpManager                                 rdk-next
191rdkb/components/opensource/ccsp/FirmwareSanity                              rdk-next
192rdkb/components/opensource/ccsp/GwProvApp                                 rdk-next
193rdkb/components/opensource/ccsp/GwProvApp-EthWan                           rdk-next
194rdkb/components/opensource/ccsp/GwProvApp-ePON                              rdk-next
195rdkb/components/opensource/ccsp/MeshAgent                                   rdk-next
196rdkb/components/opensource/ccsp/OneWifi                                     rdk-next
197rdkb/components/opensource/ccsp/PowerManager                                rdk-next
198rdkb/components/opensource/ccsp/RdkCellularManager                          rdk-next
199rdkb/components/opensource/ccsp/RdkGponManager                              rdk-next
200rdkb/components/opensource/ccsp/RdkInterDeviceManager                       rdk-next
201rdkb/components/opensource/ccsp/RdkPlatformManager                          rdk-next
202rdkb/components/opensource/ccsp/RdkPppManager                               rdk-next
203rdkb/components/opensource/ccsp/RdkTelcoVoiceManager                        rdk-next
204rdkb/components/opensource/ccsp/RdkVlanBridgingManager                      rdk-next
205rdkb/components/opensource/ccsp/RdkWanManager                               rdk-next
206rdkb/components/opensource/ccsp/RdkXdslManager                              rdk-next
207rdkb/components/opensource/ccsp/TestAndDiagnostic                           rdk-next
208rdkb/components/opensource/ccsp/Utopia                                      rdk-next
209rdkb/components/opensource/ccsp/Xconf                                       rdk-next
210rdkb/components/opensource/ccsp/hal                                         rdk-next
211rdkb/components/opensource/ccsp/hal/rdk-wifi-hal                            rdk-next
212rdkb/components/opensource/ccsp/halinterface                                rdk-next
213rdkb/components/opensource/ccsp/hotspot                                     rdk-next
214rdkb/components/opensource/ccsp/sysint                                      rdk-next
215rdkb/components/opensource/ccsp/webui                                       rdk-next
216rdkb/components/opensource/ccsp/webui-bwg                                   rdk-next
217rdkb/devices/emulator/hal                                                   rdk-next
218rdkb/devices/intel-x86-pc/emulator/sysint                                   rdk-next
219rdkb/devices/intel-x86-pc/emulator/tdkb                                     rdk-next
220rdkb/devices/raspberrypi/hal                                                rdk-next
221rdkb/devices/raspberrypi/sysint                                             rdk-next
222rdkb/devices/raspberrypi/tdkb                                               rdk-next
223rdkb/devices/rdkbemu/ccsp/rdkb                                              rdk-next
224rdkb/devices/rdkbemu/rdkbemu_xb3                                            rdk-next
225rdkb/devices/turris/tdkb                                                    rdk-next
226rdkb/tools/tdkb                                                             rdk-next
227rdkc/components/opensource/batteryhal                                       rdk-next
228rdkc/components/opensource/camera-apps                                      rdk-next
229rdkc/components/opensource/camera-hal                                       rdk-next
230rdkc/components/opensource/camera/ledmgr                                    rdk-next
231rdkc/components/opensource/configMgr                                        rdk-next
232rdkc/components/opensource/cvr                                              rdk-next
233rdkc/components/opensource/httpClients                                      rdk-next
234rdkc/components/opensource/ledmgr                                           rdk-next
235rdkc/components/opensource/plugins                                          rdk-next
236rdkc/components/opensource/pwstream                                         rdk-next
237rdkc/components/opensource/rms                                              rdk-next
238rdkc/components/opensource/rtc-app                                          rdk-next
239rdkc/components/opensource/sensorhal                                        rdk-next
240rdkc/components/opensource/streamerhal                                      rdk-next
241rdkc/components/opensource/thumbnail                                        rdk-next
242rdkc/components/opensource/vaEngine                                         rdk-next
243rdkc/devices/raspberrypi/mediastreamer                                      rdk-next
244rdkc/devices/raspberrypi/tdkc                                               rdk-next
245rdkc/tools/tdkc                                                             rdk-next
246rdkv/tools/tdkv                                                             rdk-next
247rdk/components/generic/gst-plugins-rdk                                      rdk-next
248rdk/components/generic/gst-plugins-rdk-aamp                                 stable2
249rdk/devices/intel-x86-pc/rdkemulator/gst-plugins-rdk/playersinkbin          rdk-next
250rdk/devices/intel-x86-pc/rdkemulator/gst-plugins-rdk/qamtunersrc           rdk-next
251rdk/devices/raspberrypi/gst-plugins-rdk/playersinkbin                       rdk-next

Licensed repos list on CMF gerrit:


ComponentsProduct Branch
1components/generic/camgr                                                    master
2components/generic/gst-plugins-rdk-dvr                                      master
3components/generic/gst-plugins-rdk-subtec                                   master
4components/generic/gstreamer-cxx                                            master
5components/generic/js-plugins                                               master
6components/generic/rdk-oe/devicesettings-hal-sample                         master
7components/generic/rdk-oe/iarmmgrs-hal-sample                               master
8components/generic/rdk-oe/meta-cmf-video-reference                          master
9components/generic/rdk-oe/meta-cmf-video-reference-next                     master
10components/generic/rdk-oe/meta-cmf-video-restricted                         master
11components/generic/sessionmgr                                               master
12components/generic/subtec-app                                              master
13components/generic/websocket-ipplayer2                                      master
14components/generic/websocket-ipplayer2-api                                  master
15components/generic/websocket-ipplayer2-utils                                master
16components/opensource/patches/qtwebkit-5.1.1                                master
17components/restricted/rdk-oe/meta-cmf-restricted                            rdk-next
18devices/imx8mq/gst-plugins-rdk/playersinkbin                                master
19devices/intel-cgp/tdkb                                                      master
20devices/intel-x86-pc/rdkri/lxc                                              master
21reference/manifests                                                         master
22components/asp/rdk-oe/meta-cmf-bsp-emulator                                 master
23components/asp/rdk-oe/meta-rdk-bsp-emulator                                 rdk-next
24components/generic/dvr                                                      rdk-next
25components/generic/fog                                                      rdk-next
26components/generic/rdk-oe/meta-cmf-raspberrypi-restricted                   rdk-next
27components/generic/rdk-oe/meta-dvb                                          rdk-next
28components/generic/recorder                                                 rdk-next
29components/generic/tasecureapi                                             main
30components/generic/tools                                                    rdk-next
31components/generic/tr69                                                     rdk-next
32components/restricted/rdk-oe/meta-rdk-restricted                            rdk-next
33devices/intel-x86-pc/rdkemulator/closedcaption                              master
34devices/intel-x86-pc/rdkemulator/tr69                                       rdk-next
35devices/intel-x86-pc/rdkri/mediaframework                                   master
36devices/raspberrypi/dvr                                                     rdk-next
37devices/raspberrypi/fwupgrade-lib                                           rdk-next
38devices/raspberrypi/mediaframework                                          rdk-next
39rdk/components/generic/dvb/dtv-testapp                                      rdk-next
40rdk/components/generic/rmf_mediastreamer                                    master
41rdk/components/generic/servicemanager                                       rdk-next
42rdk/components/generic/storagemanager                                       rdk-next
43rdk/devices/intel-x86-pc/emulator/rmf_mediastreamer                         master
44rdk/devices/intel-x86-pc/emulator/servicemanager                            master
45rdk/devices/raspberrypi/servicemanager                                      rdk-next

Code Submission Process – RDK Central GitHub

Introduction

GitHub is a Git repository hosting service, but it adds many of its own features. While Git is a command line tool, GitHub provides a Web-based graphical interface.

GitHub Enterprise is the on-premises version of GitHub.com and is available on VMware, AWS, and OpenStack KVM, on your own servers or in a private cloud. GitHub Enterprise operates on your infrastructure with your existing information security controls from firewalls and VPNs, to IAM and monitoring systems.

CMF GitHub Organisations

There are 2 RDKM Code Management organisations, namely RDKcentral and RDKcmf. The latter organisation primarily hosts open source mirrors of projects that reside on CMF Gerrit. These projects pertain to RDK-V, RDK-B and RDK-C profiles.

GitHub Repositories on RDKcmf organisation

There are approximately 145 mirrors on the GitHub RDKcmf organisation, these are primarily mirrors of Gerrit opensourced repositories. Gerrit repository active branches are replicated to GitHub. Pull Requests are not supported on these repositories as indicated in the repository CONTRIBUTING.md files.

RDK Central GitHub Components & its Product Branches

A list of the public repositories include:


ComponentProduct BranchLicense
1RDKServicescurrent default branchApache
2LightningmasterApache
3Lightning-CLImasterApache
4Lightning-SDKmasterApache
5Lightning-UI-ComponentsmasterApache
6OCDM-ClearkeymasterApache
7OCDM-NagramasterApache
8OCDM-PlayreadymasterApache
9OCDM-WidevinemasterApache
10RDKShellmasterApache
11RDKSplashScreenmasterApache
12ThundermasterApache
13ThunderJSmasterApache
14ThunderNanoServicesmasterApache
15ThunderUImasterApache
16DobbymasterApache
17android-remotemasterApache
18meta-turrismasterApache
19opensync-vendor-rdk-turrismasterApache
20rdkb-turris-halmasterApache
21rdkcryptoapimasterApache
22sample-licensingmasterApache

GitHub Pull Requests

Pull requests let you tell others about changes you’ve pushed to a branch in a repository on GitHub. Once a pull request is opened, you can review the potential changes with collaborators and add follow-up commits before your changes are merged into the base branch. Anyone with read permissions to a repository can create a pull request, but you must have write permissions to create a branch. If you want to create a new branch for your pull request and don’t have write permissions to the repository, you can fork the repository first. Pull requests can only be opened between two branches that are different.

GitHub Fork

A ‘fork’ is a personal copy of another user’s repository that lives on your GitHub account. Forks allow you to freely make changes to a project without affecting the original. A forked project also remains attached to the original, allowing you to submit a pull request to the original’s author to update with your changes, ensuring you’re always working off a recent or up-to-date codebase.

GitHub Workflow Steps

  • Create a Fork by simply clicking on the ‘fork’ button of the repository page on GitHub.
  • Clone your Fork, the clone command creates a local git repository from your remote fork on GitHub.
  • Modify the Code in your local clone, and commit the changes to your local clone using the git commit command.
  • Push your Changes by invoking the git push command, from your workspace, to upload your changes to your remote fork on GitHub.
  • Create a Pull Request by clicking the ‘pull request’ button on the GitHub page of your remote fork.

GitHub Protected Branches

Protected branches ensure that collaborators on your repository cannot make irrevocable changes to branches. Enabling protected branches also allows you to enable other optional checks and requirements, like required status checks and required reviews.

A custom CMF branch protection scheme is deployed in each repository in order to enforce the desired workflows. This scheme imposes the following rules:

  • Require pull request reviews before merging
  • Require status checks to pass before merging
    • blackduck
    • copyright
    • license/cla
    • component-build

Required status checks ensure that all required CI tests are passing before collaborators can make changes to a protected branch. Status checks are based on external processes, such as continuous integration builds, code compliance scanning, which run for each push you make to a repository. You can see the pending, passing, or failing state of status checks next to individual commits in your pull request.

Contributor License Agreement (CLA)

The RDK CLA facilitates the acceptance and sharing of RDK contributions within the community.

When you contribute to an RDK open source project on GitHub via a new pull request, a bot will evaluate whether you have signed the CLA. The bot will comment on the pull request, including a link to accept the agreement.

CLA assistant enables contributors to sign CLAs from within a pull request. The CLA is stored as a GitHub Gist file and linked with the repository/organisation in CLA assistant.

CLA assistant:

  • Comments on each opened pull request to ask the contributor to sign the CLA
  • Allows contributors to sign a CLA from within a pull request
  • Authenticates the signee with his or her GitHub account
  • Updates the status of a pull request when the contributor agrees to the CLA
  • Automatically asks users to re-sign the CLA for each new pull request in the event the associated Gist & CLA has changed
  • Repository owners can review a list of users who signed the CLA for each version of it.

Note – CLA assistant is provided by SAP as a free hosted offering under: https://cla-assistant.io/

Compliance Scanning

CMF uses BlackDuck (Protex) to check incoming contributions for license compliance. BlackDuck is normally a very manual tool but a significant level of automation has been developed by the team to reduce manual intervention, but it still requires a human to oversee it.

Compliance scanning is looking for several things:

  • Addition of source code with a conflicting license (e.g. LGPL code in an Apache component).
  • Modification of an opensource component with code of a conflicting license.
  • Incorrect or proprietary copyright attribution.

The key points are as follows:

  • Scan contribution in GitHub Pull Request.
  • Scan is automatically triggered by a webhook.
  • Results in scan of the contribution only, i.e. only the changes.
  • Required Status Check, associated with the Blackduck scan is updated.
  • Summary of the scan including any code matches are provided via a link to an associated Gist.

OSS Engineer and interested parties are notified of scan failures (violations, pending identifications or reviews etc) via AWS Mailing list and Slack.

git-secrets Scanning

git-secrets is a tool created by AWS Labs that scans commits and commit messages and aims to prevent passwords and other sensitive information being committed to a git repository. The tool can also scan files or folders to look for secrets such as an AWS Access Key ID and AWS Secret Access Keys in a repository. git-secrets scans commits, commit messages, and merge commits to prevent adding secrets into your git repositories. If a commit, commit message, or any commit in merge history matches one of the configured prohibited regular expression patterns, then the commit is rejected.

Example of how to push the code changes

Step 1 : Fork the component from GitHub

Sign-in to github with your own credentials.

Search for the Component.

Fork the component from github. Forking will create a copy(i.e, your own WORKSPACE) of an original component to work.

Step 2 : Clone the Component

Click on the “Clone or download” button to get the clone url from github. Ensure your github username present in the url to start work with your own workspace.

Step 3 : Work on changes and Gerrit commands to push the changes

Make the code changes, and commit the changes

$ git add .
$ git status
$ git commit -m "<JIRA_TICKET_ID> <COMMIT_DESCRIPTION>"
$ git push

Step 4 : Create pull request for review the changes

Once submitted the changes need to create pull request from github for review. Pull requests let you tell others about changes you’ve pushed to a branch in a repository on GitHub. Once a pull request is opened, you can discuss and review the potential changes with collaborators and add follow-up commits before your changes are merged into the base branch.

  • Click on “New pull request” button.

  • Click on “Create pull request” button.

  • Provide the commit request and Click on “Create pull request” button.

Pull Request page will be created.

Step 5 : Working on review comments

Once you’ve created a pull request, you can push commits from your workspace to add them to your existing pull request. These commits will appear in chronological order within your pull request and the changes will be visible in the “Files changed” tab.

Other contributors can review your proposed changes, add review comments, contribute to the pull request discussion, and even add commits to the pull request.

JIRA Guidelines

Where to Create a JIRA ticket

A Snap shot for how to create a JIRA.

JIRA Guideline for Patches Contributions

Issue type corresponds to the type of contributions we are making. The following issue types can be possible for patches contribution
√ Incident – Build failure incident issues with the code verification steps such as Black duck scan, Jenkins verification etc.
√ Bug – Bugs in existing component code.
√ Task – An individual task which may be part of a new feature or improvement.
√ Improvement – Improvements such as code refactoring or enhancements in current code.

Summary and Descriptions are mandatory fields need to be filled.

Click on Create button to Create a new JIRA. Sample example is provided below.

JIRA Guideline for New Feature Contribution

A feature contribution should follow after creating an appropriate JIRA project. This will present a clear picture about the architecture, testing details and other information which will be helpful during the acceptance process of the contribution.

Mandatory information

  1. Project

    For Video & build system (Yocto) related contributions, the ticket should be created under RDKDEV. For broadband, the ticket should be created under RDKBDEV project.

  2. Issue Type

    √ New feature – New feature contributions.

  3. Ticket Status

    Status should be initially Open, and transitioned to the appropriate value while the contribution is being worked on.

  4. Summary

    A brief summary about what we are trying to contribute 

  5. Description

    A descriptive information about the contribution should be present so that component developers & architecture team can do assessment of the feature. Below details are desirable if the contribution is a new feature or having an significant impact on the current architecture.

    Solution Overview

    Brief introduction on what the current system lacks & what needs to be done:

    1. Individual task/highlighted point #1 brief description.
    2. Individual task/highlighted point #2 brief description.

    Architecture Checklist
    The following items should be considered/addressed in the documentation for any RDK design initiative
    JIRA Update Checklist
    -----------------------
    The following JIRA fields MUST be filled in to be considered "Definition Complete":
    * RDK SoC, RDK OEM - populate these fields for any user story where we have dependency on OEM and/or SoC to perform work in the completion of this user story. Select all that apply, or “None” if there is no dependency.
    * OEM/SoC Impact Details - description of impact (or "see Solution Overview" if included in the architecture specification)
    * Platforms - ensure correct list of devices
    * Validation - type of testing
    * Regression - is regression required?
    * Impacted Party - Comcast Only, Syndication, etc.
    * Dependency - Internal/External
    * Description - Solution Overview and Architecture Checklist
    
    Testing impact/Guidance
    ------------------------
    * Impacted modules
    * Test process
    
    Automated Testing
    ------------------
    * Automation test procedure.
    
    Diagnostics, Telemetry and Logging
    -----------------------------------
    * N/A
    
    Outbound Network Connections
    ------------------------------
    * Does this component make outbound connection requests? 
    * If yes, do the connection requests retry in the case of failure?
    ** Do the repeated requests use an exponential back-off?
    ** If a maximum back-off has been defined, is it greater than 10 minutes?
    
    Security
    ----------
    * For Security Review - Do feature elements:
    ** make any changes to network port assignments?
    ** change iptables rules?
    ** require credentials, passwords, secret data?
    ** make any changes to our network connections? 
    ** connect to new services or servers?
    ** use data input from users or external tools?
    ** use any cryptographic functions?
    ** create or disclose proprietary or sensitive Co. or device data?
    ** properly log operational and configuration changes? 
    ** If possible describe what could happen if feature elements are:
    *** spoofed?
    *** tampered with?
    *** used by an unauthorized actor?
    ** Advanced questions (optional)
    *** what happens if a record of actions taken is destroyed?
    *** what happens if an attacker attempts to DOS with the feature?
    
    SI Concerns
    -------------
    * Yes/No/Any
    
    Performance expectations
    -------------------------
    * Yes/No/Any
    
    
    Timing consideration
    ----------------------
    * If Any.
    

Supplementary Information

  

  1. Impacted component(s) – Fill in list of impacted RDK components
  2. RDK SI Impact – System Integration impacts
  3. CPE SW Components – Component names.
  4. Test Notes – Describe what tests are performed to validate this contribution and the procedure.
  5. Unit Test Result – Description.

Documenting the Code

Why to Document?

Writing documentation improves the design of your code. Talking through your API and design decisions on paper allows you to think about them in a more formalized way. A nice side effect is that it allows people to contribute code that follows your original intentions as well.

How to Document?

RDK component code is documented following the Doxygen standards and guidelines. Doxygen is a popular open source tool for generating documentation from annotated C/C++ sources. Also Doxygen support documenting code written in other programming languages such as Python, PHP, Java etc.

Tools Required for Doxygen Documentation

The following tools are required to be installed in Linux machine (through apt-get install) to generate documentation with respect to various data flow diagrams.

  1. doxygen: It is a tool for a documentation system for various programming languages such as C++, C, Java, Objective-C
  2. graphviz: Rich set of graph drawing tools. It required to fulfil the need of a centralized documentation presenting all available tools in the graphviz package.
  3. dot: Filter for drawing directed graphs. A graph that can be drawn as hierarchy. It reads attributed graph files and writes drawings.  By default, the output format dot is the input file with layout coordinates appended
  4. perl: It is a script file used by doxygen and it should be present in the system
  5. mscgen: Message Sequence Chart Renderer. This will help to make sequence diagram for Doxygen documentation.

Steps to Generate Document using Doxygen

The following are the steps to generate documentation using Doxygen tool.

  1. Create a new folder “example_name” – This is where the final report will reside.
  2. Go to directory “example_name”
  3. Reference doxygen configuration file
    1. doxygen.dox – used for customizing the index page
    2. doxygen.css – style sheet file used for formatting html output

    3. Doxyfile – Configuration file that is needed for generating doxygen output

    4. RDK-Logo.png – RDK Logo

  4. Check out all the RDK component source code (Source code must be Doxygen complaint) for which document needs to be generated, for example :

  5. Edit Doxyfile and set all configurations as required, given below are examples

    • PROJECT_NAME  /* Name of the project */

    • INPUT   /* Path of source code provided as input for document generation*/
    • OUTPUT_DIRECTORY /* output folder path */

  6. Edit doxygen.dox, if the index page needs to be customized, add module names that will be shown in output index page

  7. Edit doxygen.css, for output formats, fonts, etc
  8. Use the following command at the command prompt, to generate html report

    • doxygen Doxyfile

  9. Doxygen Output HTML report will be available at  ‘/example_name/OUTPUT_DIRECTORY/html’ folder, open index.html file to see Doxygen report

Steps to add module level information to components

Refer to below Doxygen Guideline Section for uniform style of adding Doxygen comments for the RDK system.

Doxygen Guideline

Introduction 

The purpose of this page is to provide a uniform style of Doxygen commenting for the RDK system. It will serve as a reference for current and future developers, while documenting the RDK system as it evolves. Ultimately, this will establish a consistent manner of documentation to strengthen the simplicity, readability, scalability, writability, reliability, and maintainability of the system.

Documentation Style

Doxygen documentation can be generated in many formats(HTML, LaTeX, RTF, PDF, DOC) . HTML generation has support for more plugins and is easier to refactor as the system changes. Doxygen style should follow a consistent format to aid development across different IDEs. Additionally, it reduces issues when generating documentation.

Standard Doxygen Tag Format
/**
 * @tagname
 */  

This is an example of a Java doc style Doxygen tag, since it uses the “@” symbol. Tags using the “tagname” style are considered Qt style Doxygen tags.

There should be a header file containing only Doxygen tags or a separate Doxygen file that acts as a guide for the components, classes, methods, and variables (e.g. DoxygenMainpage.h). This can be done using the @mainpage tag at the top of the file.

System

There should be a header file containing only Doxygen tags or a separate Doxygen file that acts as a guide for the components, classes, methods, and variables (e.g. DoxygenMainpage.h). This can be done using the @mainpage tag at the top of the file.

Main Page Tag Example
/**
 * @mainpage                    Title of Document
 *                                           
 */

File

A file should contain the @file tag at the top of the file. This supports generation of a file list tab on the main page. It also helps when files contain multiple classes.

File Tagging Example
/**
 * @file               FileName.h
 *
 * @brief              Brief file description.
 *             
 *                     Verbose file description.
 */

Classes

Classes can be tagged in a number of different ways, but in general they are tagged using the @brief and @class tags before the class declaration. Having the @author@date, and @version supports tractability as the system is versioned throughout the software lifecycle. When updating classes, update comments like this:

Class Tagging Example
#include <iostream>
using namespace std;


/**
 * @brief              Brief class description
 *
 *                     Verbose description of class.
 *
 * @class              Class Name
 */

class ClassName {
               public:
                      ClassName();
	                  ~ClassName();

                      int var1;    		/**< Comment about public member variable*/

                      /**
               		   *@brief           Brief method description
					   *
					   *                 Verbose description of method
					   *
					   *@param           Parameter in the method’s definition
					   *
					   *@return          Return value of method
				       */
                      int Function1(int x);

               protected:
					  int var2;      	/**< Comment about protected member variable*/

                      /**
               		   *@brief            Brief method description
               	       *
					   *                  Verbose description of method
				       *
					   *@param            Parameter in the method’s definition
					   *
					   *@return           Return value of method
					   */
					  int Function2(int x);

               private:
                     int var3;			/**< Comment about private member variable*/

					  /**
					   *@brief            Brief method description
				 	   *
					   *                  Verbose description of method
					   *
					   *@param            Parameter in the method’s definition
				       *
					   *@return           Return value of method
					   */
                      int Function3(int x);

};

Structs

A struct can be tagged in the same way a class, but it is best to use the @struct tag. When updating structs, update comments like this:

Struct Tagging Example
/**
 *@brief             Brief struct description
 *
 *@struct            Struct Name
 */

Methods

Methods can be tagged in a number of ways, but in general the @brief@details@param, and @return tags are used before a method’s declaration or implementation. When updating methods, update comments like this:

Method Tagging Example
/**
 *@brief              Brief method description
 *
 *                    Verbose description of method
 *
 *@param           	  Parameter in the method’s definition
 *
 *@return             Return value of method
 *@retval             Verbose explanation of return values
 */
int addNumbers(int x)
{
	int sum = 0;
    sum += x; 
    return sum; 
}

Variables

When updating variables, update comments like this:

Variable Short Hand Tag Example
int number;		/**< Comment about number*/

Enumerated Types

Enumerated types are tagged using the @enum.  When updating enum types, update comments like this:

Method Tagging Example
/**
 *@brief          Brief enum description
 *
 *@enum           enum Name
 */

Miscellaneous

There are many tags you can use with HTML markup to create unique Doxygen documentation for a given file, class, method, or variable. The following are common tags that should be used when appropriate.

Informative Tags
/**
 *@note           A brief remark about the implementation to help clarify.
 *
 *@attention      An important remark that may cause code to break.
 *
 *@warning        An import remark that may depend on random conditions etc.
 *
 *@see            A reference to a class or a link to documentation (e.g. http://document.1a.com) 
 */
Maintenance Tags
/**
 *@bug            A remark about a known bug in the code.
 *
 *@todo           A remark of what needs to be done to fix issues or remaining work.
 *
 */
Format Font Tags
/**
 *@a              Formats following word in special font (used for hyperlinks)
 *
 *@b              Formats following word in bold
 *
 *@em             Formats following word in italic
 *
 *@c              Formats following word in monospaced typewriter font
 * 
 */
Structed List Tags
/**
 * - bulleted list item1
 *  - sub bulleted item1    
 *
 * - bulleted list item2
 *
 */
Numbered List
/**
 * -# numbered list item1
 * -# numbered list item2
 *
 */
Displaying Code
/**
 *@code
    i++;
 *@endcode
 */

Setting up Doxygen Environment on Windows

Before generating Doxygen documentation, make sure to have the following:

Doxygen: http://www.stack.nl/~dimitri/doxygen/download.html (Contains Doxywizard )

Graphviz: http://www.graphviz.org/ (Click the Download link on the left side of the page)

  • Navigate to the DoxyWizard (comes with Doxygen setup) application and configure it:

Go To Top