matc/clusters/codec/content_app_observer.rs
1//! Generated Matter TLV encoders and decoders for Content App Observer Cluster
2//! Cluster ID: 0x0510
3//! 
4//! This file is automatically generated from ContentAppObserver.xml
5
6use crate::tlv;
7use anyhow;
8
9
10// Command encoders
11
12/// Encode ContentAppMessage command (0x00)
13pub fn encode_content_app_message(data: String, encoding_hint: String) -> anyhow::Result<Vec<u8>> {
14    let tlv = tlv::TlvItemEnc {
15        tag: 0,
16        value: tlv::TlvItemValueEnc::StructInvisible(vec![
17        (0, tlv::TlvItemValueEnc::String(data)).into(),
18        (1, tlv::TlvItemValueEnc::String(encoding_hint)).into(),
19        ]),
20    };
21    Ok(tlv.encode()?)
22}
23