@@ -3033,12 +3033,130 @@ attribute_t *create_actuator_enabled(cluster_t *cluster, bool value)
3033
3033
esp_matter_bool (value));
3034
3034
}
3035
3035
3036
+ attribute_t *create_door_state (cluster_t *cluster, nullable<uint8_t > value)
3037
+ {
3038
+ return esp_matter::attribute::create (cluster, DoorLock::Attributes::DoorState::Id, ATTRIBUTE_FLAG_NONE,
3039
+ esp_matter_nullable_enum8 (value));
3040
+ }
3041
+
3042
+ attribute_t *create_door_open_events (cluster_t *cluster, uint32_t value)
3043
+ {
3044
+ return esp_matter::attribute::create (cluster, DoorLock::Attributes::DoorOpenEvents::Id, ATTRIBUTE_FLAG_WRITABLE,
3045
+ esp_matter_uint32 (value));
3046
+ }
3047
+
3048
+ attribute_t *create_door_close_events (cluster_t *cluster, uint32_t value)
3049
+ {
3050
+ return esp_matter::attribute::create (cluster, DoorLock::Attributes::DoorClosedEvents::Id, ATTRIBUTE_FLAG_WRITABLE,
3051
+ esp_matter_uint32 (value));
3052
+ }
3053
+
3054
+ attribute_t *create_open_period (cluster_t *cluster, uint16_t value)
3055
+ {
3056
+ return esp_matter::attribute::create (cluster, DoorLock::Attributes::OpenPeriod::Id, ATTRIBUTE_FLAG_WRITABLE,
3057
+ esp_matter_uint16 (value));
3058
+ }
3059
+
3060
+ attribute_t *create_number_of_total_users_supported (cluster_t *cluster, const uint16_t value)
3061
+ {
3062
+ return esp_matter::attribute::create (cluster, DoorLock::Attributes::NumberOfTotalUsersSupported::Id, ATTRIBUTE_FLAG_NONE,
3063
+ esp_matter_uint16 (value));
3064
+ }
3065
+
3066
+ attribute_t *create_number_of_pin_users_supported (cluster_t *cluster, const uint16_t value)
3067
+ {
3068
+ return esp_matter::attribute::create (cluster, DoorLock::Attributes::NumberOfPINUsersSupported::Id, ATTRIBUTE_FLAG_NONE,
3069
+ esp_matter_uint16 (value));
3070
+ }
3071
+
3072
+ attribute_t *create_number_of_rfid_users_supported (cluster_t *cluster, const uint16_t value)
3073
+ {
3074
+ return esp_matter::attribute::create (cluster, DoorLock::Attributes::NumberOfRFIDUsersSupported::Id, ATTRIBUTE_FLAG_NONE,
3075
+ esp_matter_uint16 (value));
3076
+ }
3077
+
3078
+ attribute_t *create_number_of_weekday_schedules_supported_per_user (cluster_t *cluster, const uint8_t value)
3079
+ {
3080
+ return esp_matter::attribute::create (cluster, DoorLock::Attributes::NumberOfWeekDaySchedulesSupportedPerUser::Id, ATTRIBUTE_FLAG_NONE,
3081
+ esp_matter_uint8 (value));
3082
+ }
3083
+
3084
+ attribute_t *create_number_of_year_day_schedules_supported_per_user (cluster_t *cluster, const uint8_t value)
3085
+ {
3086
+ return esp_matter::attribute::create (cluster, DoorLock::Attributes::NumberOfYearDaySchedulesSupportedPerUser::Id, ATTRIBUTE_FLAG_NONE,
3087
+ esp_matter_uint8 (value));
3088
+ }
3089
+
3090
+ attribute_t *create_number_of_holiday_schedules_supported (cluster_t *cluster, const uint8_t value)
3091
+ {
3092
+ return esp_matter::attribute::create (cluster, DoorLock::Attributes::NumberOfHolidaySchedulesSupported::Id, ATTRIBUTE_FLAG_NONE,
3093
+ esp_matter_uint8 (value));
3094
+ }
3095
+
3096
+ attribute_t *create_max_pin_code_length (cluster_t *cluster, const uint8_t value)
3097
+ {
3098
+ return esp_matter::attribute::create (cluster, DoorLock::Attributes::MaxPINCodeLength::Id, ATTRIBUTE_FLAG_NONE,
3099
+ esp_matter_uint8 (value));
3100
+ }
3101
+
3102
+ attribute_t *create_min_pin_code_length (cluster_t *cluster, const uint8_t value)
3103
+ {
3104
+ return esp_matter::attribute::create (cluster, DoorLock::Attributes::MinPINCodeLength::Id, ATTRIBUTE_FLAG_NONE,
3105
+ esp_matter_uint8 (value));
3106
+ }
3107
+
3108
+ attribute_t *create_max_rfid_code_length (cluster_t *cluster, const uint8_t value)
3109
+ {
3110
+ return esp_matter::attribute::create (cluster, DoorLock::Attributes::MaxRFIDCodeLength::Id, ATTRIBUTE_FLAG_NONE,
3111
+ esp_matter_uint8 (value));
3112
+ }
3113
+
3114
+ attribute_t *create_min_rfid_code_length (cluster_t *cluster, const uint8_t value)
3115
+ {
3116
+ return esp_matter::attribute::create (cluster, DoorLock::Attributes::MinRFIDCodeLength::Id, ATTRIBUTE_FLAG_NONE,
3117
+ esp_matter_uint8 (value));
3118
+ }
3119
+
3120
+ attribute_t *create_credential_rules_support (cluster_t *cluster, const uint8_t value)
3121
+ {
3122
+ return esp_matter::attribute::create (cluster, DoorLock::Attributes::CredentialRulesSupport::Id, ATTRIBUTE_FLAG_NONE,
3123
+ esp_matter_bitmap8 (value));
3124
+ }
3125
+
3126
+ attribute_t *create_number_of_credentials_supported_per_user (cluster_t *cluster, const uint8_t value)
3127
+ {
3128
+ return esp_matter::attribute::create (cluster, DoorLock::Attributes::NumberOfCredentialsSupportedPerUser::Id, ATTRIBUTE_FLAG_NONE,
3129
+ esp_matter_uint8 (value));
3130
+ }
3131
+
3132
+ attribute_t *create_language (cluster_t *cluster, const char * value, uint16_t length)
3133
+ {
3134
+ if (length > k_max_language_length) {
3135
+ ESP_LOGE (TAG, " Could not create attribute, string size out of bound" );
3136
+ return NULL ;
3137
+ }
3138
+ return esp_matter::attribute::create (cluster, DoorLock::Attributes::Language::Id, ATTRIBUTE_FLAG_WRITABLE,
3139
+ esp_matter_char_str ((char *)value, length), k_max_language_length);
3140
+ }
3141
+
3142
+ attribute_t *create_led_settings (cluster_t *cluster, uint8_t value)
3143
+ {
3144
+ return esp_matter::attribute::create (cluster, DoorLock::Attributes::LEDSettings::Id, ATTRIBUTE_FLAG_WRITABLE,
3145
+ esp_matter_enum8 (value));
3146
+ }
3147
+
3036
3148
attribute_t *create_auto_relock_time (cluster_t *cluster, uint32_t value)
3037
3149
{
3038
3150
return esp_matter::attribute::create (cluster, DoorLock::Attributes::AutoRelockTime::Id, ATTRIBUTE_FLAG_WRITABLE,
3039
3151
esp_matter_uint32 (value));
3040
3152
}
3041
3153
3154
+ attribute_t *create_sound_valume (cluster_t *cluster, uint8_t value)
3155
+ {
3156
+ return esp_matter::attribute::create (cluster, DoorLock::Attributes::SoundVolume::Id, ATTRIBUTE_FLAG_WRITABLE,
3157
+ esp_matter_enum8 (value));
3158
+ }
3159
+
3042
3160
attribute_t *create_operating_mode (cluster_t *cluster, uint8_t value, uint8_t min, uint8_t max)
3043
3161
{
3044
3162
attribute_t *attribute = esp_matter::attribute::create (cluster, DoorLock::Attributes::OperatingMode::Id,
@@ -3051,12 +3169,96 @@ attribute_t *create_operating_mode(cluster_t *cluster, uint8_t value, uint8_t mi
3051
3169
return attribute;
3052
3170
}
3053
3171
3054
- attribute_t *create_supported_operating_modes (cluster_t *cluster, uint16_t value)
3172
+ attribute_t *create_supported_operating_modes (cluster_t *cluster, const uint16_t value)
3055
3173
{
3056
3174
return esp_matter::attribute::create (cluster, DoorLock::Attributes::SupportedOperatingModes::Id,
3057
3175
ATTRIBUTE_FLAG_NONE, esp_matter_bitmap16 (value));
3058
3176
}
3059
3177
3178
+ attribute_t *create_default_configuration_register (cluster_t *cluster, uint16_t value)
3179
+ {
3180
+ return esp_matter::attribute::create (cluster, DoorLock::Attributes::DefaultConfigurationRegister::Id,
3181
+ ATTRIBUTE_FLAG_NONE, esp_matter_bitmap16 (value));
3182
+ }
3183
+
3184
+ attribute_t *create_enable_local_programming (cluster_t *cluster, bool value)
3185
+ {
3186
+ return esp_matter::attribute::create (cluster, DoorLock::Attributes::EnableLocalProgramming::Id,
3187
+ ATTRIBUTE_FLAG_WRITABLE, esp_matter_bool (value));
3188
+ }
3189
+
3190
+ attribute_t *create_enable_one_touch_locking (cluster_t *cluster, bool value)
3191
+ {
3192
+ return esp_matter::attribute::create (cluster, DoorLock::Attributes::EnableOneTouchLocking::Id,
3193
+ ATTRIBUTE_FLAG_WRITABLE, esp_matter_bool (value));
3194
+ }
3195
+
3196
+ attribute_t *create_enable_inside_status_led (cluster_t *cluster, bool value)
3197
+ {
3198
+ return esp_matter::attribute::create (cluster, DoorLock::Attributes::EnableInsideStatusLED::Id,
3199
+ ATTRIBUTE_FLAG_WRITABLE, esp_matter_bool (value));
3200
+ }
3201
+
3202
+ attribute_t *create_enable_privacy_mode_button (cluster_t *cluster, bool value)
3203
+ {
3204
+ return esp_matter::attribute::create (cluster, DoorLock::Attributes::EnablePrivacyModeButton::Id,
3205
+ ATTRIBUTE_FLAG_WRITABLE, esp_matter_bool (value));
3206
+ }
3207
+
3208
+ attribute_t *create_local_programming_features (cluster_t *cluster, uint8_t value)
3209
+ {
3210
+ return esp_matter::attribute::create (cluster, DoorLock::Attributes::LocalProgrammingFeatures::Id,
3211
+ ATTRIBUTE_FLAG_WRITABLE, esp_matter_bitmap8 (value));
3212
+ }
3213
+
3214
+ attribute_t *create_wrong_code_entry_limit (cluster_t *cluster, uint8_t value)
3215
+ {
3216
+ attribute_t *attribute = esp_matter::attribute::create (cluster, DoorLock::Attributes::WrongCodeEntryLimit::Id,
3217
+ ATTRIBUTE_FLAG_WRITABLE, esp_matter_uint8 (value));
3218
+ if (!attribute) {
3219
+ ESP_LOGE (TAG, " Could not create attribute" );
3220
+ return NULL ;
3221
+ }
3222
+ esp_matter::attribute::add_bounds (attribute, esp_matter_uint8 (1 ), esp_matter_uint8 (255 ));
3223
+ return attribute;
3224
+ }
3225
+
3226
+ attribute_t *create_user_code_temporary_disable_time (cluster_t *cluster, uint8_t value)
3227
+ {
3228
+ attribute_t *attribute = esp_matter::attribute::create (cluster, DoorLock::Attributes::UserCodeTemporaryDisableTime::Id,
3229
+ ATTRIBUTE_FLAG_WRITABLE, esp_matter_uint8 (value));
3230
+ if (!attribute) {
3231
+ ESP_LOGE (TAG, " Could not create attribute" );
3232
+ return NULL ;
3233
+ }
3234
+ esp_matter::attribute::add_bounds (attribute, esp_matter_uint8 (1 ), esp_matter_uint8 (255 ));
3235
+ return attribute;
3236
+ }
3237
+
3238
+ attribute_t *create_send_pin_over_the_air (cluster_t *cluster, bool value)
3239
+ {
3240
+ return esp_matter::attribute::create (cluster, DoorLock::Attributes::SendPINOverTheAir::Id,
3241
+ ATTRIBUTE_FLAG_WRITABLE, esp_matter_bool (value));
3242
+ }
3243
+
3244
+ attribute_t *create_require_pin_for_remote_operation (cluster_t *cluster, bool value)
3245
+ {
3246
+ return esp_matter::attribute::create (cluster, DoorLock::Attributes::RequirePINforRemoteOperation::Id,
3247
+ ATTRIBUTE_FLAG_WRITABLE, esp_matter_bool (value));
3248
+ }
3249
+
3250
+ attribute_t *create_expiring_user_timeout (cluster_t *cluster, uint16_t value)
3251
+ {
3252
+ attribute_t *attribute = esp_matter::attribute::create (cluster, DoorLock::Attributes::ExpiringUserTimeout::Id,
3253
+ ATTRIBUTE_FLAG_WRITABLE, esp_matter_uint16 (value));
3254
+ if (!attribute) {
3255
+ ESP_LOGE (TAG, " Could not create attribute" );
3256
+ return NULL ;
3257
+ }
3258
+ esp_matter::attribute::add_bounds (attribute, esp_matter_uint16 (1 ), esp_matter_uint16 (2880 ));
3259
+ return attribute;
3260
+ }
3261
+
3060
3262
} /* attribute */
3061
3263
} /* door_lock */
3062
3264
0 commit comments