[Messages] Change message duration to uint64 (#32248)
* Change message duration to uint64
* Fixes to Java build
* Missed a HandlePresentMessagesRequest signature
diff --git a/data_model/clusters/Messages.xml b/data_model/clusters/Messages.xml
index cea28ac..5bc3ce8 100644
--- a/data_model/clusters/Messages.xml
+++ b/data_model/clusters/Messages.xml
@@ -216,7 +216,7 @@
<quality nullable="true"/>
<mandatoryConform/>
</field>
- <field id="4" name="Duration" type="uint16" default="0">
+ <field id="4" name="Duration" type="uint64" default="0">
<access fabricSensitive="true"/>
<quality nullable="true"/>
<mandatoryConform/>
diff --git a/examples/tv-app/android/include/messages/MessagesManager.cpp b/examples/tv-app/android/include/messages/MessagesManager.cpp
index dcd48f0..00848c6 100644
--- a/examples/tv-app/android/include/messages/MessagesManager.cpp
+++ b/examples/tv-app/android/include/messages/MessagesManager.cpp
@@ -25,7 +25,7 @@
void MessagesManager::HandlePresentMessagesRequest(
const chip::ByteSpan & messageId, const MessagePriorityEnum & priority,
const chip::BitMask<MessageControlBitmap> & messageControl, const chip::app::DataModel::Nullable<uint32_t> & startTime,
- const chip::app::DataModel::Nullable<uint16_t> & duration, const chip::CharSpan & messageText,
+ const chip::app::DataModel::Nullable<uint64_t> & duration, const chip::CharSpan & messageText,
const chip::Optional<chip::app::DataModel::DecodableList<MessageResponseOption>> & responses)
{
// TODO: Present Message
diff --git a/examples/tv-app/android/include/messages/MessagesManager.h b/examples/tv-app/android/include/messages/MessagesManager.h
index 5f06d25..d675906 100644
--- a/examples/tv-app/android/include/messages/MessagesManager.h
+++ b/examples/tv-app/android/include/messages/MessagesManager.h
@@ -27,7 +27,7 @@
void HandlePresentMessagesRequest(
const chip::ByteSpan & messageId, const chip::app::Clusters::Messages::MessagePriorityEnum & priority,
const chip::BitMask<chip::app::Clusters::Messages::MessageControlBitmap> & messageControl,
- const chip::app::DataModel::Nullable<uint32_t> & startTime, const chip::app::DataModel::Nullable<uint16_t> & duration,
+ const chip::app::DataModel::Nullable<uint32_t> & startTime, const chip::app::DataModel::Nullable<uint64_t> & duration,
const chip::CharSpan & messageText,
const chip::Optional<chip::app::DataModel::DecodableList<
chip::app::Clusters::Messages::Structs::MessageResponseOptionStruct::DecodableType>> & responses) override;
diff --git a/examples/tv-app/android/java/MessagesManager.cpp b/examples/tv-app/android/java/MessagesManager.cpp
index 9203d7b..dbcb5c5 100644
--- a/examples/tv-app/android/java/MessagesManager.cpp
+++ b/examples/tv-app/android/java/MessagesManager.cpp
@@ -183,10 +183,10 @@
}
jfieldID durationField = env->GetFieldID(messageClass, "duration", "I");
- jint jduration = env->GetIntField(messageObject, durationField);
+ jlong jduration = env->GetLongField(messageObject, durationField);
if (jduration >= 0)
{
- message.duration = DataModel::Nullable<uint16_t>(static_cast<uint16_t>(jduration));
+ message.duration = DataModel::Nullable<uint64_t>(static_cast<uint64_t>(jduration));
}
jfieldID getResponseOptionsField =
@@ -301,7 +301,7 @@
CHIP_ERROR MessagesManager::HandlePresentMessagesRequest(
const ByteSpan & messageId, const MessagePriorityEnum & priority, const BitMask<MessageControlBitmap> & messageControl,
- const DataModel::Nullable<uint32_t> & startTime, const DataModel::Nullable<uint16_t> & duration, const CharSpan & messageText,
+ const DataModel::Nullable<uint32_t> & startTime, const DataModel::Nullable<uint64_t> & duration, const CharSpan & messageText,
const Optional<DataModel::DecodableList<MessageResponseOption>> & responses)
{
DeviceLayer::StackUnlock unlock;
@@ -336,11 +336,11 @@
return CHIP_ERROR_INTERNAL;
}
- jint jcontrol = static_cast<jint>(messageControl.Raw());
- jint jduration = -1;
+ jint jcontrol = static_cast<jint>(messageControl.Raw());
+ jlong jduration = -1;
if (!duration.IsNull())
{
- jduration = static_cast<jint>(duration.Value());
+ jduration = static_cast<jlong>(duration.Value());
}
jlong jstartTime = -1;
if (!startTime.IsNull())
diff --git a/examples/tv-app/android/java/MessagesManager.h b/examples/tv-app/android/java/MessagesManager.h
index 563192a..089d3e4 100644
--- a/examples/tv-app/android/java/MessagesManager.h
+++ b/examples/tv-app/android/java/MessagesManager.h
@@ -35,7 +35,7 @@
CHIP_ERROR HandlePresentMessagesRequest(
const chip::ByteSpan & messageId, const chip::app::Clusters::Messages::MessagePriorityEnum & priority,
const chip::BitMask<chip::app::Clusters::Messages::MessageControlBitmap> & messageControl,
- const chip::app::DataModel::Nullable<uint32_t> & startTime, const chip::app::DataModel::Nullable<uint16_t> & duration,
+ const chip::app::DataModel::Nullable<uint32_t> & startTime, const chip::app::DataModel::Nullable<uint64_t> & duration,
const chip::CharSpan & messageText,
const chip::Optional<
chip::app::DataModel::DecodableList<chip::app::Clusters::Messages::Structs::MessageResponseOptionStruct::Type>> &
diff --git a/examples/tv-app/android/java/src/com/matter/tv/server/tvapp/Message.java b/examples/tv-app/android/java/src/com/matter/tv/server/tvapp/Message.java
index c194ffb..8949ab8 100644
--- a/examples/tv-app/android/java/src/com/matter/tv/server/tvapp/Message.java
+++ b/examples/tv-app/android/java/src/com/matter/tv/server/tvapp/Message.java
@@ -23,7 +23,7 @@
public int priority;
public int messageControl;
public long startTime;
- public int duration;
+ public long duration;
public String messageText;
public MessageResponseOption responseOptions[];
@@ -32,7 +32,7 @@
int priority,
int messageControl,
long startTime,
- int duration,
+ long duration,
String messageText,
MessageResponseOption responseOptions[]) {
this.messageId = messageId;
diff --git a/examples/tv-app/android/java/src/com/matter/tv/server/tvapp/MessagesManager.java b/examples/tv-app/android/java/src/com/matter/tv/server/tvapp/MessagesManager.java
index 0a56808..5d97083 100644
--- a/examples/tv-app/android/java/src/com/matter/tv/server/tvapp/MessagesManager.java
+++ b/examples/tv-app/android/java/src/com/matter/tv/server/tvapp/MessagesManager.java
@@ -28,7 +28,7 @@
int priority,
int messageControl,
long startTime,
- int duration,
+ long duration,
String messageText,
HashMap<Long, String> responseOptions);
diff --git a/examples/tv-app/android/java/src/com/matter/tv/server/tvapp/MessagesManagerStub.java b/examples/tv-app/android/java/src/com/matter/tv/server/tvapp/MessagesManagerStub.java
index 63fef69..55d9420 100644
--- a/examples/tv-app/android/java/src/com/matter/tv/server/tvapp/MessagesManagerStub.java
+++ b/examples/tv-app/android/java/src/com/matter/tv/server/tvapp/MessagesManagerStub.java
@@ -52,7 +52,7 @@
int priority,
int messageControl,
long startTime,
- int duration,
+ long duration,
String messageText,
HashMap<Long, String> responseOptions) {
Log.d(
diff --git a/examples/tv-app/tv-common/clusters/messages/MessagesManager.cpp b/examples/tv-app/tv-common/clusters/messages/MessagesManager.cpp
index 6ffbb9a..461e355 100644
--- a/examples/tv-app/tv-common/clusters/messages/MessagesManager.cpp
+++ b/examples/tv-app/tv-common/clusters/messages/MessagesManager.cpp
@@ -30,7 +30,7 @@
// Commands
CHIP_ERROR MessagesManager::HandlePresentMessagesRequest(
const ByteSpan & messageId, const MessagePriorityEnum & priority, const BitMask<MessageControlBitmap> & messageControl,
- const DataModel::Nullable<uint32_t> & startTime, const DataModel::Nullable<uint16_t> & duration, const CharSpan & messageText,
+ const DataModel::Nullable<uint32_t> & startTime, const DataModel::Nullable<uint64_t> & duration, const CharSpan & messageText,
const Optional<DataModel::DecodableList<MessageResponseOption>> & responses)
{
ChipLogProgress(Zcl, "HandlePresentMessagesRequest message:%s", std::string(messageText.data(), messageText.size()).c_str());
diff --git a/examples/tv-app/tv-common/clusters/messages/MessagesManager.h b/examples/tv-app/tv-common/clusters/messages/MessagesManager.h
index 325cd56..777f202 100644
--- a/examples/tv-app/tv-common/clusters/messages/MessagesManager.h
+++ b/examples/tv-app/tv-common/clusters/messages/MessagesManager.h
@@ -64,7 +64,7 @@
CachedMessage(const chip::ByteSpan & messageId, const chip::app::Clusters::Messages::MessagePriorityEnum & priority,
const chip::BitMask<chip::app::Clusters::Messages::MessageControlBitmap> & messageControl,
const chip::app::DataModel::Nullable<uint32_t> & startTime,
- const chip::app::DataModel::Nullable<uint16_t> & duration, std::string messageText) :
+ const chip::app::DataModel::Nullable<uint64_t> & duration, std::string messageText) :
mPriority(priority),
mMessageControl(messageControl), mStartTime(startTime), mDuration(duration), mMessageText(messageText)
{
@@ -110,7 +110,7 @@
const chip::app::Clusters::Messages::MessagePriorityEnum mPriority;
const chip::BitMask<chip::app::Clusters::Messages::MessageControlBitmap> mMessageControl;
const chip::app::DataModel::Nullable<uint32_t> mStartTime;
- const chip::app::DataModel::Nullable<uint16_t> mDuration;
+ const chip::app::DataModel::Nullable<uint64_t> mDuration;
std::string mMessageText;
uint8_t mMessageIdBuffer[chip::app::Clusters::Messages::kMessageIdLength];
@@ -126,7 +126,7 @@
CHIP_ERROR HandlePresentMessagesRequest(
const chip::ByteSpan & messageId, const chip::app::Clusters::Messages::MessagePriorityEnum & priority,
const chip::BitMask<chip::app::Clusters::Messages::MessageControlBitmap> & messageControl,
- const chip::app::DataModel::Nullable<uint32_t> & startTime, const chip::app::DataModel::Nullable<uint16_t> & duration,
+ const chip::app::DataModel::Nullable<uint32_t> & startTime, const chip::app::DataModel::Nullable<uint64_t> & duration,
const chip::CharSpan & messageText,
const chip::Optional<
chip::app::DataModel::DecodableList<chip::app::Clusters::Messages::Structs::MessageResponseOptionStruct::Type>> &
diff --git a/examples/tv-app/tv-common/tv-app.matter b/examples/tv-app/tv-common/tv-app.matter
index 6effacc..37fd9cb 100644
--- a/examples/tv-app/tv-common/tv-app.matter
+++ b/examples/tv-app/tv-common/tv-app.matter
@@ -2067,7 +2067,7 @@
MessagePriorityEnum priority = 1;
MessageControlBitmap messageControl = 2;
nullable epoch_s startTime = 3;
- nullable int16u duration = 4;
+ nullable int64u duration = 4;
char_string<256> messageText = 5;
optional MessageResponseOptionStruct responses[] = 6;
}
@@ -2101,7 +2101,7 @@
MessagePriorityEnum priority = 1;
MessageControlBitmap messageControl = 2;
nullable epoch_s startTime = 3;
- nullable int16u duration = 4;
+ nullable int64u duration = 4;
char_string<256> messageText = 5;
optional MessageResponseOptionStruct responses[] = 6;
}
diff --git a/examples/tv-casting-app/tv-casting-common/tv-casting-app.matter b/examples/tv-casting-app/tv-casting-common/tv-casting-app.matter
index 4bece07..35a766e 100644
--- a/examples/tv-casting-app/tv-casting-common/tv-casting-app.matter
+++ b/examples/tv-casting-app/tv-casting-common/tv-casting-app.matter
@@ -1545,7 +1545,7 @@
MessagePriorityEnum priority = 1;
MessageControlBitmap messageControl = 2;
nullable epoch_s startTime = 3;
- nullable int16u duration = 4;
+ nullable int64u duration = 4;
char_string<256> messageText = 5;
optional MessageResponseOptionStruct responses[] = 6;
}
@@ -1579,7 +1579,7 @@
MessagePriorityEnum priority = 1;
MessageControlBitmap messageControl = 2;
nullable epoch_s startTime = 3;
- nullable int16u duration = 4;
+ nullable int64u duration = 4;
char_string<256> messageText = 5;
optional MessageResponseOptionStruct responses[] = 6;
}
diff --git a/src/app/clusters/messages-server/messages-delegate.h b/src/app/clusters/messages-server/messages-delegate.h
index aba771a..6be09de 100644
--- a/src/app/clusters/messages-server/messages-delegate.h
+++ b/src/app/clusters/messages-server/messages-delegate.h
@@ -42,7 +42,7 @@
virtual CHIP_ERROR HandlePresentMessagesRequest(
const ByteSpan & messageId, const MessagePriorityEnum & priority,
const chip::BitMask<MessageControlBitmap> & messageControl, const DataModel::Nullable<uint32_t> & startTime,
- const DataModel::Nullable<uint16_t> & duration, const CharSpan & messageText,
+ const DataModel::Nullable<uint64_t> & duration, const CharSpan & messageText,
const chip::Optional<DataModel::DecodableList<chip::app::Clusters::Messages::Structs::MessageResponseOptionStruct::Type>> &
responses) = 0;
virtual CHIP_ERROR HandleCancelMessagesRequest(const DataModel::DecodableList<chip::ByteSpan> & messageIds) = 0;
diff --git a/src/app/zap-templates/zcl/data-model/chip/messages-cluster.xml b/src/app/zap-templates/zcl/data-model/chip/messages-cluster.xml
index 2da346c..16b1527 100644
--- a/src/app/zap-templates/zcl/data-model/chip/messages-cluster.xml
+++ b/src/app/zap-templates/zcl/data-model/chip/messages-cluster.xml
@@ -58,7 +58,7 @@
<item fieldId="1" name="Priority" type="MessagePriorityEnum" optional="false"/>
<item fieldId="2" name="MessageControl" type="MessageControlBitmap" default="0" optional="false"/>
<item fieldId="3" name="StartTime" type="epoch_s" default="0" optional="false" isNullable="true"/>
- <item fieldId="4" name="Duration" type="int16u" default="0" optional="false" isNullable="true"/>
+ <item fieldId="4" name="Duration" type="int64u" default="0" optional="false" isNullable="true"/>
<item fieldId="5" name="MessageText" type="char_string" length="256" optional="false"/>
<item fieldId="6" name="Responses" type="MessageResponseOptionStruct" array="true" length="4" optional="true"/>
</struct>
@@ -88,7 +88,7 @@
<arg name="Priority" type="MessagePriorityEnum" optional="false"/>
<arg name="MessageControl" type="MessageControlBitmap" default="0" optional="false"/>
<arg name="StartTime" type="epoch_s" default="0" optional="false" isNullable="true"/>
- <arg name="Duration" type="int16u" default="0" optional="false" isNullable="true"/>
+ <arg name="Duration" type="int64u" default="0" optional="false" isNullable="true"/>
<arg name="MessageText" type="char_string" length="256" optional="false"/>
<arg name="Responses" type="MessageResponseOptionStruct" array="true" length="4" optional="true"/>
</command>
diff --git a/src/controller/data_model/controller-clusters.matter b/src/controller/data_model/controller-clusters.matter
index 235366f..8611f4b 100644
--- a/src/controller/data_model/controller-clusters.matter
+++ b/src/controller/data_model/controller-clusters.matter
@@ -4539,7 +4539,7 @@
MessagePriorityEnum priority = 1;
MessageControlBitmap messageControl = 2;
nullable epoch_s startTime = 3;
- nullable int16u duration = 4;
+ nullable int64u duration = 4;
char_string<256> messageText = 5;
optional MessageResponseOptionStruct responses[] = 6;
}
@@ -4573,7 +4573,7 @@
MessagePriorityEnum priority = 1;
MessageControlBitmap messageControl = 2;
nullable epoch_s startTime = 3;
- nullable int16u duration = 4;
+ nullable int64u duration = 4;
char_string<256> messageText = 5;
optional MessageResponseOptionStruct responses[] = 6;
}
diff --git a/src/controller/java/generated/java/chip/devicecontroller/ChipClusters.java b/src/controller/java/generated/java/chip/devicecontroller/ChipClusters.java
index fcc9154..7025f3c 100644
--- a/src/controller/java/generated/java/chip/devicecontroller/ChipClusters.java
+++ b/src/controller/java/generated/java/chip/devicecontroller/ChipClusters.java
@@ -29906,11 +29906,11 @@
return 0L;
}
- public void presentMessagesRequest(DefaultClusterCallback callback, byte[] messageID, Integer priority, Integer messageControl, @Nullable Long startTime, @Nullable Integer duration, String messageText, Optional<ArrayList<ChipStructs.MessagesClusterMessageResponseOptionStruct>> responses) {
+ public void presentMessagesRequest(DefaultClusterCallback callback, byte[] messageID, Integer priority, Integer messageControl, @Nullable Long startTime, @Nullable Long duration, String messageText, Optional<ArrayList<ChipStructs.MessagesClusterMessageResponseOptionStruct>> responses) {
presentMessagesRequest(callback, messageID, priority, messageControl, startTime, duration, messageText, responses, 0);
}
- public void presentMessagesRequest(DefaultClusterCallback callback, byte[] messageID, Integer priority, Integer messageControl, @Nullable Long startTime, @Nullable Integer duration, String messageText, Optional<ArrayList<ChipStructs.MessagesClusterMessageResponseOptionStruct>> responses, int timedInvokeTimeoutMs) {
+ public void presentMessagesRequest(DefaultClusterCallback callback, byte[] messageID, Integer priority, Integer messageControl, @Nullable Long startTime, @Nullable Long duration, String messageText, Optional<ArrayList<ChipStructs.MessagesClusterMessageResponseOptionStruct>> responses, int timedInvokeTimeoutMs) {
final long commandId = 0L;
ArrayList<StructElement> elements = new ArrayList<>();
diff --git a/src/controller/java/generated/java/chip/devicecontroller/ChipStructs.java b/src/controller/java/generated/java/chip/devicecontroller/ChipStructs.java
index 6fb0469..7730f05 100644
--- a/src/controller/java/generated/java/chip/devicecontroller/ChipStructs.java
+++ b/src/controller/java/generated/java/chip/devicecontroller/ChipStructs.java
@@ -7130,7 +7130,7 @@
public Integer priority;
public Integer messageControl;
public @Nullable Long startTime;
- public @Nullable Integer duration;
+ public @Nullable Long duration;
public String messageText;
public Optional<ArrayList<ChipStructs.MessagesClusterMessageResponseOptionStruct>> responses;
private static final long MESSAGE_I_D_ID = 0L;
@@ -7146,7 +7146,7 @@
Integer priority,
Integer messageControl,
@Nullable Long startTime,
- @Nullable Integer duration,
+ @Nullable Long duration,
String messageText,
Optional<ArrayList<ChipStructs.MessagesClusterMessageResponseOptionStruct>> responses
) {
@@ -7180,7 +7180,7 @@
Integer priority = null;
Integer messageControl = null;
@Nullable Long startTime = null;
- @Nullable Integer duration = null;
+ @Nullable Long duration = null;
String messageText = null;
Optional<ArrayList<ChipStructs.MessagesClusterMessageResponseOptionStruct>> responses = Optional.empty();
for (StructElement element: ((StructType)tlvValue).value()) {
@@ -7207,7 +7207,7 @@
} else if (element.contextTagNum() == DURATION_ID) {
if (element.value(BaseTLVType.class).type() == TLVType.UInt) {
UIntType castingValue = element.value(UIntType.class);
- duration = castingValue.value(Integer.class);
+ duration = castingValue.value(Long.class);
}
} else if (element.contextTagNum() == MESSAGE_TEXT_ID) {
if (element.value(BaseTLVType.class).type() == TLVType.String) {
diff --git a/src/controller/java/generated/java/chip/devicecontroller/ClusterInfoMapping.java b/src/controller/java/generated/java/chip/devicecontroller/ClusterInfoMapping.java
index 14b4a97..5162f97 100644
--- a/src/controller/java/generated/java/chip/devicecontroller/ClusterInfoMapping.java
+++ b/src/controller/java/generated/java/chip/devicecontroller/ClusterInfoMapping.java
@@ -24325,7 +24325,7 @@
CommandParameterInfo messagespresentMessagesRequeststartTimeCommandParameterInfo = new CommandParameterInfo("startTime", Long.class, Long.class);
messagespresentMessagesRequestCommandParams.put("startTime",messagespresentMessagesRequeststartTimeCommandParameterInfo);
- CommandParameterInfo messagespresentMessagesRequestdurationCommandParameterInfo = new CommandParameterInfo("duration", Integer.class, Integer.class);
+ CommandParameterInfo messagespresentMessagesRequestdurationCommandParameterInfo = new CommandParameterInfo("duration", Long.class, Long.class);
messagespresentMessagesRequestCommandParams.put("duration",messagespresentMessagesRequestdurationCommandParameterInfo);
CommandParameterInfo messagespresentMessagesRequestmessageTextCommandParameterInfo = new CommandParameterInfo("messageText", String.class, String.class);
@@ -24343,7 +24343,7 @@
commandArguments.get("messageControl")
, (Long)
commandArguments.get("startTime")
- , (Integer)
+ , (Long)
commandArguments.get("duration")
, (String)
commandArguments.get("messageText")
diff --git a/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/MessagesClusterMessageStruct.kt b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/MessagesClusterMessageStruct.kt
index d174928..03a544c 100644
--- a/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/MessagesClusterMessageStruct.kt
+++ b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/MessagesClusterMessageStruct.kt
@@ -29,7 +29,7 @@
val priority: UInt,
val messageControl: UInt,
val startTime: ULong?,
- val duration: UInt?,
+ val duration: ULong?,
val messageText: String,
val responses: Optional<List<MessagesClusterMessageResponseOptionStruct>>
) {
@@ -97,7 +97,7 @@
}
val duration =
if (!tlvReader.isNull()) {
- tlvReader.getUInt(ContextSpecificTag(TAG_DURATION))
+ tlvReader.getULong(ContextSpecificTag(TAG_DURATION))
} else {
tlvReader.getNull(ContextSpecificTag(TAG_DURATION))
null
diff --git a/src/controller/java/generated/java/matter/controller/cluster/clusters/MessagesCluster.kt b/src/controller/java/generated/java/matter/controller/cluster/clusters/MessagesCluster.kt
index 5ce55e2..3e3fcd8 100644
--- a/src/controller/java/generated/java/matter/controller/cluster/clusters/MessagesCluster.kt
+++ b/src/controller/java/generated/java/matter/controller/cluster/clusters/MessagesCluster.kt
@@ -106,7 +106,7 @@
priority: UByte,
messageControl: UByte,
startTime: UInt?,
- duration: UShort?,
+ duration: ULong?,
messageText: String,
responses: List<MessagesClusterMessageResponseOptionStruct>?,
timedInvokeTimeout: Duration? = null
diff --git a/src/controller/java/generated/java/matter/controller/cluster/structs/MessagesClusterMessageStruct.kt b/src/controller/java/generated/java/matter/controller/cluster/structs/MessagesClusterMessageStruct.kt
index 8560beb..14c573c 100644
--- a/src/controller/java/generated/java/matter/controller/cluster/structs/MessagesClusterMessageStruct.kt
+++ b/src/controller/java/generated/java/matter/controller/cluster/structs/MessagesClusterMessageStruct.kt
@@ -29,7 +29,7 @@
val priority: UByte,
val messageControl: UByte,
val startTime: UInt?,
- val duration: UShort?,
+ val duration: ULong?,
val messageText: String,
val responses: Optional<List<MessagesClusterMessageResponseOptionStruct>>
) {
@@ -97,7 +97,7 @@
}
val duration =
if (!tlvReader.isNull()) {
- tlvReader.getUShort(ContextSpecificTag(TAG_DURATION))
+ tlvReader.getULong(ContextSpecificTag(TAG_DURATION))
} else {
tlvReader.getNull(ContextSpecificTag(TAG_DURATION))
null
diff --git a/src/controller/java/zap-generated/CHIPAttributeTLVValueDecoder.cpp b/src/controller/java/zap-generated/CHIPAttributeTLVValueDecoder.cpp
index 7a8aebe..2400ba8 100644
--- a/src/controller/java/zap-generated/CHIPAttributeTLVValueDecoder.cpp
+++ b/src/controller/java/zap-generated/CHIPAttributeTLVValueDecoder.cpp
@@ -23068,12 +23068,12 @@
}
else
{
- std::string newElement_0_durationClassName = "java/lang/Integer";
- std::string newElement_0_durationCtorSignature = "(I)V";
- jint jninewElement_0_duration = static_cast<jint>(entry_0.duration.Value());
- chip::JniReferences::GetInstance().CreateBoxedObject<jint>(newElement_0_durationClassName.c_str(),
- newElement_0_durationCtorSignature.c_str(),
- jninewElement_0_duration, newElement_0_duration);
+ std::string newElement_0_durationClassName = "java/lang/Long";
+ std::string newElement_0_durationCtorSignature = "(J)V";
+ jlong jninewElement_0_duration = static_cast<jlong>(entry_0.duration.Value());
+ chip::JniReferences::GetInstance().CreateBoxedObject<jlong>(newElement_0_durationClassName.c_str(),
+ newElement_0_durationCtorSignature.c_str(),
+ jninewElement_0_duration, newElement_0_duration);
}
jobject newElement_0_messageText;
LogErrorOnFailure(
@@ -23163,11 +23163,10 @@
}
jmethodID messageStructStructCtor_1;
- err =
- chip::JniReferences::GetInstance().FindMethod(env, messageStructStructClass_1, "<init>",
- "([BLjava/lang/Integer;Ljava/lang/Integer;Ljava/lang/Long;Ljava/"
- "lang/Integer;Ljava/lang/String;Ljava/util/Optional;)V",
- &messageStructStructCtor_1);
+ err = chip::JniReferences::GetInstance().FindMethod(env, messageStructStructClass_1, "<init>",
+ "([BLjava/lang/Integer;Ljava/lang/Integer;Ljava/lang/"
+ "Long;Ljava/lang/Long;Ljava/lang/String;Ljava/util/Optional;)V",
+ &messageStructStructCtor_1);
if (err != CHIP_NO_ERROR || messageStructStructCtor_1 == nullptr)
{
ChipLogError(Zcl, "Could not find ChipStructs$MessagesClusterMessageStruct constructor");
diff --git a/src/darwin/Framework/CHIP/zap-generated/MTRAttributeTLVValueDecoder.mm b/src/darwin/Framework/CHIP/zap-generated/MTRAttributeTLVValueDecoder.mm
index 298c127..bae1643 100644
--- a/src/darwin/Framework/CHIP/zap-generated/MTRAttributeTLVValueDecoder.mm
+++ b/src/darwin/Framework/CHIP/zap-generated/MTRAttributeTLVValueDecoder.mm
@@ -8750,7 +8750,7 @@
if (entry_0.duration.IsNull()) {
newElement_0.duration = nil;
} else {
- newElement_0.duration = [NSNumber numberWithUnsignedShort:entry_0.duration.Value()];
+ newElement_0.duration = [NSNumber numberWithUnsignedLongLong:entry_0.duration.Value()];
}
newElement_0.messageText = AsString(entry_0.messageText);
if (newElement_0.messageText == nil) {
diff --git a/src/darwin/Framework/CHIP/zap-generated/MTRCommandPayloadsObjc.mm b/src/darwin/Framework/CHIP/zap-generated/MTRCommandPayloadsObjc.mm
index b2c1355..60757c9 100644
--- a/src/darwin/Framework/CHIP/zap-generated/MTRCommandPayloadsObjc.mm
+++ b/src/darwin/Framework/CHIP/zap-generated/MTRCommandPayloadsObjc.mm
@@ -15516,7 +15516,7 @@
encodableStruct.duration.SetNull();
} else {
auto & nonNullValue_0 = encodableStruct.duration.SetNonNull();
- nonNullValue_0 = self.duration.unsignedShortValue;
+ nonNullValue_0 = self.duration.unsignedLongLongValue;
}
}
{
diff --git a/zzz_generated/app-common/app-common/zap-generated/cluster-objects.h b/zzz_generated/app-common/app-common/zap-generated/cluster-objects.h
index 99e6e3b..dfdf2e6 100644
--- a/zzz_generated/app-common/app-common/zap-generated/cluster-objects.h
+++ b/zzz_generated/app-common/app-common/zap-generated/cluster-objects.h
@@ -21506,7 +21506,7 @@
MessagePriorityEnum priority = static_cast<MessagePriorityEnum>(0);
chip::BitMask<MessageControlBitmap> messageControl = static_cast<chip::BitMask<MessageControlBitmap>>(0);
DataModel::Nullable<uint32_t> startTime;
- DataModel::Nullable<uint16_t> duration;
+ DataModel::Nullable<uint64_t> duration;
chip::CharSpan messageText;
Optional<DataModel::List<const Structs::MessageResponseOptionStruct::Type>> responses;
@@ -21522,7 +21522,7 @@
MessagePriorityEnum priority = static_cast<MessagePriorityEnum>(0);
chip::BitMask<MessageControlBitmap> messageControl = static_cast<chip::BitMask<MessageControlBitmap>>(0);
DataModel::Nullable<uint32_t> startTime;
- DataModel::Nullable<uint16_t> duration;
+ DataModel::Nullable<uint64_t> duration;
chip::CharSpan messageText;
Optional<DataModel::DecodableList<Structs::MessageResponseOptionStruct::DecodableType>> responses;
@@ -21573,7 +21573,7 @@
MessagePriorityEnum priority = static_cast<MessagePriorityEnum>(0);
chip::BitMask<MessageControlBitmap> messageControl = static_cast<chip::BitMask<MessageControlBitmap>>(0);
DataModel::Nullable<uint32_t> startTime;
- DataModel::Nullable<uint16_t> duration;
+ DataModel::Nullable<uint64_t> duration;
chip::CharSpan messageText;
Optional<DataModel::List<const Structs::MessageResponseOptionStruct::Type>> responses;
@@ -21594,7 +21594,7 @@
MessagePriorityEnum priority = static_cast<MessagePriorityEnum>(0);
chip::BitMask<MessageControlBitmap> messageControl = static_cast<chip::BitMask<MessageControlBitmap>>(0);
DataModel::Nullable<uint32_t> startTime;
- DataModel::Nullable<uint16_t> duration;
+ DataModel::Nullable<uint64_t> duration;
chip::CharSpan messageText;
Optional<DataModel::DecodableList<Structs::MessageResponseOptionStruct::DecodableType>> responses;
CHIP_ERROR Decode(TLV::TLVReader & reader);
diff --git a/zzz_generated/chip-tool/zap-generated/cluster/Commands.h b/zzz_generated/chip-tool/zap-generated/cluster/Commands.h
index 3a7a4e9..6191eb2 100644
--- a/zzz_generated/chip-tool/zap-generated/cluster/Commands.h
+++ b/zzz_generated/chip-tool/zap-generated/cluster/Commands.h
@@ -6837,7 +6837,7 @@
AddArgument("Priority", 0, UINT8_MAX, &mRequest.priority);
AddArgument("MessageControl", 0, UINT8_MAX, &mRequest.messageControl);
AddArgument("StartTime", 0, UINT32_MAX, &mRequest.startTime);
- AddArgument("Duration", 0, UINT16_MAX, &mRequest.duration);
+ AddArgument("Duration", 0, UINT64_MAX, &mRequest.duration);
AddArgument("MessageText", &mRequest.messageText);
AddArgument("Responses", &mComplex_Responses, "", Argument::kOptional);
ClusterCommand::AddArguments();
diff --git a/zzz_generated/darwin-framework-tool/zap-generated/cluster/Commands.h b/zzz_generated/darwin-framework-tool/zap-generated/cluster/Commands.h
index 9a1389e..60843e7 100644
--- a/zzz_generated/darwin-framework-tool/zap-generated/cluster/Commands.h
+++ b/zzz_generated/darwin-framework-tool/zap-generated/cluster/Commands.h
@@ -81043,7 +81043,7 @@
AddArgument("StartTime", 0, UINT32_MAX, &mRequest.startTime);
#endif // MTR_ENABLE_PROVISIONAL
#if MTR_ENABLE_PROVISIONAL
- AddArgument("Duration", 0, UINT16_MAX, &mRequest.duration);
+ AddArgument("Duration", 0, UINT64_MAX, &mRequest.duration);
#endif // MTR_ENABLE_PROVISIONAL
#if MTR_ENABLE_PROVISIONAL
AddArgument("MessageText", &mRequest.messageText);
@@ -81085,7 +81085,7 @@
if (mRequest.duration.IsNull()) {
params.duration = nil;
} else {
- params.duration = [NSNumber numberWithUnsignedShort:mRequest.duration.Value()];
+ params.duration = [NSNumber numberWithUnsignedLongLong:mRequest.duration.Value()];
}
#endif // MTR_ENABLE_PROVISIONAL
#if MTR_ENABLE_PROVISIONAL