blob: 612b3dd6a29d4bb1ad0b3848fe4a142030b8a457 [file] [log] [blame]
{{> header}}
#pragma once
#include <stdint.h>
namespace chip {
namespace app {
namespace Clusters {
namespace detail {
// Enums shared across multiple clusters.
{{#zcl_enums}}
{{#if has_more_than_one_cluster}}
{{> cluster_enums_enum ns=""}}
{{/if}}
{{/zcl_enums}}
// Bitmaps shared across multiple clusters.
{{#zcl_bitmaps}}
{{#if has_more_than_one_cluster}}
// Bitmap for {{label}}
enum class {{asType label}} : {{asUnderlyingZclType name}} {
{{#zcl_bitmap_items}}
k{{asUpperCamelCase label}} = {{asHex mask}},
{{/zcl_bitmap_items}}
};
{{/if}}
{{/zcl_bitmaps}}
} // namespace detail
{{#zcl_clusters}}
namespace {{asUpperCamelCase name}} {
{{#zcl_enums}}
{{#if has_more_than_one_cluster}}
using {{asUpperCamelCase name}} = Clusters::detail::{{asUpperCamelCase name}};
{{else}}
{{> cluster_enums_enum ns=(asUpperCamelCase ../name)}}
{{/if}}
{{/zcl_enums}}
{{#zcl_bitmaps}}
{{#if has_more_than_one_cluster}}
using {{asUpperCamelCase name}} = Clusters::detail::{{asUpperCamelCase name}};
{{else}}
// Bitmap for {{label}}
enum class {{asType label}} : {{asUnderlyingZclType name}} {
{{#zcl_bitmap_items}}
k{{asUpperCamelCase label}} = {{asHex mask}},
{{/zcl_bitmap_items}}
};
{{/if}}
{{/zcl_bitmaps}}
} // namespace {{asUpperCamelCase name}}
{{/zcl_clusters}}
} // namespace Clusters
} // namespace app
} // namespace chip
// Included at the end, so all our definitions above are available.
#include <app/CompatEnumNames.h>