| /* |
| * |
| * Copyright (c) 2022 Project CHIP Authors |
| * |
| * Licensed under the Apache License, Version 2.0 (the "License"); |
| * you may not use this file except in compliance with the License. |
| * You may obtain a copy of the License at |
| * |
| * http://www.apache.org/licenses/LICENSE-2.0 |
| * |
| * Unless required by applicable law or agreed to in writing, software |
| * distributed under the License is distributed on an "AS IS" BASIS, |
| * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| * See the License for the specific language governing permissions and |
| * limitations under the License. |
| */ |
| |
| // THIS FILE IS GENERATED BY ZAP |
| // This file is generated from clusters-Commands.h.zapt |
| |
| #pragma once |
| |
| #include <app/data-model/DecodableList.h> |
| #include <app/data-model/Encode.h> |
| #include <app/data-model/List.h> |
| #include <app/data-model/NullObject.h> |
| #include <app/data-model/Nullable.h> |
| #include <lib/core/DataModelTypes.h> |
| #include <lib/core/Optional.h> |
| #include <lib/core/TLV.h> |
| #include <lib/support/BitMask.h> |
| |
| #include <clusters/shared/Enums.h> |
| #include <clusters/shared/Structs.h> |
| |
| #include <clusters/CommissioningProxy/ClusterId.h> |
| #include <clusters/CommissioningProxy/CommandIds.h> |
| #include <clusters/CommissioningProxy/Enums.h> |
| #include <clusters/CommissioningProxy/Structs.h> |
| |
| #include <cstdint> |
| |
| namespace chip { |
| namespace app { |
| namespace Clusters { |
| namespace CommissioningProxy { |
| namespace Commands { |
| // Forward-declarations so we can reference these later. |
| |
| namespace ProxyConnectRequest { |
| struct Type; |
| struct DecodableType; |
| } // namespace ProxyConnectRequest |
| |
| namespace ProxyConnectResponse { |
| struct Type; |
| struct DecodableType; |
| } // namespace ProxyConnectResponse |
| |
| namespace ProxyDisconnectRequest { |
| struct Type; |
| struct DecodableType; |
| } // namespace ProxyDisconnectRequest |
| |
| namespace ProxyScanRequest { |
| struct Type; |
| struct DecodableType; |
| } // namespace ProxyScanRequest |
| |
| namespace ProxyScanResponse { |
| struct Type; |
| struct DecodableType; |
| } // namespace ProxyScanResponse |
| |
| namespace ProxyBackGroundScanStartRequest { |
| struct Type; |
| struct DecodableType; |
| } // namespace ProxyBackGroundScanStartRequest |
| |
| namespace ProxyBackGroundScanStopRequest { |
| struct Type; |
| struct DecodableType; |
| } // namespace ProxyBackGroundScanStopRequest |
| |
| namespace ProxyMessageRequest { |
| struct Type; |
| struct DecodableType; |
| } // namespace ProxyMessageRequest |
| |
| namespace ProxyMessageResponse { |
| struct Type; |
| struct DecodableType; |
| } // namespace ProxyMessageResponse |
| |
| } // namespace Commands |
| |
| namespace Commands { |
| namespace ProxyConnectRequest { |
| enum class Fields : uint8_t |
| { |
| kAddress = 0, |
| kTransport = 1, |
| kDiscriminator = 2, |
| kVendorID = 3, |
| kProductID = 4, |
| kTimeout = 5, |
| kWiFiBand = 6, |
| }; |
| |
| struct Type |
| { |
| public: |
| // Use GetCommandId instead of commandId directly to avoid naming conflict with CommandIdentification in ExecutionOfACommand |
| static constexpr CommandId GetCommandId() { return Commands::ProxyConnectRequest::Id; } |
| static constexpr ClusterId GetClusterId() { return Clusters::CommissioningProxy::Id; } |
| |
| DataModel::Nullable<chip::ByteSpan> address; |
| chip::BitMask<CapabilitiesBitmap> transport = static_cast<chip::BitMask<CapabilitiesBitmap>>(0); |
| uint16_t discriminator = static_cast<uint16_t>(0); |
| chip::VendorId vendorID = static_cast<chip::VendorId>(0); |
| uint16_t productID = static_cast<uint16_t>(0); |
| uint16_t timeout = static_cast<uint16_t>(0); |
| Optional<chip::BitMask<WiFiBandBitmap>> wiFiBand; |
| |
| CHIP_ERROR Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const; |
| |
| using ResponseType = Clusters::CommissioningProxy::Commands::ProxyConnectResponse::DecodableType; |
| |
| static constexpr bool MustUseTimedInvoke() { return false; } |
| }; |
| |
| struct DecodableType |
| { |
| public: |
| static constexpr CommandId GetCommandId() { return Commands::ProxyConnectRequest::Id; } |
| static constexpr ClusterId GetClusterId() { return Clusters::CommissioningProxy::Id; } |
| static constexpr bool kIsFabricScoped = true; |
| |
| DataModel::Nullable<chip::ByteSpan> address; |
| chip::BitMask<CapabilitiesBitmap> transport = static_cast<chip::BitMask<CapabilitiesBitmap>>(0); |
| uint16_t discriminator = static_cast<uint16_t>(0); |
| chip::VendorId vendorID = static_cast<chip::VendorId>(0); |
| uint16_t productID = static_cast<uint16_t>(0); |
| uint16_t timeout = static_cast<uint16_t>(0); |
| Optional<chip::BitMask<WiFiBandBitmap>> wiFiBand; |
| |
| CHIP_ERROR Decode(TLV::TLVReader & reader, FabricIndex aAccessingFabricIndex); |
| }; |
| }; // namespace ProxyConnectRequest |
| namespace ProxyConnectResponse { |
| enum class Fields : uint8_t |
| { |
| kSessionID = 0, |
| }; |
| |
| struct Type |
| { |
| public: |
| // Use GetCommandId instead of commandId directly to avoid naming conflict with CommandIdentification in ExecutionOfACommand |
| static constexpr CommandId GetCommandId() { return Commands::ProxyConnectResponse::Id; } |
| static constexpr ClusterId GetClusterId() { return Clusters::CommissioningProxy::Id; } |
| |
| uint16_t sessionID = static_cast<uint16_t>(0); |
| |
| CHIP_ERROR Encode(DataModel::FabricAwareTLVWriter & aWriter, TLV::Tag aTag) const; |
| |
| using ResponseType = DataModel::NullObjectType; |
| |
| static constexpr bool MustUseTimedInvoke() { return false; } |
| }; |
| |
| struct DecodableType |
| { |
| public: |
| static constexpr CommandId GetCommandId() { return Commands::ProxyConnectResponse::Id; } |
| static constexpr ClusterId GetClusterId() { return Clusters::CommissioningProxy::Id; } |
| |
| uint16_t sessionID = static_cast<uint16_t>(0); |
| |
| CHIP_ERROR Decode(TLV::TLVReader & reader); |
| }; |
| }; // namespace ProxyConnectResponse |
| namespace ProxyDisconnectRequest { |
| enum class Fields : uint8_t |
| { |
| kSessionID = 0, |
| }; |
| |
| struct Type |
| { |
| public: |
| // Use GetCommandId instead of commandId directly to avoid naming conflict with CommandIdentification in ExecutionOfACommand |
| static constexpr CommandId GetCommandId() { return Commands::ProxyDisconnectRequest::Id; } |
| static constexpr ClusterId GetClusterId() { return Clusters::CommissioningProxy::Id; } |
| |
| DataModel::Nullable<uint16_t> sessionID; |
| |
| CHIP_ERROR Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const; |
| |
| using ResponseType = DataModel::NullObjectType; |
| |
| static constexpr bool MustUseTimedInvoke() { return false; } |
| }; |
| |
| struct DecodableType |
| { |
| public: |
| static constexpr CommandId GetCommandId() { return Commands::ProxyDisconnectRequest::Id; } |
| static constexpr ClusterId GetClusterId() { return Clusters::CommissioningProxy::Id; } |
| static constexpr bool kIsFabricScoped = true; |
| |
| DataModel::Nullable<uint16_t> sessionID; |
| |
| CHIP_ERROR Decode(TLV::TLVReader & reader, FabricIndex aAccessingFabricIndex); |
| }; |
| }; // namespace ProxyDisconnectRequest |
| namespace ProxyScanRequest { |
| enum class Fields : uint8_t |
| { |
| kTransport = 0, |
| kWiFiBands = 1, |
| }; |
| |
| struct Type |
| { |
| public: |
| // Use GetCommandId instead of commandId directly to avoid naming conflict with CommandIdentification in ExecutionOfACommand |
| static constexpr CommandId GetCommandId() { return Commands::ProxyScanRequest::Id; } |
| static constexpr ClusterId GetClusterId() { return Clusters::CommissioningProxy::Id; } |
| |
| chip::BitMask<CapabilitiesBitmap> transport = static_cast<chip::BitMask<CapabilitiesBitmap>>(0); |
| Optional<chip::BitMask<WiFiBandBitmap>> wiFiBands; |
| |
| CHIP_ERROR Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const; |
| |
| using ResponseType = Clusters::CommissioningProxy::Commands::ProxyScanResponse::DecodableType; |
| |
| static constexpr bool MustUseTimedInvoke() { return false; } |
| }; |
| |
| struct DecodableType |
| { |
| public: |
| static constexpr CommandId GetCommandId() { return Commands::ProxyScanRequest::Id; } |
| static constexpr ClusterId GetClusterId() { return Clusters::CommissioningProxy::Id; } |
| static constexpr bool kIsFabricScoped = false; |
| |
| chip::BitMask<CapabilitiesBitmap> transport = static_cast<chip::BitMask<CapabilitiesBitmap>>(0); |
| Optional<chip::BitMask<WiFiBandBitmap>> wiFiBands; |
| |
| CHIP_ERROR Decode(TLV::TLVReader & reader); |
| }; |
| }; // namespace ProxyScanRequest |
| namespace ProxyScanResponse { |
| enum class Fields : uint8_t |
| { |
| kNumberOfResults = 0, |
| kProxyScanResult = 1, |
| }; |
| |
| struct Type |
| { |
| public: |
| // Use GetCommandId instead of commandId directly to avoid naming conflict with CommandIdentification in ExecutionOfACommand |
| static constexpr CommandId GetCommandId() { return Commands::ProxyScanResponse::Id; } |
| static constexpr ClusterId GetClusterId() { return Clusters::CommissioningProxy::Id; } |
| |
| uint8_t numberOfResults = static_cast<uint8_t>(0); |
| DataModel::List<const Structs::ScanResultStruct::Type> proxyScanResult; |
| |
| CHIP_ERROR Encode(DataModel::FabricAwareTLVWriter & aWriter, TLV::Tag aTag) const; |
| |
| using ResponseType = DataModel::NullObjectType; |
| |
| static constexpr bool MustUseTimedInvoke() { return false; } |
| }; |
| |
| struct DecodableType |
| { |
| public: |
| static constexpr CommandId GetCommandId() { return Commands::ProxyScanResponse::Id; } |
| static constexpr ClusterId GetClusterId() { return Clusters::CommissioningProxy::Id; } |
| |
| uint8_t numberOfResults = static_cast<uint8_t>(0); |
| DataModel::DecodableList<Structs::ScanResultStruct::DecodableType> proxyScanResult; |
| |
| CHIP_ERROR Decode(TLV::TLVReader & reader); |
| }; |
| }; // namespace ProxyScanResponse |
| namespace ProxyBackGroundScanStartRequest { |
| enum class Fields : uint8_t |
| { |
| kTransport = 0, |
| kTimeout = 1, |
| kWiFiBands = 2, |
| }; |
| |
| struct Type |
| { |
| public: |
| // Use GetCommandId instead of commandId directly to avoid naming conflict with CommandIdentification in ExecutionOfACommand |
| static constexpr CommandId GetCommandId() { return Commands::ProxyBackGroundScanStartRequest::Id; } |
| static constexpr ClusterId GetClusterId() { return Clusters::CommissioningProxy::Id; } |
| |
| chip::BitMask<CapabilitiesBitmap> transport = static_cast<chip::BitMask<CapabilitiesBitmap>>(0); |
| uint16_t timeout = static_cast<uint16_t>(0); |
| Optional<chip::BitMask<WiFiBandBitmap>> wiFiBands; |
| |
| CHIP_ERROR Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const; |
| |
| using ResponseType = DataModel::NullObjectType; |
| |
| static constexpr bool MustUseTimedInvoke() { return false; } |
| }; |
| |
| struct DecodableType |
| { |
| public: |
| static constexpr CommandId GetCommandId() { return Commands::ProxyBackGroundScanStartRequest::Id; } |
| static constexpr ClusterId GetClusterId() { return Clusters::CommissioningProxy::Id; } |
| static constexpr bool kIsFabricScoped = false; |
| |
| chip::BitMask<CapabilitiesBitmap> transport = static_cast<chip::BitMask<CapabilitiesBitmap>>(0); |
| uint16_t timeout = static_cast<uint16_t>(0); |
| Optional<chip::BitMask<WiFiBandBitmap>> wiFiBands; |
| |
| CHIP_ERROR Decode(TLV::TLVReader & reader); |
| }; |
| }; // namespace ProxyBackGroundScanStartRequest |
| namespace ProxyBackGroundScanStopRequest { |
| enum class Fields : uint8_t |
| { |
| kTransport = 0, |
| kWiFiBands = 1, |
| }; |
| |
| struct Type |
| { |
| public: |
| // Use GetCommandId instead of commandId directly to avoid naming conflict with CommandIdentification in ExecutionOfACommand |
| static constexpr CommandId GetCommandId() { return Commands::ProxyBackGroundScanStopRequest::Id; } |
| static constexpr ClusterId GetClusterId() { return Clusters::CommissioningProxy::Id; } |
| |
| chip::BitMask<CapabilitiesBitmap> transport = static_cast<chip::BitMask<CapabilitiesBitmap>>(0); |
| Optional<chip::BitMask<WiFiBandBitmap>> wiFiBands; |
| |
| CHIP_ERROR Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const; |
| |
| using ResponseType = DataModel::NullObjectType; |
| |
| static constexpr bool MustUseTimedInvoke() { return false; } |
| }; |
| |
| struct DecodableType |
| { |
| public: |
| static constexpr CommandId GetCommandId() { return Commands::ProxyBackGroundScanStopRequest::Id; } |
| static constexpr ClusterId GetClusterId() { return Clusters::CommissioningProxy::Id; } |
| static constexpr bool kIsFabricScoped = false; |
| |
| chip::BitMask<CapabilitiesBitmap> transport = static_cast<chip::BitMask<CapabilitiesBitmap>>(0); |
| Optional<chip::BitMask<WiFiBandBitmap>> wiFiBands; |
| |
| CHIP_ERROR Decode(TLV::TLVReader & reader); |
| }; |
| }; // namespace ProxyBackGroundScanStopRequest |
| namespace ProxyMessageRequest { |
| enum class Fields : uint8_t |
| { |
| kSessionID = 0, |
| kResponseTimeout = 1, |
| kMessage = 2, |
| }; |
| |
| struct Type |
| { |
| public: |
| // Use GetCommandId instead of commandId directly to avoid naming conflict with CommandIdentification in ExecutionOfACommand |
| static constexpr CommandId GetCommandId() { return Commands::ProxyMessageRequest::Id; } |
| static constexpr ClusterId GetClusterId() { return Clusters::CommissioningProxy::Id; } |
| |
| uint16_t sessionID = static_cast<uint16_t>(0); |
| uint8_t responseTimeout = static_cast<uint8_t>(0); |
| DataModel::Nullable<chip::ByteSpan> message; |
| |
| CHIP_ERROR Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const; |
| |
| using ResponseType = Clusters::CommissioningProxy::Commands::ProxyMessageResponse::DecodableType; |
| |
| static constexpr bool MustUseTimedInvoke() { return false; } |
| }; |
| |
| struct DecodableType |
| { |
| public: |
| static constexpr CommandId GetCommandId() { return Commands::ProxyMessageRequest::Id; } |
| static constexpr ClusterId GetClusterId() { return Clusters::CommissioningProxy::Id; } |
| static constexpr bool kIsFabricScoped = true; |
| |
| uint16_t sessionID = static_cast<uint16_t>(0); |
| uint8_t responseTimeout = static_cast<uint8_t>(0); |
| DataModel::Nullable<chip::ByteSpan> message; |
| |
| CHIP_ERROR Decode(TLV::TLVReader & reader, FabricIndex aAccessingFabricIndex); |
| }; |
| }; // namespace ProxyMessageRequest |
| namespace ProxyMessageResponse { |
| enum class Fields : uint8_t |
| { |
| kSessionID = 0, |
| kMessage = 1, |
| }; |
| |
| struct Type |
| { |
| public: |
| // Use GetCommandId instead of commandId directly to avoid naming conflict with CommandIdentification in ExecutionOfACommand |
| static constexpr CommandId GetCommandId() { return Commands::ProxyMessageResponse::Id; } |
| static constexpr ClusterId GetClusterId() { return Clusters::CommissioningProxy::Id; } |
| |
| uint16_t sessionID = static_cast<uint16_t>(0); |
| DataModel::Nullable<chip::ByteSpan> message; |
| |
| CHIP_ERROR Encode(DataModel::FabricAwareTLVWriter & aWriter, TLV::Tag aTag) const; |
| |
| using ResponseType = DataModel::NullObjectType; |
| |
| static constexpr bool MustUseTimedInvoke() { return false; } |
| }; |
| |
| struct DecodableType |
| { |
| public: |
| static constexpr CommandId GetCommandId() { return Commands::ProxyMessageResponse::Id; } |
| static constexpr ClusterId GetClusterId() { return Clusters::CommissioningProxy::Id; } |
| |
| uint16_t sessionID = static_cast<uint16_t>(0); |
| DataModel::Nullable<chip::ByteSpan> message; |
| |
| CHIP_ERROR Decode(TLV::TLVReader & reader); |
| }; |
| }; // namespace ProxyMessageResponse |
| } // namespace Commands |
| } // namespace CommissioningProxy |
| } // namespace Clusters |
| } // namespace app |
| } // namespace chip |