• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 /*
2  * Copyright (c) 2025 Huawei Device Co., Ltd.
3  * Licensed under the Apache License, Version 2.0 (the "License");
4  * you may not use this file except in compliance with the License.
5  * You may obtain a copy of the License at
6  *
7  *     http://www.apache.org/licenses/LICENSE-2.0
8  *
9  * Unless required by applicable law or agreed to in writing, software
10  * distributed under the License is distributed on an "AS IS" BASIS,
11  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12  * See the License for the specific language governing permissions and
13  * limitations under the License.
14  */
15 
16 #ifndef MC_SET_MECH_CAMERA_TRACKING_ENABLE_CMD_H
17 #define MC_SET_MECH_CAMERA_TRACKING_ENABLE_CMD_H
18 
19 #include "mc_command_base.h"
20 #include "mechbody_controller_types.h"
21 
22 namespace OHOS {
23 namespace MechBodyController {
24 
25 class SetMechCameraTrackingEnableCmd : public CommandBase {
26 public:
27     static constexpr uint8_t CMD_SET = 0x02;
28     static constexpr uint8_t CMD_ID = 0x28;
29     static constexpr uint16_t REQ_SIZE = 1;
30     static constexpr uint16_t RSP_SIZE = 1;
31 
32     explicit SetMechCameraTrackingEnableCmd(MechTrackingStatus status);
33     ~SetMechCameraTrackingEnableCmd() override = default;
34 
35     std::shared_ptr<MechDataBuffer> Marshal() const override;
36     void TriggerResponse(std::shared_ptr<MechDataBuffer> data) override;
37 
38     MechTrackingStatus GetStatus() const;
39     uint8_t GetResult() const;
40 
41 private:
42     MechTrackingStatus status_;
43     uint8_t result_ = 0;
44 };
45 
46 } // namespace MechBodyController
47 } // namespace OHOS
48 
49 #endif // MC_SET_MECH_CAMERA_TRACKING_ENABLE_CMD_H
50