How to Contribute
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
- User will do code contribution to rdk-next branch. This will undergo:
- Code reviews
- Build verification
- License compliance scan
- Test validation
- Once successful, the change will get cherry-picked to Monthly Sprint Branch (rdk-dev-yymm)
- This code is then down-streamed to Regression Branch where pre-deployment test validation are done
- Once Comcast accepts, the change-set is cherry picked to Product Branch.
- 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 type | Name | Description |
---|---|---|
General Support Issues | RDK_JIRA_<Company_Name> | Raise a JIRA ticket in your Company Specific Project. This project is accessible only to Preferred member companies. |
Code Management Facility Support | RDKCMF | Code 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 Support | RDK | Anybody with RDK Support credentials can create this category of tickets. |
Raspberry-pi (HDP) Support | RPI | Rapsberry-pi support tickets (only for Preferred members) |
Default | RDK_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
- Refer to JIRA Guidelines for creating a JIRA before pushing your code changes in code.rdkcentral.com
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
- Associated JIRA ticket (Follow the Jira Guidelines to create a JIRA)
- Reason for changing information
- Test procedure by which change can be verified
- 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.
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>
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:
# | Component | Product Branch |
---|---|---|
1 | components/opensource/gdbus-client | master |
2 | components/opensource/rpcserver | master |
3 | components/opensource/v4l2test | master |
4 | components/opensource/wayland-egl-icegdl | master |
5 | components/opensource/waymetric | master |
6 | components/opensource/westeros | master |
7 | devices/intel-x86-pc/rdkri/westeros | master |
8 | rdk/components/generic/cobalt | master |
9 | rdk/components/generic/cobalt-launcher | master |
10 | rdk/components/generic/lxc-container-generator | master |
11 | rdk/components/generic/lxccpid | master |
12 | rdk/components/generic/xconf-simulator | master |
13 | rdk/components/generic/xconfserver | master |
14 | rdkb/devices/ci20/hal | master |
15 | components/generic/rdk-oe/meta-cmf-camera | rdk-next |
16 | components/generic/rdk-oe/meta-cmf-qt5 | rdk-next |
17 | components/generic/rdk-oe/meta-cmf-video | rdk-next |
18 | components/generic/rdk-oe/meta-rdk-camera | rdk-next |
19 | components/opensource/RDK_apps | rdk-next |
20 | components/opensource/patches/qtbase-5.1.1 | master |
21 | components/opensource/patches/qtwebsockets-0.9.0 | master |
22 | rdk/components/generic/OvsAgent | rdk-next |
23 | rdk/components/generic/WebconfigFramework | rdk-next |
24 | rdk/components/generic/aamp | stable2 |
25 | rdk/components/generic/aampabr | stable2 |
26 | rdk/components/generic/aampmetrics | master |
27 | rdk/components/generic/appmanager | rdk-next |
28 | rdk/components/generic/audiocapturemgr | rdk-next |
29 | rdk/components/generic/audioserver | rdk-next |
30 | rdk/components/generic/avs/alexa_skill_mapper | rdk-next |
31 | rdk/components/generic/avs/xr-speech-avs-sdk | rdk-next |
32 | rdk/components/generic/blercudaemon | rdk-next |
33 | rdk/components/generic/bluetooth | rdk-next |
34 | rdk/components/generic/bluetooth_leAppMgr | rdk-next |
35 | rdk/components/generic/bluetooth_mgr | rdk-next |
36 | rdk/components/generic/breakpad_wrapper | rdk-next |
37 | rdk/components/generic/cpuprocanalyzer | rdk-next |
38 | rdk/components/generic/crashlog | rdk-next |
39 | rdk/components/generic/crashupload | rdk-next |
40 | rdk/components/generic/dca | rdk-next |
41 | rdk/components/generic/dcm | rdk-next |
42 | rdk/components/generic/devicesettings | rdk-next |
43 | rdk/components/generic/diagnostics | rdk-next |
44 | rdk/components/generic/dtcp | rdk-next |
45 | rdk/components/generic/gst_svp_ext | rdk-next |
46 | rdk/components/generic/hdmicec | rdk-next |
47 | rdk/components/generic/hwselftest | rdk-next |
48 | rdk/components/generic/iarmbus | rdk-next |
49 | rdk/components/generic/iarmmgrs | rdk-next |
50 | rdk/components/generic/injectedbundle | rdk-next |
51 | rdk/components/generic/jst | rdk-next |
52 | rdk/components/generic/ledmgr | rdk-next |
53 | rdk/components/generic/libSyscallWrapper | rdk-next |
54 | rdk/components/generic/libunpriv | rdk-next |
55 | rdk/components/generic/libusbctrl | rdk-next |
56 | rdk/components/generic/media_utils | rdk-next |
57 | rdk/components/generic/mediaframework | rdk-next |
58 | rdk/components/generic/mfrlibs | rdk-next |
59 | rdk/components/generic/mocahal | rdk-next |
60 | rdk/components/generic/netmonitor | rdk-next |
61 | rdk/components/generic/netsrvmgr | rdk-next |
62 | rdk/components/generic/rdk-oe/meta-cmf | rdk-next |
63 | rdk/components/generic/rdk-oe/meta-cmf-broadband | rdk-next |
64 | rdk/components/generic/rdk-oe/meta-cmf-mesh | rdk-next |
65 | rdk/components/generic/rdk-oe/meta-cmf-raspberrypi | rdk-next |
66 | rdk/components/generic/rdk-oe/meta-rdk | rdk-next |
67 | rdk/components/generic/rdk-oe/meta-rdk-broadband | rdk-next |
68 | rdk/components/generic/rdk-oe/meta-rdk-cobalt | rdk-next |
69 | rdk/components/generic/rdk-oe/meta-rdk-ext | rdk-next |
70 | rdk/components/generic/rdk-oe/meta-rdk-video | rdk-next |
71 | rdk/components/generic/rdk-oe/meta-rdk-voice | rdk-next |
72 | rdk/components/generic/rdk-oe/meta-rdk-voice-sdk | rdk-next |
73 | rdk/components/generic/rdk_logger | rdk-next |
74 | rdk/components/generic/rdkapps | rdk-next |
75 | rdk/components/generic/rdkat | rdk-next |
76 | rdk/components/generic/rdkbrowser | rdk-next |
77 | rdk/components/generic/rdkbrowser2 | rdk-next |
78 | rdk/components/generic/rdkmediaplayer | rdk-next |
79 | rdk/components/generic/rdkssa | rdk-next |
80 | rdk/components/generic/rdkversion | rdk-next |
81 | rdk/components/generic/rdkx_logger | rdk-next |
82 | rdk/components/generic/rdm | rdk-next |
83 | rdk/components/generic/rfc | rdk-next |
84 | rdk/components/generic/rmf_tools/generate_si_cache | rdk-next |
85 | rdk/components/generic/rmf_tools/tenableHDCP | rdk-next |
86 | rdk/components/generic/rne | rdk-next |
87 | rdk/components/generic/streamfs | rdk-next |
88 | rdk/components/generic/streamfs_fcc | rdk-next |
89 | rdk/components/generic/sys_mon_tools/analyzers/scripts/host | rdk-next |
90 | rdk/components/generic/sys_mon_tools/analyzers/scripts/target | rdk-next |
91 | rdk/components/generic/sys_mon_tools/hostdataconverter | rdk-next |
92 | rdk/components/generic/sys_mon_tools/iarm_event_sender | rdk-next |
93 | rdk/components/generic/sys_mon_tools/iarm_query_powerstate | rdk-next |
94 | rdk/components/generic/sys_mon_tools/iarm_set_powerstate | rdk-next |
95 | rdk/components/generic/sys_mon_tools/key_simulator | rdk-next |
96 | rdk/components/generic/sys_mon_tools/mem_analyser_tools | rdk-next |
97 | rdk/components/generic/sys_mon_tools/mfr_data | rdk-next |
98 | rdk/components/generic/sys_mon_tools/mfr_utils | rdk-next |
99 | rdk/components/generic/sys_mon_tools/power-state-monitor | rdk-next |
100 | rdk/components/generic/sys_mon_tools/rdklogctrl | rdk-next |
101 | rdk/components/generic/sys_mon_tools/si_cache_parser | rdk-next |
102 | rdk/components/generic/sys_mon_tools/sys_resource | rdk-next |
103 | rdk/components/generic/sys_mon_tools/sys_utils | rdk-next |
104 | rdk/components/generic/sys_mon_tools/udhcpc-opt43 | rdk-next |
105 | rdk/components/generic/syslog_helper | rdk-next |
106 | rdk/components/generic/telemetry | rdk-next |
107 | rdk/components/generic/tr69hostif | rdk-next |
108 | rdk/components/generic/trm | rdk-next |
109 | rdk/components/generic/ttsengine | rdk-next |
110 | rdk/components/generic/wifi | rdk-next |
111 | rdk/components/generic/xr-fdc | rdk-next |
112 | rdk/components/generic/xr-speech-router | rdk-next |
113 | rdk/components/generic/xr-speech-vrex | rdk-next |
114 | rdk/components/generic/xr-timer | rdk-next |
115 | rdk/components/generic/xr-timestamp | rdk-next |
116 | rdk/components/generic/xr-voice-sdk | rdk-next |
117 | rdk/components/generic/xr_atomic | rdk-next |
118 | rdk/components/generic/xr_mq | rdk-next |
119 | rdk/components/generic/xraudio | rdk-next |
120 | rdk/components/generic/xraudio-adpcm | rdk-next |
121 | rdk/components/generic/xraudio-hal_ctrlm | rdk-next |
122 | rdk/components/generic/xraudio-opus | rdk-next |
123 | rdk/components/generic/xraudio-utils | rdk-next |
124 | rdk/components/generic/xrpSMEngine | rdk-next |
125 | rdk/components/generic/xupnp | rdk-next |
126 | rdk/components/opensource/gstreamer-direct-platform | rdk-next |
127 | rdk/components/opensource/ipoe_health_check | rdk-next |
128 | rdk/components/opensource/sysint | rdk-next |
129 | rdk/components/opensource/tvsettings | rdk-next |
130 | rdk/components/opensource/tvsettings/stubs | rdk-next |
131 | rdk/devices/intel-x86-pc/emulator/devicesettings | rdk-next |
132 | rdk/devices/intel-x86-pc/emulator/iarmmgrs | rdk-next |
133 | rdk/devices/intel-x86-pc/emulator/rdkbrowser | rdk-next |
134 | rdk/devices/intel-x86-pc/rdkemulator/mfrlibs | rdk-next |
135 | rdk/devices/intel-x86-pc/rdkemulator/tdk | rdk-next |
136 | rdk/devices/opensource/intel-x86-pc/emulator/sysint | rdk-next |
137 | rdk/devices/opensource/raspberrypi/sysint | rdk-next |
138 | rdk/devices/raspberrypi/devicesettings | rdk-next |
139 | rdk/devices/raspberrypi/iarmmgrs | rdk-next |
140 | rdk/devices/raspberrypi/mfrlibs | rdk-next |
141 | rdk/devices/raspberrypi/tdk | rdk-next |
142 | rdk/devices/raspberrypi/webpa-client | rdk-next |
143 | rdk/devices/raspberrypi/wifi | rdk-next |
144 | rdk/tools/automatics | rdk-next |
145 | rdk/tools/automatics/automatics-core | rdk-next |
146 | rdk/tools/automatics/automatics-props | rdk-next |
147 | rdk/tools/automatics/dev-ops | rdk-next |
148 | rdk/tools/automatics/generic-automation-tests | rdk-next |
149 | rdk/tools/automatics/lightning-apps | rdk-next |
150 | rdk/tools/automatics/rdkb-test-utils | rdk-next |
151 | rdk/tools/automatics/rdkb-tests | rdk-next |
152 | rdk/tools/automatics/rdkv-test-utils | rdk-next |
153 | rdk/tools/automatics/rdkv-tests | rdk-next |
154 | rdk/tools/automatics/rpi-provider/java-handler | rdk-next |
155 | rdk/tools/automatics/scriptless-automation | rdk-next |
156 | rdk/tools/automatics/scriptless-service | rdk-next |
157 | rdk/tools/automatics/scriptless-test-config | rdk-next |
158 | rdk/tools/device-manager | rdk-next |
159 | rdk/tools/device-manager-ui | rdk-next |
160 | rdk/tools/tdk | rdk-next |
161 | rdk/tools/tdk-tools | rdk-next |
162 | rdk/tools/wt-service | rdk-next |
163 | rdkb/components/generic/CcspLogAgent | rdk-next |
164 | rdkb/components/generic/harvester | rdk-next |
165 | rdkb/components/generic/json-rpc | rdk-next |
166 | rdkb/components/generic/mtu_modifier | rdk-next |
167 | rdkb/components/generic/notify_comp | rdk-next |
168 | rdkb/components/generic/servicemanager | rdk-next |
169 | rdkb/components/generic/sso | rdk-next |
170 | rdkb/components/generic/startParodus | rdk-next |
171 | rdkb/components/opensource/ccsp/CcspAdvSecurity | rdk-next |
172 | rdkb/components/opensource/ccsp/CcspCMAgent | rdk-next |
173 | rdkb/components/opensource/ccsp/CcspCommonLibrary | rdk-next |
174 | rdkb/components/opensource/ccsp/CcspCr | rdk-next |
175 | rdkb/components/opensource/ccsp/CcspDmCli | rdk-next |
176 | rdkb/components/opensource/ccsp/CcspEPONAgent | rdk-next |
177 | rdkb/components/opensource/ccsp/CcspEthAgent | rdk-next |
178 | rdkb/components/opensource/ccsp/CcspHomeSecurity | rdk-next |
179 | rdkb/components/opensource/ccsp/CcspLMLite | rdk-next |
180 | rdkb/components/opensource/ccsp/CcspMisc | rdk-next |
181 | rdkb/components/opensource/ccsp/CcspMoCA | rdk-next |
182 | rdkb/components/opensource/ccsp/CcspMtaAgent | rdk-next |
183 | rdkb/components/opensource/ccsp/CcspPandM | rdk-next |
184 | rdkb/components/opensource/ccsp/CcspPsm | rdk-next |
185 | rdkb/components/opensource/ccsp/CcspSnmpPa | rdk-next |
186 | rdkb/components/opensource/ccsp/CcspTr069Pa | rdk-next |
187 | rdkb/components/opensource/ccsp/CcspWifiAgent | rdk-next |
188 | rdkb/components/opensource/ccsp/CcspXDNS | rdk-next |
189 | rdkb/components/opensource/ccsp/CoreNetLib | rdk-next |
190 | rdkb/components/opensource/ccsp/DhcpManager | rdk-next |
191 | rdkb/components/opensource/ccsp/FirmwareSanity | rdk-next |
192 | rdkb/components/opensource/ccsp/GwProvApp | rdk-next |
193 | rdkb/components/opensource/ccsp/GwProvApp-EthWan | rdk-next |
194 | rdkb/components/opensource/ccsp/GwProvApp-ePON | rdk-next |
195 | rdkb/components/opensource/ccsp/MeshAgent | rdk-next |
196 | rdkb/components/opensource/ccsp/OneWifi | rdk-next |
197 | rdkb/components/opensource/ccsp/PowerManager | rdk-next |
198 | rdkb/components/opensource/ccsp/RdkCellularManager | rdk-next |
199 | rdkb/components/opensource/ccsp/RdkGponManager | rdk-next |
200 | rdkb/components/opensource/ccsp/RdkInterDeviceManager | rdk-next |
201 | rdkb/components/opensource/ccsp/RdkPlatformManager | rdk-next |
202 | rdkb/components/opensource/ccsp/RdkPppManager | rdk-next |
203 | rdkb/components/opensource/ccsp/RdkTelcoVoiceManager | rdk-next |
204 | rdkb/components/opensource/ccsp/RdkVlanBridgingManager | rdk-next |
205 | rdkb/components/opensource/ccsp/RdkWanManager | rdk-next |
206 | rdkb/components/opensource/ccsp/RdkXdslManager | rdk-next |
207 | rdkb/components/opensource/ccsp/TestAndDiagnostic | rdk-next |
208 | rdkb/components/opensource/ccsp/Utopia | rdk-next |
209 | rdkb/components/opensource/ccsp/Xconf | rdk-next |
210 | rdkb/components/opensource/ccsp/hal | rdk-next |
211 | rdkb/components/opensource/ccsp/hal/rdk-wifi-hal | rdk-next |
212 | rdkb/components/opensource/ccsp/halinterface | rdk-next |
213 | rdkb/components/opensource/ccsp/hotspot | rdk-next |
214 | rdkb/components/opensource/ccsp/sysint | rdk-next |
215 | rdkb/components/opensource/ccsp/webui | rdk-next |
216 | rdkb/components/opensource/ccsp/webui-bwg | rdk-next |
217 | rdkb/devices/emulator/hal | rdk-next |
218 | rdkb/devices/intel-x86-pc/emulator/sysint | rdk-next |
219 | rdkb/devices/intel-x86-pc/emulator/tdkb | rdk-next |
220 | rdkb/devices/raspberrypi/hal | rdk-next |
221 | rdkb/devices/raspberrypi/sysint | rdk-next |
222 | rdkb/devices/raspberrypi/tdkb | rdk-next |
223 | rdkb/devices/rdkbemu/ccsp/rdkb | rdk-next |
224 | rdkb/devices/rdkbemu/rdkbemu_xb3 | rdk-next |
225 | rdkb/devices/turris/tdkb | rdk-next |
226 | rdkb/tools/tdkb | rdk-next |
227 | rdkc/components/opensource/batteryhal | rdk-next |
228 | rdkc/components/opensource/camera-apps | rdk-next |
229 | rdkc/components/opensource/camera-hal | rdk-next |
230 | rdkc/components/opensource/camera/ledmgr | rdk-next |
231 | rdkc/components/opensource/configMgr | rdk-next |
232 | rdkc/components/opensource/cvr | rdk-next |
233 | rdkc/components/opensource/httpClients | rdk-next |
234 | rdkc/components/opensource/ledmgr | rdk-next |
235 | rdkc/components/opensource/plugins | rdk-next |
236 | rdkc/components/opensource/pwstream | rdk-next |
237 | rdkc/components/opensource/rms | rdk-next |
238 | rdkc/components/opensource/rtc-app | rdk-next |
239 | rdkc/components/opensource/sensorhal | rdk-next |
240 | rdkc/components/opensource/streamerhal | rdk-next |
241 | rdkc/components/opensource/thumbnail | rdk-next |
242 | rdkc/components/opensource/vaEngine | rdk-next |
243 | rdkc/devices/raspberrypi/mediastreamer | rdk-next |
244 | rdkc/devices/raspberrypi/tdkc | rdk-next |
245 | rdkc/tools/tdkc | rdk-next |
246 | rdkv/tools/tdkv | rdk-next |
247 | rdk/components/generic/gst-plugins-rdk | rdk-next |
248 | rdk/components/generic/gst-plugins-rdk-aamp | stable2 |
249 | rdk/devices/intel-x86-pc/rdkemulator/gst-plugins-rdk/playersinkbin | rdk-next |
250 | rdk/devices/intel-x86-pc/rdkemulator/gst-plugins-rdk/qamtunersrc | rdk-next |
251 | rdk/devices/raspberrypi/gst-plugins-rdk/playersinkbin | rdk-next |
Licensed repos list on CMF gerrit:
Components | Product Branch | |
---|---|---|
1 | components/generic/camgr | master |
2 | components/generic/gst-plugins-rdk-dvr | master |
3 | components/generic/gst-plugins-rdk-subtec | master |
4 | components/generic/gstreamer-cxx | master |
5 | components/generic/js-plugins | master |
6 | components/generic/rdk-oe/devicesettings-hal-sample | master |
7 | components/generic/rdk-oe/iarmmgrs-hal-sample | master |
8 | components/generic/rdk-oe/meta-cmf-video-reference | master |
9 | components/generic/rdk-oe/meta-cmf-video-reference-next | master |
10 | components/generic/rdk-oe/meta-cmf-video-restricted | master |
11 | components/generic/sessionmgr | master |
12 | components/generic/subtec-app | master |
13 | components/generic/websocket-ipplayer2 | master |
14 | components/generic/websocket-ipplayer2-api | master |
15 | components/generic/websocket-ipplayer2-utils | master |
16 | components/opensource/patches/qtwebkit-5.1.1 | master |
17 | components/restricted/rdk-oe/meta-cmf-restricted | rdk-next |
18 | devices/imx8mq/gst-plugins-rdk/playersinkbin | master |
19 | devices/intel-cgp/tdkb | master |
20 | devices/intel-x86-pc/rdkri/lxc | master |
21 | reference/manifests | master |
22 | components/asp/rdk-oe/meta-cmf-bsp-emulator | master |
23 | components/asp/rdk-oe/meta-rdk-bsp-emulator | rdk-next |
24 | components/generic/dvr | rdk-next |
25 | components/generic/fog | rdk-next |
26 | components/generic/rdk-oe/meta-cmf-raspberrypi-restricted | rdk-next |
27 | components/generic/rdk-oe/meta-dvb | rdk-next |
28 | components/generic/recorder | rdk-next |
29 | components/generic/tasecureapi | main |
30 | components/generic/tools | rdk-next |
31 | components/generic/tr69 | rdk-next |
32 | components/restricted/rdk-oe/meta-rdk-restricted | rdk-next |
33 | devices/intel-x86-pc/rdkemulator/closedcaption | master |
34 | devices/intel-x86-pc/rdkemulator/tr69 | rdk-next |
35 | devices/intel-x86-pc/rdkri/mediaframework | master |
36 | devices/raspberrypi/dvr | rdk-next |
37 | devices/raspberrypi/fwupgrade-lib | rdk-next |
38 | devices/raspberrypi/mediaframework | rdk-next |
39 | rdk/components/generic/dvb/dtv-testapp | rdk-next |
40 | rdk/components/generic/rmf_mediastreamer | master |
41 | rdk/components/generic/servicemanager | rdk-next |
42 | rdk/components/generic/storagemanager | rdk-next |
43 | rdk/devices/intel-x86-pc/emulator/rmf_mediastreamer | master |
44 | rdk/devices/intel-x86-pc/emulator/servicemanager | master |
45 | rdk/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:
Component | Product Branch | License | |
---|---|---|---|
1 | RDKServices | current default branch | Apache |
2 | Lightning | master | Apache |
3 | Lightning-CLI | master | Apache |
4 | Lightning-SDK | master | Apache |
5 | Lightning-UI-Components | master | Apache |
6 | OCDM-Clearkey | master | Apache |
7 | OCDM-Nagra | master | Apache |
8 | OCDM-Playready | master | Apache |
9 | OCDM-Widevine | master | Apache |
10 | RDKShell | master | Apache |
11 | RDKSplashScreen | master | Apache |
12 | Thunder | master | Apache |
13 | ThunderJS | master | Apache |
14 | ThunderNanoServices | master | Apache |
15 | ThunderUI | master | Apache |
16 | Dobby | master | Apache |
17 | android-remote | master | Apache |
18 | meta-turris | master | Apache |
19 | opensync-vendor-rdk-turris | master | Apache |
20 | rdkb-turris-hal | master | Apache |
21 | rdkcryptoapi | master | Apache |
22 | sample-licensing | master | Apache |
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
|
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
- Log in to JIRA https://jira.rdkcentral.com/jira/secure/Dashboard.jspa using rdkcentral credentials
- Create a JIRA ticket under RDKDEV (for Video) or RDKBDEV (for Broadband).
- Click on the Create button
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
-
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.
-
Issue Type
√ New feature – New feature contributions.
-
Ticket Status
Status should be initially Open, and transitioned to the appropriate value while the contribution is being worked on.
-
Summary
A brief summary about what we are trying to contribute
-
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 OverviewBrief 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 ChecklistThe 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
- Impacted component(s) – Fill in list of impacted RDK components
- RDK SI Impact – System Integration impacts
- CPE SW Components – Component names.
- Test Notes – Describe what tests are performed to validate this contribution and the procedure.
- 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.
- doxygen: It is a tool for a documentation system for various programming languages such as C++, C, Java, Objective-C
- 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.
- 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
- perl: It is a script file used by doxygen and it should be present in the system
- 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.
- Create a new folder “example_name” – This is where the final report will reside.
- Go to directory “example_name”
- Reference doxygen configuration file
- doxygen.dox – used for customizing the index page
-
doxygen.css – style sheet file used for formatting html output
-
Doxyfile – Configuration file that is needed for generating doxygen output
-
RDK-Logo.png – RDK Logo
-
Check out all the RDK component source code (Source code must be Doxygen complaint) for which document needs to be generated, for example :
-
$ git clone “https://code.rdkcentral.com/r/rdk/components/generic/wifi” wifi
-
-
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 */
-
-
Edit doxygen.dox, if the index page needs to be customized, add module names that will be shown in output index page
- Edit doxygen.css, for output formats, fonts, etc
-
Use the following command at the command prompt, to generate html report
-
$ doxygen Doxyfile
-
- 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.
/** * @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.
/** * @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 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:
#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:
/** *@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:
/** *@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:
int number; /**< Comment about number*/
Enumerated Types
Enumerated types are tagged using the @enum. When updating enum types, update comments like this:
/** *@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.
/** *@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) */
/** *@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. * */
/** *@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 * */
/** * - bulleted list item1 * - sub bulleted item1 * * - bulleted list item2 * */
/** * -# numbered list item1 * -# numbered list item2 * */
/** *@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: