Skip to content

Commit c1c352a

Browse files
committed
RDKEMW-11903: Add custom coding guidelines for entservices-repos
Reason for change: To enhance copilot reviews using repo specific guidelines Test Procedure:NA Risks: Low version: Patch Signed-off-by: Soundaryaa [email protected]
1 parent d01141e commit c1c352a

File tree

4 files changed

+13
-13
lines changed

4 files changed

+13
-13
lines changed

.github/instructions/Plugin.instructions.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,10 @@ applyTo: "**/*.cpp,**/*.h"
44
---
55

66
# Instructions summary
7-
1. [Interface Implementation](https://github.com/rdkcentral/entservices-softwareupdate/blob/develop/.github/instructions/Plugin.instructions.md#interface-implementation)
8-
2. [Service Registration](https://github.com/rdkcentral/entservices-softwareupdate/blob/develop/.github/instructions/Plugin.instructions.md#service-registration)
9-
3. [JSON-RPC Stub Registration](https://github.com/rdkcentral/entservices-softwareupdate/blob/develop/.github/instructions/Plugin.instructions.md#json-rpc-stub-registration)
10-
4. [Handling Out-of-Process Plugin Failures](https://github.com/rdkcentral/entservices-softwareupdate/blob/develop/.github/instructions/Plugin.instructions.md#handling-out-of-process-plugin-failures)
7+
1. [Interface Implementation](#interface-implementation)
8+
2. [Service Registration](#service-registration)
9+
3. [JSON-RPC Stub Registration](#json-rpc-stub-registration)
10+
4. [Handling Out-of-Process Plugin Failures](#handling-out-of-process-plugin-failures)
1111

1212
### Interface Implementation
1313

@@ -82,7 +82,7 @@ If the plugin includes <interfaces/IPluginName*.h>, <interfaces/JsonData_PluginN
8282

8383
These autogenerated stubs are the Exchange::J* C++ classes (for example, Exchange::JHdcpProfile and JsonData_HdcpProfile.h) that are produced by the Thunder JSON‑RPC code generator from the IPluginName* interface headers; they expose the C++ interface over JSON‑RPC so you do not have to call Register() for each method manually.
8484

85-
Plugins using autogenerated JSON-RPC stubs (Exchange::J* classes) must register and unregister them in Initialize() and Deinitialize() methods.It should not be done in constructor and destructor.
85+
Plugins using autogenerated JSON-RPC stubs (Exchange::J* classes) must register and unregister them in Initialize() and Deinitialize() methods. Do not register or unregister them in the constructor or destructor.
8686

8787
In Initialize():
8888

@@ -113,7 +113,7 @@ RDKShell::RDKShell()
113113

114114
### Requirement
115115

116-
- If the plugin runs as out-of-process, then it should implement RPC::IRemoteConnection::"INotification interface inside your plugin.
116+
- If the plugin runs as out-of-process, then it should implement RPC::IRemoteConnection::INotification interface inside your plugin.
117117

118118
### Example
119119

.github/instructions/Pluginconfig.instructions.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,20 @@
11
---
2-
applyTo: "**/*.config,**/*.conf.in"
2+
applyTo: "**/*.conf.in"
33
---
44

55
### Plugin Configuration
66

77
### Requirement
88

9-
- Each plugin must define <PluginName>.conf.in file that includes the following mandatory properties:
9+
- Each plugin must define a <PluginName>.conf.in file that includes the following mandatory properties:
1010

1111
- **autostart**: Indicates whether the plugin should start automatically when the framework boots. This should be set to false by default.
1212

1313
- **callsign**: A unique identifier used to reference the plugin within the framework. Every callsign must be defined with a prefix of org.rdk and it must be followed by the ENT Service name written in PascalCase (e.g., org.rdk.PersistentStore).
1414

1515
- **Custom properties**: Any additional configuration parameters required by the plugin. These are passed during activation via PluginHost::IShell::ConfigLine(). The following structural configuration elements are commonly defined:
1616
- startuporder - Specifies the order in which plugins are started, relative to others.
17-
- precondition - If these aren't met, the plugin stays in the Preconditions state and activates automatically once they are satisfied. It is recommended to define the precondition if the plugin depends on other subsystems being active.
17+
- precondition - If these preconditions aren't met, the plugin stays in the Preconditions state and activates automatically once they are satisfied. It is recommended to define the precondition if the plugin depends on other subsystems being active.
1818
- mode - Defines the execution mode of the plugin.
1919

2020
### Plugin Mode Determination

.github/instructions/Pluginimplementation.instructions.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ QueryInterface:
2626
_userSettingsPlugin = _service->QueryInterface<WPEFramework::Exchange::IUserSettings>();
2727
```
2828

29-
SHOULD not use JSON-RPC or LinkType for inter-plugin communication, as they introduce unnecessary overhead.
29+
should not use JSON-RPC or LinkType for inter-plugin communication, as they introduce unnecessary overhead.
3030

3131
### Incorrect Example
3232

@@ -151,7 +151,7 @@ void RegisterWithTarget(const string& callsign, PluginHost::IShell* plugin) {
151151
}
152152
```
153153
154-
If the notifying plugin supports only JSON-RPC, then use a specialized smart link type when subscribing to its events. This method allows the framework to efficiently handle Plugin statechange events.
154+
If the notifying plugin supports only JSON-RPC, then use a specialized smart link type when subscribing to its events. This method allows the framework to efficiently handle Plugin state change events.
155155
156156
### Example
157157

.github/instructions/Pluginlifecycle.instructions.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ const string HdcpProfile::Initialize(PluginHost::IShell* service) {
3333
}
3434
```
3535
36-
- Plugin should register your listener object twice:
36+
- The plugin should register its listener object twice:
3737
3838
- Framework Service (_service): Use _service->Register(listener) to receive general plugin state change notifications (like ACTIVATED/DEACTIVATED).
3939
@@ -252,7 +252,7 @@ void HdcpProfile::Deinitialize(PluginHost::IShell* service) {
252252
253253
### Deactivated
254254
255-
Each plugin should implement the deactivated method. In Deactivated, it should be checked if remote connectionId matches your plugin's connectionId. If it matches your plugin's connectionId, the plugin should submit a deactivation job to handle the out-of-process failure gracefully.
255+
Each plugin should implement the Deactivated method. In Deactivated, it should be checked if remote connectionId matches your plugin's connectionId. If it matches your plugin's connectionId, the plugin should submit a deactivation job to handle the out-of-process failure gracefully.
256256
257257
### Example
258258

0 commit comments

Comments
 (0)