File tree Expand file tree Collapse file tree 1 file changed +13
-6
lines changed
rs-matter/src/data_model/sdm Expand file tree Collapse file tree 1 file changed +13
-6
lines changed Original file line number Diff line number Diff line change @@ -121,9 +121,15 @@ struct FailSafeParams {
121
121
bread_crumb : u8 ,
122
122
}
123
123
124
+ #[ derive( ToTLV ) ]
125
+ struct BasicCommissioningInfo {
126
+ expiry_len : u16 ,
127
+ max_cmltv_failsafe_secs : u16 ,
128
+ }
129
+
124
130
pub struct GenCommCluster < ' a > {
125
131
data_ver : Dataver ,
126
- expiry_len : u16 ,
132
+ basic_comm_info : BasicCommissioningInfo ,
127
133
failsafe : & ' a RefCell < FailSafe > ,
128
134
}
129
135
@@ -133,7 +139,10 @@ impl<'a> GenCommCluster<'a> {
133
139
data_ver : Dataver :: new ( rand) ,
134
140
failsafe,
135
141
// TODO: Arch-Specific
136
- expiry_len : 120 ,
142
+ basic_comm_info : BasicCommissioningInfo {
143
+ expiry_len : 120 ,
144
+ max_cmltv_failsafe_secs : 120 ,
145
+ } ,
137
146
}
138
147
}
139
148
@@ -157,10 +166,8 @@ impl<'a> GenCommCluster<'a> {
157
166
codec. encode ( writer, RegLocationType :: IndoorOutdoor as _ )
158
167
}
159
168
Attributes :: BasicCommissioningInfo ( _) => {
160
- writer. start_struct ( AttrDataWriter :: TAG ) ?;
161
- writer. u16 ( TagType :: Context ( 0 ) , self . expiry_len ) ?;
162
- writer. end_container ( ) ?;
163
-
169
+ self . basic_comm_info
170
+ . to_tlv ( & mut writer, AttrDataWriter :: TAG ) ?;
164
171
writer. complete ( )
165
172
}
166
173
}
You can’t perform that action at this time.
0 commit comments