File tree Expand file tree Collapse file tree 1 file changed +25
-2
lines changed Expand file tree Collapse file tree 1 file changed +25
-2
lines changed Original file line number Diff line number Diff line change @@ -105,8 +105,31 @@ new code-driven class structure.
105105
106106#### Command Handling
107107
108- - Translate ` emberAf...Callback ` functions into logic inside your
109- ` InvokeCommand ` method.
108+ - Translate ` CommandHandlerInterface ` calls or ` emberAf...Callback ` functions
109+ into logic inside your ` InvokeCommand ` method:
110+
111+ - ember calls of the form ` emberAf<CLUSTER>Cluster<COMMAND>Callback ` will
112+ be converted to a switch ` case <CLUSTER>::Commands::<COMMAND>::Id: ... `
113+ implementation
114+
115+ Example:
116+
117+ ``` cpp
118+ // This
119+ emberAfAccessControlClusterReviewFabricRestrictionsCallback (...);
120+
121+ // Becomes this in the `InvokeCommand` implementation:
122+ switch (request.path.mCommandId) {
123+ // ...
124+ case AccessControl::Commands::ReviewFabricRestrictions::Id:
125+ // ...
126+ }
127+ ```
128+
129+ - Command Handler Interface logic translates directly: `CHI` has a switch
130+ on command ID inside its `InvokeCommand` call. You should have the same
131+ logic inside the `ServerClusterInterface` processing logic.
132+
110133- The ` InvokeCommand ` method can return an ` ActionReturnStatus ` optional. For
111134 better readability, prefer returning a status code directly (e.g.,
112135 ` return Status::Success; ` ) rather than using the command handler to set the
You can’t perform that action at this time.
0 commit comments