mirror of
https://github.com/espressif/esp-matter.git
synced 2026-04-27 19:13:13 +00:00
Merge branch 'mr/camera_data_model' into 'main'
components/esp-matter: Data model changes to add mandatory camera clusters See merge request app-frameworks/esp-matter!1319
This commit is contained in:
@@ -4733,5 +4733,193 @@ attribute_t *create_supports_dns_resolve(cluster_t *cluster, bool value)
|
||||
} /* attribute */
|
||||
} /* time_synchronization */
|
||||
|
||||
namespace camera_av_stream_management {
|
||||
namespace attribute {
|
||||
attribute_t *create_max_concurrent_encoders(cluster_t *cluster, uint8_t value)
|
||||
{
|
||||
return esp_matter::attribute::create(cluster, CameraAvStreamManagement::Attributes::MaxConcurrentEncoders::Id, ATTRIBUTE_FLAG_MANAGED_INTERNALLY, esp_matter_uint8(value));
|
||||
}
|
||||
attribute_t *create_max_encoded_pixel_rate(cluster_t *cluster, uint32_t value)
|
||||
{
|
||||
return esp_matter::attribute::create(cluster, CameraAvStreamManagement::Attributes::MaxEncodedPixelRate::Id, ATTRIBUTE_FLAG_MANAGED_INTERNALLY, esp_matter_uint32(value));
|
||||
}
|
||||
attribute_t *create_video_sensor_params(cluster_t *cluster, uint8_t *value, uint16_t length, uint16_t count)
|
||||
{
|
||||
return esp_matter::attribute::create(cluster, CameraAvStreamManagement::Attributes::VideoSensorParams::Id, ATTRIBUTE_FLAG_MANAGED_INTERNALLY, esp_matter_array(value, length, count));
|
||||
}
|
||||
attribute_t *create_night_vision_uses_infrared(cluster_t *cluster, bool value)
|
||||
{
|
||||
return esp_matter::attribute::create(cluster, CameraAvStreamManagement::Attributes::NightVisionUsesInfrared::Id, ATTRIBUTE_FLAG_MANAGED_INTERNALLY, esp_matter_bool(value));
|
||||
}
|
||||
attribute_t *create_min_viewport_resolution(cluster_t *cluster, uint8_t *value, uint16_t length, uint16_t count)
|
||||
{
|
||||
return esp_matter::attribute::create(cluster, CameraAvStreamManagement::Attributes::MinViewportResolution::Id, ATTRIBUTE_FLAG_MANAGED_INTERNALLY, esp_matter_array(value, length, count));
|
||||
}
|
||||
attribute_t *create_rate_distortion_trade_off_points(cluster_t *cluster, uint8_t *value, uint16_t length, uint16_t count)
|
||||
{
|
||||
return esp_matter::attribute::create(cluster, CameraAvStreamManagement::Attributes::RateDistortionTradeOffPoints::Id, ATTRIBUTE_FLAG_MANAGED_INTERNALLY, esp_matter_array(value, length, count));
|
||||
}
|
||||
attribute_t *create_max_content_buffer_size(cluster_t *cluster, uint32_t value)
|
||||
{
|
||||
return esp_matter::attribute::create(cluster, CameraAvStreamManagement::Attributes::MaxContentBufferSize::Id, ATTRIBUTE_FLAG_MANAGED_INTERNALLY, esp_matter_uint32(value));
|
||||
}
|
||||
attribute_t *create_microphone_capabilities(cluster_t *cluster, uint8_t *value, uint16_t length, uint16_t count)
|
||||
{
|
||||
return esp_matter::attribute::create(cluster, CameraAvStreamManagement::Attributes::MicrophoneCapabilities::Id, ATTRIBUTE_FLAG_MANAGED_INTERNALLY, esp_matter_array(value, length, count));
|
||||
}
|
||||
attribute_t *create_speaker_capabilities(cluster_t *cluster, uint8_t *value, uint16_t length, uint16_t count)
|
||||
{
|
||||
return esp_matter::attribute::create(cluster, CameraAvStreamManagement::Attributes::SpeakerCapabilities::Id, ATTRIBUTE_FLAG_MANAGED_INTERNALLY, esp_matter_array(value, length, count));
|
||||
}
|
||||
attribute_t *create_two_way_talk_support(cluster_t *cluster, uint8_t value)
|
||||
{
|
||||
return esp_matter::attribute::create(cluster, CameraAvStreamManagement::Attributes::TwoWayTalkSupport::Id, ATTRIBUTE_FLAG_MANAGED_INTERNALLY, esp_matter_enum8(value));
|
||||
}
|
||||
attribute_t *create_snapshot_capabilities(cluster_t *cluster, uint8_t *value, uint16_t length, uint16_t count)
|
||||
{
|
||||
return esp_matter::attribute::create(cluster, CameraAvStreamManagement::Attributes::SnapshotCapabilities::Id, ATTRIBUTE_FLAG_MANAGED_INTERNALLY, esp_matter_array(value, length, count));
|
||||
}
|
||||
attribute_t *create_max_network_bandwidth(cluster_t *cluster, uint32_t value)
|
||||
{
|
||||
return esp_matter::attribute::create(cluster, CameraAvStreamManagement::Attributes::MaxNetworkBandwidth::Id, ATTRIBUTE_FLAG_MANAGED_INTERNALLY, esp_matter_uint32(value));
|
||||
}
|
||||
attribute_t *create_current_frame_rate(cluster_t *cluster, uint16_t value)
|
||||
{
|
||||
return esp_matter::attribute::create(cluster, CameraAvStreamManagement::Attributes::CurrentFrameRate::Id, ATTRIBUTE_FLAG_MANAGED_INTERNALLY, esp_matter_uint16(value));
|
||||
}
|
||||
attribute_t *create_hdr_mode_enabled(cluster_t *cluster, bool value)
|
||||
{
|
||||
return esp_matter::attribute::create(cluster, CameraAvStreamManagement::Attributes::HDRModeEnabled::Id, ATTRIBUTE_FLAG_WRITABLE | ATTRIBUTE_FLAG_MANAGED_INTERNALLY | ATTRIBUTE_FLAG_NONVOLATILE, esp_matter_bool(value));
|
||||
}
|
||||
attribute_t *create_supported_stream_usages(cluster_t *cluster, uint8_t *value, uint16_t length, uint16_t count)
|
||||
{
|
||||
return esp_matter::attribute::create(cluster, CameraAvStreamManagement::Attributes::SupportedStreamUsages::Id, ATTRIBUTE_FLAG_MANAGED_INTERNALLY, esp_matter_array(value, length, count));
|
||||
}
|
||||
attribute_t *create_allocated_video_streams(cluster_t *cluster, uint8_t *value, uint16_t length, uint16_t count)
|
||||
{
|
||||
return esp_matter::attribute::create(cluster, CameraAvStreamManagement::Attributes::AllocatedVideoStreams::Id, ATTRIBUTE_FLAG_MANAGED_INTERNALLY | ATTRIBUTE_FLAG_NONVOLATILE, esp_matter_array(value, length, count));
|
||||
}
|
||||
attribute_t *create_allocated_audio_streams(cluster_t *cluster, uint8_t *value, uint16_t length, uint16_t count)
|
||||
{
|
||||
return esp_matter::attribute::create(cluster, CameraAvStreamManagement::Attributes::AllocatedAudioStreams::Id, ATTRIBUTE_FLAG_MANAGED_INTERNALLY | ATTRIBUTE_FLAG_NONVOLATILE, esp_matter_array(value, length, count));
|
||||
}
|
||||
attribute_t *create_allocated_snapshot_streams(cluster_t *cluster, uint8_t *value, uint16_t length, uint16_t count)
|
||||
{
|
||||
return esp_matter::attribute::create(cluster, CameraAvStreamManagement::Attributes::AllocatedSnapshotStreams::Id, ATTRIBUTE_FLAG_MANAGED_INTERNALLY | ATTRIBUTE_FLAG_NONVOLATILE, esp_matter_array(value, length, count));
|
||||
}
|
||||
attribute_t *create_stream_usage_priorities(cluster_t *cluster, uint8_t *value, uint16_t length, uint16_t count)
|
||||
{
|
||||
return esp_matter::attribute::create(cluster, CameraAvStreamManagement::Attributes::StreamUsagePriorities::Id, ATTRIBUTE_FLAG_MANAGED_INTERNALLY | ATTRIBUTE_FLAG_NONVOLATILE, esp_matter_array(value, length, count));
|
||||
}
|
||||
attribute_t *create_soft_recording_privacy_mode_enabled(cluster_t *cluster, bool value)
|
||||
{
|
||||
return esp_matter::attribute::create(cluster, CameraAvStreamManagement::Attributes::SoftRecordingPrivacyModeEnabled::Id, ATTRIBUTE_FLAG_WRITABLE | ATTRIBUTE_FLAG_MANAGED_INTERNALLY | ATTRIBUTE_FLAG_NONVOLATILE, esp_matter_bool(value));
|
||||
}
|
||||
attribute_t *create_soft_livestream_privacy_mode_enabled(cluster_t *cluster, bool value)
|
||||
{
|
||||
return esp_matter::attribute::create(cluster, CameraAvStreamManagement::Attributes::SoftLivestreamPrivacyModeEnabled::Id, ATTRIBUTE_FLAG_WRITABLE | ATTRIBUTE_FLAG_MANAGED_INTERNALLY | ATTRIBUTE_FLAG_NONVOLATILE, esp_matter_bool(value));
|
||||
}
|
||||
attribute_t *create_hard_privacy_mode_on(cluster_t *cluster, bool value)
|
||||
{
|
||||
return esp_matter::attribute::create(cluster, CameraAvStreamManagement::Attributes::HardPrivacyModeOn::Id, ATTRIBUTE_FLAG_MANAGED_INTERNALLY, esp_matter_bool(value));
|
||||
}
|
||||
attribute_t *create_night_vision(cluster_t *cluster, uint8_t value)
|
||||
{
|
||||
return esp_matter::attribute::create(cluster, CameraAvStreamManagement::Attributes::NightVision::Id, ATTRIBUTE_FLAG_WRITABLE | ATTRIBUTE_FLAG_MANAGED_INTERNALLY | ATTRIBUTE_FLAG_NONVOLATILE, esp_matter_enum8(value));
|
||||
}
|
||||
attribute_t *create_night_vision_illum(cluster_t *cluster, uint8_t value)
|
||||
{
|
||||
return esp_matter::attribute::create(cluster, CameraAvStreamManagement::Attributes::NightVisionIllum::Id, ATTRIBUTE_FLAG_WRITABLE | ATTRIBUTE_FLAG_MANAGED_INTERNALLY | ATTRIBUTE_FLAG_NONVOLATILE, esp_matter_enum8(value));
|
||||
}
|
||||
attribute_t *create_viewport(cluster_t *cluster, uint8_t *value, uint16_t length, uint16_t count)
|
||||
{
|
||||
return esp_matter::attribute::create(cluster, CameraAvStreamManagement::Attributes::Viewport::Id, ATTRIBUTE_FLAG_WRITABLE | ATTRIBUTE_FLAG_MANAGED_INTERNALLY | ATTRIBUTE_FLAG_NONVOLATILE, esp_matter_array(value, length, count));
|
||||
}
|
||||
attribute_t *create_speaker_muted(cluster_t *cluster, bool value)
|
||||
{
|
||||
return esp_matter::attribute::create(cluster, CameraAvStreamManagement::Attributes::SpeakerMuted::Id, ATTRIBUTE_FLAG_WRITABLE | ATTRIBUTE_FLAG_MANAGED_INTERNALLY | ATTRIBUTE_FLAG_NONVOLATILE, esp_matter_bool(value));
|
||||
}
|
||||
attribute_t *create_speaker_volume_level(cluster_t *cluster, uint8_t value)
|
||||
{
|
||||
return esp_matter::attribute::create(cluster, CameraAvStreamManagement::Attributes::SpeakerVolumeLevel::Id, ATTRIBUTE_FLAG_WRITABLE | ATTRIBUTE_FLAG_MANAGED_INTERNALLY | ATTRIBUTE_FLAG_NONVOLATILE, esp_matter_uint8(value));
|
||||
}
|
||||
attribute_t *create_speaker_max_level(cluster_t *cluster, uint8_t value)
|
||||
{
|
||||
return esp_matter::attribute::create(cluster, CameraAvStreamManagement::Attributes::SpeakerMaxLevel::Id, ATTRIBUTE_FLAG_MANAGED_INTERNALLY, esp_matter_uint8(value));
|
||||
}
|
||||
attribute_t *create_speaker_min_level(cluster_t *cluster, uint8_t value)
|
||||
{
|
||||
return esp_matter::attribute::create(cluster, CameraAvStreamManagement::Attributes::SpeakerMinLevel::Id, ATTRIBUTE_FLAG_MANAGED_INTERNALLY, esp_matter_uint8(value));
|
||||
}
|
||||
attribute_t *create_microphone_muted(cluster_t *cluster, bool value)
|
||||
{
|
||||
return esp_matter::attribute::create(cluster, CameraAvStreamManagement::Attributes::MicrophoneMuted::Id, ATTRIBUTE_FLAG_WRITABLE | ATTRIBUTE_FLAG_MANAGED_INTERNALLY | ATTRIBUTE_FLAG_NONVOLATILE, esp_matter_bool(value));
|
||||
}
|
||||
attribute_t *create_microphone_volume_level(cluster_t *cluster, uint8_t value)
|
||||
{
|
||||
return esp_matter::attribute::create(cluster, CameraAvStreamManagement::Attributes::MicrophoneVolumeLevel::Id, ATTRIBUTE_FLAG_WRITABLE | ATTRIBUTE_FLAG_MANAGED_INTERNALLY | ATTRIBUTE_FLAG_NONVOLATILE, esp_matter_uint8(value));
|
||||
}
|
||||
attribute_t *create_microphone_max_level(cluster_t *cluster, uint8_t value)
|
||||
{
|
||||
return esp_matter::attribute::create(cluster, CameraAvStreamManagement::Attributes::MicrophoneMaxLevel::Id, ATTRIBUTE_FLAG_MANAGED_INTERNALLY, esp_matter_uint8(value));
|
||||
}
|
||||
attribute_t *create_microphone_min_level(cluster_t *cluster, uint8_t value)
|
||||
{
|
||||
return esp_matter::attribute::create(cluster, CameraAvStreamManagement::Attributes::MicrophoneMinLevel::Id, ATTRIBUTE_FLAG_MANAGED_INTERNALLY, esp_matter_uint8(value));
|
||||
}
|
||||
attribute_t *create_microphone_agc_enabled(cluster_t *cluster, bool value)
|
||||
{
|
||||
return esp_matter::attribute::create(cluster, CameraAvStreamManagement::Attributes::MicrophoneAGCEnabled::Id, ATTRIBUTE_FLAG_WRITABLE | ATTRIBUTE_FLAG_MANAGED_INTERNALLY | ATTRIBUTE_FLAG_NONVOLATILE, esp_matter_bool(value));
|
||||
}
|
||||
attribute_t *create_image_rotation(cluster_t *cluster, uint16_t value)
|
||||
{
|
||||
return esp_matter::attribute::create(cluster, CameraAvStreamManagement::Attributes::ImageRotation::Id, ATTRIBUTE_FLAG_WRITABLE | ATTRIBUTE_FLAG_MANAGED_INTERNALLY | ATTRIBUTE_FLAG_NONVOLATILE, esp_matter_uint16(value));
|
||||
}
|
||||
attribute_t *create_image_flip_horizontal(cluster_t *cluster, bool value)
|
||||
{
|
||||
return esp_matter::attribute::create(cluster, CameraAvStreamManagement::Attributes::ImageFlipHorizontal::Id, ATTRIBUTE_FLAG_WRITABLE | ATTRIBUTE_FLAG_MANAGED_INTERNALLY | ATTRIBUTE_FLAG_NONVOLATILE, esp_matter_bool(value));
|
||||
}
|
||||
attribute_t *create_image_flip_vertical(cluster_t *cluster, bool value)
|
||||
{
|
||||
return esp_matter::attribute::create(cluster, CameraAvStreamManagement::Attributes::ImageFlipVertical::Id, ATTRIBUTE_FLAG_WRITABLE | ATTRIBUTE_FLAG_MANAGED_INTERNALLY | ATTRIBUTE_FLAG_NONVOLATILE, esp_matter_bool(value));
|
||||
}
|
||||
attribute_t *create_local_video_recording_enabled(cluster_t *cluster, bool value)
|
||||
{
|
||||
return esp_matter::attribute::create(cluster, CameraAvStreamManagement::Attributes::LocalVideoRecordingEnabled::Id, ATTRIBUTE_FLAG_WRITABLE | ATTRIBUTE_FLAG_MANAGED_INTERNALLY | ATTRIBUTE_FLAG_NONVOLATILE, esp_matter_bool(value));
|
||||
}
|
||||
attribute_t *create_local_snapshot_recording_enabled(cluster_t *cluster, bool value)
|
||||
{
|
||||
return esp_matter::attribute::create(cluster, CameraAvStreamManagement::Attributes::LocalSnapshotRecordingEnabled::Id, ATTRIBUTE_FLAG_WRITABLE | ATTRIBUTE_FLAG_MANAGED_INTERNALLY | ATTRIBUTE_FLAG_NONVOLATILE, esp_matter_bool(value));
|
||||
}
|
||||
attribute_t *create_status_light_enabled(cluster_t *cluster, bool value)
|
||||
{
|
||||
return esp_matter::attribute::create(cluster, CameraAvStreamManagement::Attributes::StatusLightEnabled::Id, ATTRIBUTE_FLAG_WRITABLE | ATTRIBUTE_FLAG_MANAGED_INTERNALLY | ATTRIBUTE_FLAG_NONVOLATILE, esp_matter_bool(value));
|
||||
}
|
||||
attribute_t *create_status_light_brightness(cluster_t *cluster, uint8_t value)
|
||||
{
|
||||
return esp_matter::attribute::create(cluster, CameraAvStreamManagement::Attributes::StatusLightBrightness::Id, ATTRIBUTE_FLAG_WRITABLE | ATTRIBUTE_FLAG_MANAGED_INTERNALLY | ATTRIBUTE_FLAG_NONVOLATILE, esp_matter_uint8(value));
|
||||
}
|
||||
} /* attribute */
|
||||
} /*Camera Av Stream management*/
|
||||
|
||||
namespace webrtc_transport_provider {
|
||||
namespace attribute {
|
||||
attribute_t *create_current_sessions(cluster_t *cluster, uint8_t *value, uint16_t length, uint16_t count)
|
||||
{
|
||||
return esp_matter::attribute::create(cluster, WebRTCTransportProvider::Attributes::CurrentSessions::Id, ATTRIBUTE_FLAG_MANAGED_INTERNALLY, esp_matter_array(value, length, count));
|
||||
}
|
||||
} /* attribute */
|
||||
}/*webrtc transport provider*/
|
||||
|
||||
namespace webrtc_transport_requestor {
|
||||
namespace attribute {
|
||||
attribute_t *create_current_sessions(cluster_t *cluster, uint8_t *value, uint16_t length, uint16_t count)
|
||||
{
|
||||
return esp_matter::attribute::create(cluster, WebRTCTransportRequestor::Attributes::CurrentSessions::Id, ATTRIBUTE_FLAG_MANAGED_INTERNALLY, esp_matter_array(value, length, count));
|
||||
}
|
||||
} /* attribute */
|
||||
}/*webrtc transport requestor*/
|
||||
|
||||
|
||||
} /* cluster */
|
||||
} /* esp_matter */
|
||||
|
||||
@@ -1209,5 +1209,66 @@ attribute_t *create_supports_dns_resolve(cluster_t *cluster, bool value);
|
||||
} /* attribute */
|
||||
} /* time_synchronization */
|
||||
|
||||
namespace camera_av_stream_management {
|
||||
namespace attribute {
|
||||
attribute_t *create_max_concurrent_encoders(cluster_t *cluster, uint8_t value);
|
||||
attribute_t *create_max_encoded_pixel_rate(cluster_t *cluster, uint32_t value);
|
||||
attribute_t *create_video_sensor_params(cluster_t *cluster, uint8_t * value, uint16_t length, uint16_t count);
|
||||
attribute_t *create_night_vision_uses_infrared(cluster_t *cluster, bool value);
|
||||
attribute_t *create_min_viewport_resolution(cluster_t *cluster, uint8_t * value, uint16_t length, uint16_t count);
|
||||
attribute_t *create_rate_distortion_trade_off_points(cluster_t *cluster, uint8_t * value, uint16_t length, uint16_t count);
|
||||
attribute_t *create_max_content_buffer_size(cluster_t *cluster, uint32_t value);
|
||||
attribute_t *create_microphone_capabilities(cluster_t *cluster, uint8_t * value, uint16_t length, uint16_t count);
|
||||
attribute_t *create_speaker_capabilities(cluster_t *cluster, uint8_t * value, uint16_t length, uint16_t count);
|
||||
attribute_t *create_two_way_talk_support(cluster_t *cluster, uint8_t value);
|
||||
attribute_t *create_snapshot_capabilities(cluster_t *cluster, uint8_t * value, uint16_t length, uint16_t count);
|
||||
attribute_t *create_max_network_bandwidth(cluster_t *cluster, uint32_t value);
|
||||
attribute_t *create_current_frame_rate(cluster_t *cluster, uint16_t value);
|
||||
attribute_t *create_hdr_mode_enabled(cluster_t *cluster, bool value);
|
||||
attribute_t *create_supported_stream_usages(cluster_t *cluster, uint8_t * value, uint16_t length, uint16_t count);
|
||||
attribute_t *create_allocated_video_streams(cluster_t *cluster, uint8_t * value, uint16_t length, uint16_t count);
|
||||
attribute_t *create_allocated_audio_streams(cluster_t *cluster, uint8_t * value, uint16_t length, uint16_t count);
|
||||
attribute_t *create_allocated_snapshot_streams(cluster_t *cluster, uint8_t * value, uint16_t length, uint16_t count);
|
||||
attribute_t *create_stream_usage_priorities(cluster_t *cluster, uint8_t * value, uint16_t length, uint16_t count);
|
||||
attribute_t *create_soft_recording_privacy_mode_enabled(cluster_t *cluster, bool value);
|
||||
attribute_t *create_soft_livestream_privacy_mode_enabled(cluster_t *cluster, bool value);
|
||||
attribute_t *create_hard_privacy_mode_on(cluster_t *cluster, bool value);
|
||||
attribute_t *create_night_vision(cluster_t *cluster, uint8_t value);
|
||||
attribute_t *create_night_vision_illum(cluster_t *cluster, uint8_t value);
|
||||
attribute_t *create_viewport(cluster_t *cluster, uint8_t * value, uint16_t length, uint16_t count);
|
||||
attribute_t *create_speaker_muted(cluster_t *cluster, bool value);
|
||||
attribute_t *create_speaker_volume_level(cluster_t *cluster, uint8_t value);
|
||||
attribute_t *create_speaker_max_level(cluster_t *cluster, uint8_t value);
|
||||
attribute_t *create_speaker_min_level(cluster_t *cluster, uint8_t value);
|
||||
attribute_t *create_microphone_muted(cluster_t *cluster, bool value);
|
||||
attribute_t *create_microphone_volume_level(cluster_t *cluster, uint8_t value);
|
||||
attribute_t *create_microphone_max_level(cluster_t *cluster, uint8_t value);
|
||||
attribute_t *create_microphone_min_level(cluster_t *cluster, uint8_t value);
|
||||
attribute_t *create_microphone_agc_enabled(cluster_t *cluster, bool value);
|
||||
attribute_t *create_image_rotation(cluster_t *cluster, uint16_t value);
|
||||
attribute_t *create_image_flip_horizontal(cluster_t *cluster, bool value);
|
||||
attribute_t *create_image_flip_vertical(cluster_t *cluster, bool value);
|
||||
attribute_t *create_local_video_recording_enabled(cluster_t *cluster, bool value);
|
||||
attribute_t *create_local_snapshot_recording_enabled(cluster_t *cluster, bool value);
|
||||
attribute_t *create_status_light_enabled(cluster_t *cluster, bool value);
|
||||
attribute_t *create_status_light_brightness(cluster_t *cluster, uint8_t value);
|
||||
|
||||
} /* attribute */
|
||||
} /*camera av stream management*/
|
||||
|
||||
namespace webrtc_transport_provider {
|
||||
namespace attribute {
|
||||
attribute_t *create_current_sessions(cluster_t *cluster, uint8_t * value, uint16_t length, uint16_t count);
|
||||
|
||||
} /* attribute */
|
||||
}/*webrtc transport provider*/
|
||||
|
||||
namespace webrtc_transport_requestor {
|
||||
namespace attribute {
|
||||
attribute_t *create_current_sessions(cluster_t *cluster, uint8_t * value, uint16_t length, uint16_t count);
|
||||
|
||||
} /* attribute */
|
||||
}/*webrtc transport requestor*/
|
||||
|
||||
} /* cluster */
|
||||
} /* esp_matter */
|
||||
|
||||
@@ -3810,6 +3810,174 @@ cluster_t *create(endpoint_t *endpoint, config_t *config, uint8_t flags)
|
||||
}
|
||||
} /* ecosystem_information */
|
||||
|
||||
namespace camera_av_stream_management {
|
||||
|
||||
const function_generic_t *function_list = NULL;
|
||||
|
||||
const int function_flags = CLUSTER_FLAG_NONE;
|
||||
|
||||
cluster_t *create(endpoint_t *endpoint, config_t *config, uint8_t flags)
|
||||
{
|
||||
cluster_t *cluster = esp_matter::cluster::create(endpoint, CameraAvStreamManagement::Id, flags);
|
||||
VerifyOrReturnValue(cluster, NULL, ESP_LOGE(TAG, "Could not create cluster. cluster_id: 0x%08" PRIX32, CameraAvStreamManagement::Id));
|
||||
if (flags & CLUSTER_FLAG_SERVER) {
|
||||
// The server creation api is complex and cannot be called directly from esp_matter_delegate_callbacks.cpp
|
||||
// if (config->delegate != nullptr) {
|
||||
// static const auto delegate_init_cb = CameraAvStreamManagementDelegateInitCB;
|
||||
// set_delegate_and_init_callback(cluster, delegate_init_cb, config->delegate);
|
||||
// }
|
||||
static const auto plugin_server_init_cb = CALL_ONCE(MatterCameraAvStreamManagementPluginServerInitCallback);
|
||||
set_plugin_server_init_callback(cluster, plugin_server_init_cb);
|
||||
add_function_list(cluster, function_list, function_flags);
|
||||
|
||||
VerifyOrReturnValue(config != NULL, ABORT_CLUSTER_CREATE(cluster));
|
||||
/* Attributes managed internally */
|
||||
global::attribute::create_feature_map(cluster, config->feature_flags);
|
||||
|
||||
/* Attributes not managed internally */
|
||||
global::attribute::create_cluster_revision(cluster, 1);
|
||||
|
||||
attribute::create_max_content_buffer_size(cluster, config->max_content_buffer_size);
|
||||
attribute::create_max_network_bandwidth(cluster, config->max_network_bandwidth);
|
||||
attribute::create_supported_stream_usages(cluster, NULL, 0, 0);
|
||||
attribute::create_stream_usage_priorities(cluster, NULL, 0, 0);
|
||||
|
||||
|
||||
// check against at least one feature conformance
|
||||
VALIDATE_FEATURES_AT_LEAST_ONE("Audio,Video,Snapshot",
|
||||
feature::audio::get_id(), feature::video::get_id(), feature::snapshot::get_id());
|
||||
if (has(feature::audio::get_id())) {
|
||||
VerifyOrReturnValue(feature::audio::add(cluster) == ESP_OK, ABORT_CLUSTER_CREATE(cluster));
|
||||
if (has(feature::speaker::get_id())) {
|
||||
VerifyOrReturnValue(feature::speaker::add(cluster) == ESP_OK, ABORT_CLUSTER_CREATE(cluster));
|
||||
}
|
||||
}
|
||||
if (has(feature::video::get_id())) {
|
||||
VerifyOrReturnValue(feature::video::add(cluster) == ESP_OK, ABORT_CLUSTER_CREATE(cluster));
|
||||
}
|
||||
if (has(feature::snapshot::get_id())) {
|
||||
VerifyOrReturnValue(feature::snapshot::add(cluster) == ESP_OK, ABORT_CLUSTER_CREATE(cluster));
|
||||
}
|
||||
// Add features based on feature map
|
||||
if (has(feature::local_storage::get_id())) {
|
||||
VerifyOrReturnValue(feature::local_storage::add(cluster) == ESP_OK, ABORT_CLUSTER_CREATE(cluster));
|
||||
}
|
||||
|
||||
if (has(feature::video::get_id())|| has(feature::snapshot::get_id())) {
|
||||
if (has(feature::image_control::get_id())) {
|
||||
VerifyOrReturnValue(feature::image_control::add(cluster) == ESP_OK, ABORT_CLUSTER_CREATE(cluster));
|
||||
}
|
||||
if (has(feature::watermark::get_id())) {
|
||||
VerifyOrReturnValue(feature::watermark::add(cluster) == ESP_OK, ABORT_CLUSTER_CREATE(cluster));
|
||||
}
|
||||
if (has(feature::on_screen_display::get_id())) {
|
||||
VerifyOrReturnValue(feature::on_screen_display::add(cluster) == ESP_OK, ABORT_CLUSTER_CREATE(cluster));
|
||||
}
|
||||
if (has(feature::high_dynamic_range::get_id())) {
|
||||
VerifyOrReturnValue(feature::high_dynamic_range::add(cluster) == ESP_OK, ABORT_CLUSTER_CREATE(cluster));
|
||||
}
|
||||
if (has(feature::night_vision::get_id())) {
|
||||
VerifyOrReturnValue(feature::night_vision::add(cluster) == ESP_OK, ABORT_CLUSTER_CREATE(cluster));
|
||||
}
|
||||
}
|
||||
if (has(feature::privacy::get_id())) {
|
||||
VerifyOrReturnValue(feature::privacy::add(cluster) == ESP_OK, ABORT_CLUSTER_CREATE(cluster));
|
||||
}
|
||||
command::create_set_stream_priorities(cluster);
|
||||
|
||||
}
|
||||
|
||||
if (flags & CLUSTER_FLAG_CLIENT) {
|
||||
create_default_binding_cluster(endpoint);
|
||||
}
|
||||
return cluster;
|
||||
}
|
||||
} /*camera av stream management*/
|
||||
|
||||
namespace webrtc_transport_provider {
|
||||
const function_generic_t *function_list = NULL;
|
||||
|
||||
const int function_flags = CLUSTER_FLAG_NONE;
|
||||
|
||||
cluster_t *create(endpoint_t *endpoint, config_t *config, uint8_t flags)
|
||||
{
|
||||
cluster_t *cluster = esp_matter::cluster::create(endpoint, WebRTCTransportProvider::Id, flags);
|
||||
VerifyOrReturnValue(cluster, NULL, ESP_LOGE(TAG, "Could not create cluster. cluster_id: 0x%08" PRIX32, WebRTCTransportProvider::Id));
|
||||
if (flags & CLUSTER_FLAG_SERVER) {
|
||||
// The server creation api is complex and cannot be called directly from esp_matter_delegate_callbacks.cpp
|
||||
// if (config->delegate != nullptr) {
|
||||
// static const auto delegate_init_cb = WebrtcTransportProviderDelegateInitCB;
|
||||
// set_delegate_and_init_callback(cluster, delegate_init_cb, config->delegate);
|
||||
// }
|
||||
add_function_list(cluster, function_list, function_flags);
|
||||
|
||||
/* Attributes managed internally */
|
||||
global::attribute::create_feature_map(cluster, 0);
|
||||
|
||||
/* Attributes not managed internally */
|
||||
global::attribute::create_cluster_revision(cluster, 1);
|
||||
|
||||
attribute::create_current_sessions(cluster, NULL, 0, 0);
|
||||
|
||||
|
||||
command::create_solicit_offer(cluster);
|
||||
command::create_solicit_offer_response(cluster);
|
||||
command::create_provide_offer(cluster);
|
||||
command::create_provide_offer_response(cluster);
|
||||
command::create_provide_answer(cluster);
|
||||
command::create_provide_ice_candidates(cluster);
|
||||
command::create_end_session(cluster);
|
||||
|
||||
}
|
||||
|
||||
if (flags & CLUSTER_FLAG_CLIENT) {
|
||||
create_default_binding_cluster(endpoint);
|
||||
}
|
||||
return cluster;
|
||||
}
|
||||
} /*webrtc transport provider*/
|
||||
|
||||
namespace webrtc_transport_requestor {
|
||||
const function_generic_t *function_list = NULL;
|
||||
|
||||
const int function_flags = CLUSTER_FLAG_NONE;
|
||||
|
||||
cluster_t *create(endpoint_t *endpoint, config_t *config, uint8_t flags)
|
||||
{
|
||||
cluster_t *cluster = esp_matter::cluster::create(endpoint, WebRTCTransportRequestor::Id, flags);
|
||||
VerifyOrReturnValue(cluster, NULL, ESP_LOGE(TAG, "Could not create cluster. cluster_id: 0x%08" PRIX32, WebRTCTransportRequestor::Id));
|
||||
if (flags & CLUSTER_FLAG_SERVER) {
|
||||
// The server creation api is complex and cannot be called directly from esp_matter_delegate_callbacks.cpp
|
||||
// if (config->delegate != nullptr) {
|
||||
// static const auto delegate_init_cb = WebrtcTransportRequestorDelegateInitCB;
|
||||
// set_delegate_and_init_callback(cluster, delegate_init_cb, config->delegate);
|
||||
// }
|
||||
add_function_list(cluster, function_list, function_flags);
|
||||
|
||||
/* Attributes managed internally */
|
||||
global::attribute::create_feature_map(cluster, 0);
|
||||
|
||||
/* Attributes not managed internally */
|
||||
global::attribute::create_cluster_revision(cluster, 1);
|
||||
|
||||
attribute::create_current_sessions(cluster, NULL, 0, 0);
|
||||
|
||||
|
||||
command::create_offer(cluster);
|
||||
command::create_answer(cluster);
|
||||
command::create_ice_candidates(cluster);
|
||||
command::create_end(cluster);
|
||||
|
||||
}
|
||||
|
||||
if (flags & CLUSTER_FLAG_CLIENT) {
|
||||
create_default_binding_cluster(endpoint);
|
||||
}
|
||||
return cluster;
|
||||
}
|
||||
} /*webrtc transport requestor*/
|
||||
|
||||
|
||||
// namespace binary_input_basic {
|
||||
// // ToDo
|
||||
// } /* binary_input_basic */
|
||||
|
||||
@@ -802,7 +802,7 @@ namespace power_topology {
|
||||
typedef struct config {
|
||||
uint32_t feature_flags;
|
||||
void *delegate;
|
||||
config() : feature_flags(0), delegate(nullptr) {}
|
||||
config() : feature_flags(0), delegate(nullptr) {}
|
||||
} config_t;
|
||||
|
||||
cluster_t *create(endpoint_t *endpoint, config_t *config, uint8_t flags);
|
||||
@@ -967,5 +967,36 @@ using config_t = common::config_t;
|
||||
cluster_t *create(endpoint_t *endpoint, config_t *config, uint8_t flags);
|
||||
} /* ecosystem_information */
|
||||
|
||||
namespace camera_av_stream_management {
|
||||
typedef struct config {
|
||||
uint32_t max_content_buffer_size;
|
||||
uint32_t max_network_bandwidth;
|
||||
void* delegate;
|
||||
uint32_t feature_flags;
|
||||
config() : max_content_buffer_size(0), max_network_bandwidth(0), feature_flags(0) {}
|
||||
} config_t;
|
||||
|
||||
cluster_t *create(endpoint_t *endpoint, config_t *config, uint8_t flags);
|
||||
}/*camera av stream management*/
|
||||
|
||||
namespace webrtc_transport_provider {
|
||||
typedef struct config {
|
||||
void* delegate;
|
||||
config() {}
|
||||
} config_t;
|
||||
|
||||
cluster_t *create(endpoint_t *endpoint, config_t *config, uint8_t flags);
|
||||
}/*webrtc transport provider*/
|
||||
|
||||
namespace webrtc_transport_requestor {
|
||||
typedef struct config {
|
||||
void* delegate;
|
||||
config() {}
|
||||
} config_t;
|
||||
|
||||
cluster_t *create(endpoint_t *endpoint, config_t *config, uint8_t flags);
|
||||
}/*webrtc transport requestor*/
|
||||
|
||||
|
||||
} /* cluster */
|
||||
} /* esp_matter */
|
||||
|
||||
@@ -2855,5 +2855,152 @@ command_t *create_set_default_ntp(cluster_t *cluster)
|
||||
} /* command */
|
||||
} /* time_synchronization */
|
||||
|
||||
namespace camera_av_stream_management {
|
||||
namespace command {
|
||||
|
||||
command_t *create_audio_stream_allocate(cluster_t *cluster)
|
||||
{
|
||||
return esp_matter::command::create(cluster, CameraAvStreamManagement::Commands::AudioStreamAllocate::Id, COMMAND_FLAG_ACCEPTED, NULL);
|
||||
}
|
||||
|
||||
command_t *create_audio_stream_allocate_response(cluster_t *cluster)
|
||||
{
|
||||
return esp_matter::command::create(cluster, CameraAvStreamManagement::Commands::AudioStreamAllocateResponse::Id, COMMAND_FLAG_GENERATED, NULL);
|
||||
}
|
||||
|
||||
command_t *create_audio_stream_deallocate(cluster_t *cluster)
|
||||
{
|
||||
return esp_matter::command::create(cluster, CameraAvStreamManagement::Commands::AudioStreamDeallocate::Id, COMMAND_FLAG_ACCEPTED, NULL);
|
||||
}
|
||||
|
||||
command_t *create_video_stream_allocate(cluster_t *cluster)
|
||||
{
|
||||
return esp_matter::command::create(cluster, CameraAvStreamManagement::Commands::VideoStreamAllocate::Id, COMMAND_FLAG_ACCEPTED, NULL);
|
||||
}
|
||||
|
||||
command_t *create_video_stream_allocate_response(cluster_t *cluster)
|
||||
{
|
||||
return esp_matter::command::create(cluster, CameraAvStreamManagement::Commands::VideoStreamAllocateResponse::Id, COMMAND_FLAG_GENERATED, NULL);
|
||||
}
|
||||
|
||||
command_t *create_video_stream_modify(cluster_t *cluster)
|
||||
{
|
||||
return esp_matter::command::create(cluster, CameraAvStreamManagement::Commands::VideoStreamModify::Id, COMMAND_FLAG_ACCEPTED, NULL);
|
||||
}
|
||||
|
||||
command_t *create_video_stream_deallocate(cluster_t *cluster)
|
||||
{
|
||||
return esp_matter::command::create(cluster, CameraAvStreamManagement::Commands::VideoStreamDeallocate::Id, COMMAND_FLAG_ACCEPTED, NULL);
|
||||
}
|
||||
|
||||
command_t *create_snapshot_stream_allocate(cluster_t *cluster)
|
||||
|
||||
{
|
||||
return esp_matter::command::create(cluster, CameraAvStreamManagement::Commands::SnapshotStreamAllocate::Id, COMMAND_FLAG_ACCEPTED, NULL);
|
||||
}
|
||||
|
||||
command_t *create_snapshot_stream_allocate_response(cluster_t *cluster)
|
||||
{
|
||||
return esp_matter::command::create(cluster, CameraAvStreamManagement::Commands::SnapshotStreamAllocateResponse::Id, COMMAND_FLAG_GENERATED, NULL);
|
||||
}
|
||||
|
||||
command_t *create_snapshot_stream_modify(cluster_t *cluster)
|
||||
{
|
||||
return esp_matter::command::create(cluster, CameraAvStreamManagement::Commands::SnapshotStreamModify::Id, COMMAND_FLAG_ACCEPTED, NULL);
|
||||
}
|
||||
|
||||
command_t *create_snapshot_stream_deallocate(cluster_t *cluster)
|
||||
{
|
||||
return esp_matter::command::create(cluster, CameraAvStreamManagement::Commands::SnapshotStreamDeallocate::Id, COMMAND_FLAG_ACCEPTED, NULL);
|
||||
}
|
||||
|
||||
command_t *create_set_stream_priorities(cluster_t *cluster)
|
||||
{
|
||||
return esp_matter::command::create(cluster, CameraAvStreamManagement::Commands::SetStreamPriorities::Id, COMMAND_FLAG_ACCEPTED, NULL);
|
||||
}
|
||||
|
||||
command_t *create_capture_snapshot(cluster_t *cluster)
|
||||
{
|
||||
return esp_matter::command::create(cluster, CameraAvStreamManagement::Commands::CaptureSnapshot::Id, COMMAND_FLAG_ACCEPTED, NULL);
|
||||
}
|
||||
|
||||
command_t *create_capture_snapshot_response(cluster_t *cluster)
|
||||
{
|
||||
return esp_matter::command::create(cluster, CameraAvStreamManagement::Commands::CaptureSnapshotResponse::Id, COMMAND_FLAG_GENERATED, NULL);
|
||||
}
|
||||
|
||||
} /* command */
|
||||
} /*camera av stream management*/
|
||||
|
||||
|
||||
|
||||
namespace webrtc_transport_provider {
|
||||
namespace command {
|
||||
|
||||
command_t *create_solicit_offer(cluster_t *cluster)
|
||||
{
|
||||
return esp_matter::command::create(cluster, WebRTCTransportProvider::Commands::SolicitOffer::Id, COMMAND_FLAG_ACCEPTED, NULL);
|
||||
}
|
||||
|
||||
command_t *create_solicit_offer_response(cluster_t *cluster)
|
||||
{
|
||||
return esp_matter::command::create(cluster, WebRTCTransportProvider::Commands::SolicitOfferResponse::Id, COMMAND_FLAG_GENERATED, NULL);
|
||||
}
|
||||
|
||||
command_t *create_provide_offer(cluster_t *cluster)
|
||||
{
|
||||
return esp_matter::command::create(cluster, WebRTCTransportProvider::Commands::ProvideOffer::Id, COMMAND_FLAG_ACCEPTED, NULL);
|
||||
}
|
||||
|
||||
command_t *create_provide_offer_response(cluster_t *cluster)
|
||||
{
|
||||
return esp_matter::command::create(cluster, WebRTCTransportProvider::Commands::ProvideOfferResponse::Id, COMMAND_FLAG_GENERATED, NULL);
|
||||
}
|
||||
|
||||
command_t *create_provide_answer(cluster_t *cluster)
|
||||
{
|
||||
return esp_matter::command::create(cluster, WebRTCTransportProvider::Commands::ProvideAnswer::Id, COMMAND_FLAG_ACCEPTED, NULL);
|
||||
}
|
||||
|
||||
command_t *create_provide_ice_candidates(cluster_t *cluster)
|
||||
{
|
||||
return esp_matter::command::create(cluster, WebRTCTransportProvider::Commands::ProvideICECandidates::Id, COMMAND_FLAG_ACCEPTED,NULL);
|
||||
}
|
||||
|
||||
command_t *create_end_session(cluster_t *cluster)
|
||||
{
|
||||
return esp_matter::command::create(cluster, WebRTCTransportProvider::Commands::EndSession::Id, COMMAND_FLAG_ACCEPTED, NULL);
|
||||
}
|
||||
|
||||
} /* command */
|
||||
}/*webrtc_transport_provider*/
|
||||
|
||||
namespace webrtc_transport_requestor {
|
||||
namespace command {
|
||||
|
||||
command_t *create_offer(cluster_t *cluster)
|
||||
{
|
||||
return esp_matter::command::create(cluster, WebRTCTransportRequestor::Commands::Offer::Id, COMMAND_FLAG_ACCEPTED, NULL);
|
||||
}
|
||||
|
||||
command_t *create_answer(cluster_t *cluster)
|
||||
{
|
||||
return esp_matter::command::create(cluster, WebRTCTransportRequestor::Commands::Answer::Id, COMMAND_FLAG_ACCEPTED, NULL);
|
||||
}
|
||||
|
||||
command_t *create_ice_candidates(cluster_t *cluster)
|
||||
{
|
||||
return esp_matter::command::create(cluster, WebRTCTransportRequestor::Commands::ICECandidates::Id, COMMAND_FLAG_ACCEPTED, NULL);
|
||||
}
|
||||
|
||||
command_t *create_end(cluster_t *cluster)
|
||||
{
|
||||
return esp_matter::command::create(cluster, WebRTCTransportRequestor::Commands::End::Id, COMMAND_FLAG_ACCEPTED, NULL);
|
||||
}
|
||||
|
||||
} /* command */
|
||||
}/*webrtc_transport_requestor*/
|
||||
|
||||
|
||||
} /* cluster */
|
||||
} /* esp_matter */
|
||||
|
||||
@@ -505,5 +505,46 @@ command_t *create_set_default_ntp(cluster_t *cluster);
|
||||
} /* command */
|
||||
} /* time_synchronization */
|
||||
|
||||
namespace camera_av_stream_management {
|
||||
namespace command {
|
||||
command_t *create_audio_stream_allocate(cluster_t *cluster);
|
||||
command_t *create_audio_stream_allocate_response(cluster_t *cluster);
|
||||
command_t *create_audio_stream_deallocate(cluster_t *cluster);
|
||||
command_t *create_video_stream_allocate(cluster_t *cluster);
|
||||
command_t *create_video_stream_allocate_response(cluster_t *cluster);
|
||||
command_t *create_video_stream_modify(cluster_t *cluster);
|
||||
command_t *create_video_stream_deallocate(cluster_t *cluster);
|
||||
command_t *create_snapshot_stream_allocate(cluster_t *cluster);
|
||||
command_t *create_snapshot_stream_allocate_response(cluster_t *cluster);
|
||||
command_t *create_snapshot_stream_modify(cluster_t *cluster);
|
||||
command_t *create_snapshot_stream_deallocate(cluster_t *cluster);
|
||||
command_t *create_set_stream_priorities(cluster_t *cluster);
|
||||
command_t *create_capture_snapshot(cluster_t *cluster);
|
||||
command_t *create_capture_snapshot_response(cluster_t *cluster);
|
||||
} /* command */
|
||||
} /*camera av stream transport*/
|
||||
|
||||
namespace webrtc_transport_provider {
|
||||
namespace command {
|
||||
command_t *create_solicit_offer(cluster_t *cluster);
|
||||
command_t *create_solicit_offer_response(cluster_t *cluster);
|
||||
command_t *create_provide_offer(cluster_t *cluster);
|
||||
command_t *create_provide_offer_response(cluster_t *cluster);
|
||||
command_t *create_provide_answer(cluster_t *cluster);
|
||||
command_t *create_provide_ice_candidates(cluster_t *cluster);
|
||||
command_t *create_end_session(cluster_t *cluster);
|
||||
} /* command */
|
||||
}/*webrtc transport provider*/
|
||||
|
||||
namespace webrtc_transport_requestor {
|
||||
namespace command {
|
||||
command_t *create_offer(cluster_t *cluster);
|
||||
command_t *create_answer(cluster_t *cluster);
|
||||
command_t *create_ice_candidates(cluster_t *cluster);
|
||||
command_t *create_end(cluster_t *cluster);
|
||||
} /* command */
|
||||
}/*webrtc transport requestor*/
|
||||
|
||||
|
||||
} /* cluster */
|
||||
} /* esp_matter */
|
||||
|
||||
@@ -2009,6 +2009,51 @@ esp_err_t add(endpoint_t *endpoint, config_t *config)
|
||||
}
|
||||
} /* heat_pump */
|
||||
|
||||
namespace camera {
|
||||
|
||||
uint32_t get_device_type_id()
|
||||
{
|
||||
return ESP_MATTER_CAMERA_DEVICE_TYPE_ID;
|
||||
}
|
||||
|
||||
uint8_t get_device_type_version()
|
||||
{
|
||||
return ESP_MATTER_CAMERA_DEVICE_TYPE_VERSION;
|
||||
}
|
||||
|
||||
endpoint_t *create(node_t *node, config_t *config, uint8_t flags, void *priv_data)
|
||||
{
|
||||
return common::create<config_t>(node, config, flags, priv_data, add);
|
||||
}
|
||||
|
||||
esp_err_t add(endpoint_t *endpoint, config_t *config)
|
||||
{
|
||||
esp_err_t err = esp_matter::endpoint::add_device_type(endpoint, get_device_type_id(), get_device_type_version());
|
||||
VerifyOrReturnError(err == ESP_OK, err);
|
||||
cluster_t *camera_av_stream_management_cluster = cluster::camera_av_stream_management::create(
|
||||
endpoint,
|
||||
&(config->camera_av_stream_management),
|
||||
CLUSTER_FLAG_SERVER
|
||||
);
|
||||
camera_av_stream_management::feature::video::add(camera_av_stream_management_cluster);
|
||||
camera_av_stream_management::feature::audio::add(camera_av_stream_management_cluster);
|
||||
camera_av_stream_management::feature::snapshot::add(camera_av_stream_management_cluster);
|
||||
cluster::webrtc_transport_provider::create(
|
||||
endpoint,
|
||||
&(config->webrtc_transport_provider),
|
||||
CLUSTER_FLAG_SERVER
|
||||
);
|
||||
cluster::webrtc_transport_requestor::create(
|
||||
endpoint,
|
||||
&(config->webrtc_transport_requestor),
|
||||
CLUSTER_FLAG_CLIENT
|
||||
);
|
||||
return ESP_OK;
|
||||
}
|
||||
|
||||
} /* camera */
|
||||
|
||||
|
||||
namespace thermostat_controller {
|
||||
uint32_t get_device_type_id()
|
||||
{
|
||||
|
||||
@@ -21,7 +21,7 @@
|
||||
|
||||
/* Replace these with IDs from submodule whenever they are implemented */
|
||||
#define ESP_MATTER_ROOT_NODE_DEVICE_TYPE_ID 0x0016
|
||||
#define ESP_MATTER_ROOT_NODE_DEVICE_TYPE_VERSION 3
|
||||
#define ESP_MATTER_ROOT_NODE_DEVICE_TYPE_VERSION 4
|
||||
#define ESP_MATTER_OTA_REQUESTOR_DEVICE_TYPE_ID 0x0012
|
||||
#define ESP_MATTER_OTA_REQUESTOR_DEVICE_TYPE_VERSION 1
|
||||
#define ESP_MATTER_OTA_PROVIDER_DEVICE_TYPE_ID 0x0014
|
||||
@@ -151,6 +151,9 @@
|
||||
#define ESP_MATTER_THERMOSTAT_CONTROLLER_DEVICE_TYPE_ID 0x030A
|
||||
#define ESP_MATTER_THERMOSTAT_CONTROLLER_DEVICE_TYPE_VERSION 1
|
||||
|
||||
#define ESP_MATTER_CAMERA_DEVICE_TYPE_ID 0x0142
|
||||
#define ESP_MATTER_CAMERA_DEVICE_TYPE_VERSION 1
|
||||
|
||||
namespace esp_matter {
|
||||
|
||||
/** Specific endpoint (device type) create APIs
|
||||
@@ -370,7 +373,7 @@ namespace on_off_plug_in_unit {
|
||||
typedef struct config : on_off_with_lighting_config {
|
||||
config() {
|
||||
identify.identify_type = chip::to_underlying(chip::app::Clusters::Identify::IdentifyTypeEnum::kVisibleIndicator);
|
||||
}
|
||||
}
|
||||
} config_t;
|
||||
|
||||
uint32_t get_device_type_id();
|
||||
@@ -656,7 +659,7 @@ typedef struct config : app_base_config {
|
||||
nullable<int16_t> max_pressure = nullable<int16_t>(),
|
||||
nullable<uint16_t> max_speed = nullable<uint16_t>(),
|
||||
nullable<uint16_t> max_flow = nullable<uint16_t>()
|
||||
) : pump_configuration_and_control(max_pressure, max_speed, max_flow) {
|
||||
) : pump_configuration_and_control(max_pressure, max_speed, max_flow) {
|
||||
identify.identify_type = chip::to_underlying(chip::app::Clusters::Identify::IdentifyTypeEnum::kActuator);
|
||||
}
|
||||
} config_t;
|
||||
@@ -1022,6 +1025,23 @@ endpoint_t *create(node_t *node, config_t *config, uint8_t flags, void *priv_dat
|
||||
esp_err_t add(endpoint_t *endpoint, config_t *config);
|
||||
} /** heat_pump **/
|
||||
|
||||
namespace camera {
|
||||
|
||||
typedef struct config {
|
||||
cluster::descriptor::config_t descriptor;
|
||||
cluster::camera_av_stream_management::config_t camera_av_stream_management;
|
||||
cluster::webrtc_transport_provider::config_t webrtc_transport_provider;
|
||||
cluster::webrtc_transport_requestor::config_t webrtc_transport_requestor;
|
||||
} config_t;
|
||||
|
||||
uint32_t get_device_type_id();
|
||||
uint8_t get_device_type_version();
|
||||
endpoint_t *create(node_t *node, config_t *config, uint8_t flags, void *priv_data);
|
||||
esp_err_t add(endpoint_t *endpoint, config_t *config);
|
||||
|
||||
} /* camera */
|
||||
|
||||
|
||||
namespace thermostat_controller {
|
||||
using config_t = app_client_config;
|
||||
|
||||
|
||||
@@ -3964,5 +3964,253 @@ esp_err_t add(cluster_t *cluster)
|
||||
} /* feature */
|
||||
} /* time_synchronization */
|
||||
|
||||
namespace camera_av_stream_management {
|
||||
|
||||
namespace feature {
|
||||
namespace audio {
|
||||
|
||||
uint32_t get_id()
|
||||
{
|
||||
return static_cast<uint32_t>(CameraAvStreamManagement::Feature::kAudio);
|
||||
}
|
||||
|
||||
esp_err_t add(cluster_t *cluster)
|
||||
{
|
||||
VerifyOrReturnError(cluster, ESP_ERR_INVALID_ARG);
|
||||
esp_matter::cluster::update_feature_map(cluster, get_id());
|
||||
|
||||
attribute::create_microphone_capabilities(cluster, NULL, 0, 0);
|
||||
attribute::create_allocated_audio_streams(cluster, NULL, 0, 0);
|
||||
attribute::create_microphone_muted(cluster, 0);
|
||||
attribute::create_microphone_volume_level(cluster, 0);
|
||||
attribute::create_microphone_max_level(cluster, 0);
|
||||
attribute::create_microphone_min_level(cluster, 0);
|
||||
|
||||
command::create_audio_stream_allocate(cluster);
|
||||
command::create_audio_stream_allocate_response(cluster);
|
||||
command::create_audio_stream_deallocate(cluster);
|
||||
|
||||
return ESP_OK;
|
||||
}
|
||||
|
||||
} /* audio */
|
||||
|
||||
namespace video {
|
||||
|
||||
uint32_t get_id()
|
||||
{
|
||||
return static_cast<uint32_t>(CameraAvStreamManagement::Feature::kVideo);
|
||||
}
|
||||
|
||||
esp_err_t add(cluster_t *cluster)
|
||||
{
|
||||
VerifyOrReturnError(cluster, ESP_ERR_INVALID_ARG);
|
||||
esp_matter::cluster::update_feature_map(cluster, get_id());
|
||||
attribute::create_max_concurrent_encoders(cluster, 0);
|
||||
attribute::create_max_encoded_pixel_rate(cluster, 0);
|
||||
attribute::create_video_sensor_params(cluster, NULL, 0, 0);
|
||||
attribute::create_min_viewport_resolution(cluster, NULL, 0, 0);
|
||||
attribute::create_rate_distortion_trade_off_points(cluster, NULL, 0, 0);
|
||||
attribute::create_current_frame_rate(cluster, 0);
|
||||
attribute::create_allocated_video_streams(cluster, NULL, 0, 0);
|
||||
|
||||
attribute::create_viewport(cluster, NULL, 0, 0);
|
||||
|
||||
command::create_video_stream_allocate(cluster);
|
||||
command::create_video_stream_allocate_response(cluster);
|
||||
command::create_video_stream_deallocate(cluster);
|
||||
|
||||
return ESP_OK;
|
||||
}
|
||||
|
||||
} /* video */
|
||||
|
||||
namespace snapshot {
|
||||
|
||||
uint32_t get_id()
|
||||
{
|
||||
return static_cast<uint32_t>(CameraAvStreamManagement::Feature::kSnapshot);
|
||||
}
|
||||
|
||||
esp_err_t add(cluster_t *cluster)
|
||||
{
|
||||
VerifyOrReturnError(cluster, ESP_ERR_INVALID_ARG);
|
||||
esp_matter::cluster::update_feature_map(cluster, get_id());
|
||||
|
||||
attribute::create_snapshot_capabilities(cluster, NULL, 0, 0);
|
||||
attribute::create_allocated_snapshot_streams(cluster, NULL, 0, 0);
|
||||
attribute::create_local_snapshot_recording_enabled(cluster, 0);
|
||||
|
||||
command::create_snapshot_stream_allocate(cluster);
|
||||
command::create_snapshot_stream_allocate_response(cluster);
|
||||
command::create_snapshot_stream_deallocate(cluster);
|
||||
command::create_capture_snapshot(cluster);
|
||||
command::create_capture_snapshot_response(cluster);
|
||||
|
||||
return ESP_OK;
|
||||
}
|
||||
|
||||
} /* snapshot */
|
||||
|
||||
namespace privacy {
|
||||
|
||||
uint32_t get_id()
|
||||
{
|
||||
return static_cast<uint32_t>(CameraAvStreamManagement::Feature::kPrivacy);
|
||||
}
|
||||
|
||||
esp_err_t add(cluster_t *cluster)
|
||||
{
|
||||
VerifyOrReturnError(cluster, ESP_ERR_INVALID_ARG);
|
||||
esp_matter::cluster::update_feature_map(cluster, get_id());
|
||||
attribute::create_soft_recording_privacy_mode_enabled(cluster, 0);
|
||||
attribute::create_soft_livestream_privacy_mode_enabled(cluster, 0);
|
||||
|
||||
|
||||
return ESP_OK;
|
||||
}
|
||||
|
||||
} /* privacy */
|
||||
|
||||
namespace speaker {
|
||||
|
||||
uint32_t get_id()
|
||||
{
|
||||
return static_cast<uint32_t>(CameraAvStreamManagement::Feature::kSpeaker);
|
||||
}
|
||||
|
||||
esp_err_t add(cluster_t *cluster)
|
||||
{
|
||||
VerifyOrReturnError(cluster, ESP_ERR_INVALID_ARG);
|
||||
esp_matter::cluster::update_feature_map(cluster, get_id());
|
||||
attribute::create_speaker_capabilities(cluster, NULL, 0, 0);
|
||||
attribute::create_two_way_talk_support(cluster, 0);
|
||||
attribute::create_speaker_muted(cluster, 0);
|
||||
attribute::create_speaker_volume_level(cluster, 0);
|
||||
attribute::create_speaker_max_level(cluster, 0);
|
||||
attribute::create_speaker_min_level(cluster, 0);
|
||||
|
||||
|
||||
return ESP_OK;
|
||||
}
|
||||
|
||||
} /* speaker */
|
||||
|
||||
namespace image_control {
|
||||
|
||||
uint32_t get_id()
|
||||
{
|
||||
return static_cast<uint32_t>(CameraAvStreamManagement::Feature::kImageControl);
|
||||
}
|
||||
|
||||
esp_err_t add(cluster_t *cluster)
|
||||
{
|
||||
VerifyOrReturnError(cluster, ESP_ERR_INVALID_ARG);
|
||||
esp_matter::cluster::update_feature_map(cluster, get_id());
|
||||
return ESP_OK;
|
||||
}
|
||||
|
||||
} /* image_control */
|
||||
|
||||
namespace watermark {
|
||||
|
||||
uint32_t get_id()
|
||||
{
|
||||
return static_cast<uint32_t>(CameraAvStreamManagement::Feature::kWatermark);
|
||||
}
|
||||
|
||||
esp_err_t add(cluster_t *cluster)
|
||||
{
|
||||
VerifyOrReturnError(cluster, ESP_ERR_INVALID_ARG);
|
||||
esp_matter::cluster::update_feature_map(cluster, get_id());
|
||||
command::create_video_stream_modify(cluster);
|
||||
|
||||
return ESP_OK;
|
||||
}
|
||||
|
||||
} /* watermark */
|
||||
|
||||
namespace on_screen_display {
|
||||
|
||||
uint32_t get_id()
|
||||
{
|
||||
return static_cast<uint32_t>(CameraAvStreamManagement::Feature::kOnScreenDisplay);
|
||||
}
|
||||
|
||||
esp_err_t add(cluster_t *cluster)
|
||||
{
|
||||
VerifyOrReturnError(cluster, ESP_ERR_INVALID_ARG);
|
||||
esp_matter::cluster::update_feature_map(cluster, get_id());
|
||||
command::create_video_stream_modify(cluster);
|
||||
return ESP_OK;
|
||||
}
|
||||
} /* on_screen_display */
|
||||
|
||||
namespace local_storage {
|
||||
|
||||
uint32_t get_id()
|
||||
{
|
||||
return static_cast<uint32_t>(CameraAvStreamManagement::Feature::kLocalStorage);
|
||||
}
|
||||
|
||||
esp_err_t add(cluster_t *cluster)
|
||||
{
|
||||
VerifyOrReturnError(cluster, ESP_ERR_INVALID_ARG);
|
||||
esp_matter::cluster::update_feature_map(cluster, get_id());
|
||||
attribute::create_local_video_recording_enabled(cluster, 0);
|
||||
attribute::create_local_snapshot_recording_enabled(cluster, 0);
|
||||
|
||||
|
||||
return ESP_OK;
|
||||
}
|
||||
|
||||
} /* local_storage */
|
||||
|
||||
namespace high_dynamic_range {
|
||||
|
||||
uint32_t get_id()
|
||||
{
|
||||
return static_cast<uint32_t>(CameraAvStreamManagement::Feature::kHighDynamicRange);
|
||||
}
|
||||
|
||||
esp_err_t add(cluster_t *cluster)
|
||||
{
|
||||
VerifyOrReturnError(cluster, ESP_ERR_INVALID_ARG);
|
||||
esp_matter::cluster::update_feature_map(cluster, get_id());
|
||||
attribute::create_hdr_mode_enabled(cluster, 0);
|
||||
|
||||
return ESP_OK;
|
||||
}
|
||||
} /* high_dynamic_range */
|
||||
|
||||
namespace night_vision {
|
||||
|
||||
uint32_t get_id()
|
||||
{
|
||||
return static_cast<uint32_t>(CameraAvStreamManagement::Feature::kNightVision);
|
||||
}
|
||||
|
||||
esp_err_t add(cluster_t *cluster)
|
||||
{
|
||||
VerifyOrReturnError(cluster, ESP_ERR_INVALID_ARG);
|
||||
esp_matter::cluster::update_feature_map(cluster, get_id());
|
||||
attribute::create_night_vision_uses_infrared(cluster, 0);
|
||||
attribute::create_night_vision(cluster, 0);
|
||||
|
||||
return ESP_OK;
|
||||
}
|
||||
|
||||
} /* night_vision */
|
||||
|
||||
} /* feature */
|
||||
} /* Camera AV Stream Management*/
|
||||
|
||||
namespace webrtc_transport_provider {
|
||||
}/*webrtc_transport_provider*/
|
||||
|
||||
namespace webrtc_transport_requestor {
|
||||
}/*webrtc_transport_requestor*/
|
||||
|
||||
|
||||
} /* cluster */
|
||||
} /* esp_matter */
|
||||
|
||||
@@ -1800,5 +1800,97 @@ esp_err_t add(cluster_t *cluster);
|
||||
} /* feature */
|
||||
} /* time_synchronization */
|
||||
|
||||
namespace camera_av_stream_management {
|
||||
|
||||
namespace feature {
|
||||
namespace audio {
|
||||
|
||||
uint32_t get_id();
|
||||
esp_err_t add(cluster_t *cluster);
|
||||
|
||||
} /* audio */
|
||||
|
||||
namespace video {
|
||||
|
||||
uint32_t get_id();
|
||||
esp_err_t add(cluster_t *cluster);
|
||||
|
||||
} /* video */
|
||||
|
||||
namespace snapshot {
|
||||
|
||||
uint32_t get_id();
|
||||
esp_err_t add(cluster_t *cluster);
|
||||
|
||||
} /* snapshot */
|
||||
|
||||
namespace privacy {
|
||||
|
||||
uint32_t get_id();
|
||||
esp_err_t add(cluster_t *cluster);
|
||||
|
||||
} /* privacy */
|
||||
|
||||
namespace speaker {
|
||||
|
||||
uint32_t get_id();
|
||||
esp_err_t add(cluster_t *cluster);
|
||||
|
||||
} /* speaker */
|
||||
|
||||
namespace image_control {
|
||||
uint32_t get_id();
|
||||
esp_err_t add(cluster_t *cluster);
|
||||
|
||||
} /* image_control */
|
||||
|
||||
namespace watermark {
|
||||
|
||||
uint32_t get_id();
|
||||
esp_err_t add(cluster_t *cluster);
|
||||
|
||||
} /* watermark */
|
||||
|
||||
namespace on_screen_display {
|
||||
typedef struct config {
|
||||
config() {}
|
||||
} config_t;
|
||||
|
||||
uint32_t get_id();
|
||||
esp_err_t add(cluster_t *cluster);
|
||||
|
||||
} /* on_screen_display */
|
||||
|
||||
namespace local_storage {
|
||||
|
||||
uint32_t get_id();
|
||||
esp_err_t add(cluster_t *cluster);
|
||||
|
||||
} /* local_storage */
|
||||
|
||||
namespace high_dynamic_range {
|
||||
|
||||
uint32_t get_id();
|
||||
esp_err_t add(cluster_t *cluster);
|
||||
|
||||
} /* high_dynamic_range */
|
||||
|
||||
namespace night_vision {
|
||||
|
||||
uint32_t get_id();
|
||||
esp_err_t add(cluster_t *cluster);
|
||||
|
||||
} /* night_vision */
|
||||
|
||||
} /* feature */
|
||||
}/*camera av stream management*/
|
||||
|
||||
namespace webrtc_transport_provider {
|
||||
}/*webrtc_transport_provider*/
|
||||
|
||||
namespace webrtc_transport_requestor {
|
||||
}/*webrtc_transport_requestor*/
|
||||
|
||||
|
||||
} /* cluster */
|
||||
} /* esp_matter */
|
||||
|
||||
@@ -367,6 +367,18 @@ namespace ecosystem_information {
|
||||
constexpr uint16_t cluster_revision = 1;
|
||||
} // namespace ecosystem_information
|
||||
|
||||
namespace camera_av_stream_management {
|
||||
constexpr uint16_t cluster_revision = 1;
|
||||
} // namespace camera_av_stream_management
|
||||
|
||||
namespace webrtc_transport_provider {
|
||||
constexpr uint16_t cluster_revision = 1;
|
||||
} // namespace webrtc_transport_provider
|
||||
|
||||
namespace webrtc_transport_requestor {
|
||||
constexpr uint16_t cluster_revision = 1;
|
||||
} // namespace webrtc_transport_requestor
|
||||
|
||||
} // namespace cluster
|
||||
} // namespace esp_matter
|
||||
|
||||
|
||||
Reference in New Issue
Block a user