You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
For Command arguments, the expect json paylod input in a box would be one command payload
"""
{
"1:ARRAY": [a,b,c,d]
"5:STRING" : "t"
}
"""
we still need to provide the command path(endpointId, clusterId, commandId)
When processing with IM, We need TlvWriter().fromJsonString(value)
For Write arguments, the expect json paylod input in a box would be a list of attribute
"""
{
"1:ARRAY": [a,b,c,d]
"5:STRING" : "t"
}
"""
we need to provide the endpointId, clusterId.
When processing by IM write API, we need get tagNumber and tlvByteArray one by one, inject them into write API.
val dataWithStruct = TlvWriter().fromJsonString(jsonblob)
val tlvReader = TlvReader(dataWithStruct)
tlvReader.skipElement()
while (!tlvReader.isEndOfTlv())) {
val elementBytes = TlvWriter().startStructure(AnonymousTag).copyElement(tlvReader).getEncoded()
val anotherTlvReader = TlvReader(elementBytes)
anotherTlvReader.skipElement()
val tag: ContextSpecificTag? = innerTlvReader.peekElement().tag as? ContextSpecificTag
val tagNumber = tag?.tagNumber?.toUInt()
val value = TlvWriter().copyElement(AnonymousTag, innerTlvReader).getEncoded()
In UI, we need to add box for json input for command and write.
The goal for this work is to demonstrate how to use json/tlv to run cluster interaction with scale, for example, how to send a burst of attributes from multiple clusters using json across components instead of tlv.
The text was updated successfully, but these errors were encountered:
For Command arguments, the expect json paylod input in a box would be one command payload
"""
{
"1:ARRAY": [a,b,c,d]
"5:STRING" : "t"
}
"""
we still need to provide the command path(endpointId, clusterId, commandId)
When processing with IM, We need TlvWriter().fromJsonString(value)
For Write arguments, the expect json paylod input in a box would be a list of attribute
"""
{
"1:ARRAY": [a,b,c,d]
"5:STRING" : "t"
}
"""
we need to provide the endpointId, clusterId.
When processing by IM write API, we need get tagNumber and tlvByteArray one by one, inject them into write API.
val dataWithStruct = TlvWriter().fromJsonString(jsonblob)
val tlvReader = TlvReader(dataWithStruct)
tlvReader.skipElement()
while (!tlvReader.isEndOfTlv())) {
val elementBytes = TlvWriter().startStructure(AnonymousTag).copyElement(tlvReader).getEncoded()
val anotherTlvReader = TlvReader(elementBytes)
anotherTlvReader.skipElement()
val tag: ContextSpecificTag? = innerTlvReader.peekElement().tag as? ContextSpecificTag
val tagNumber = tag?.tagNumber?.toUInt()
val value = TlvWriter().copyElement(AnonymousTag, innerTlvReader).getEncoded()
In UI, we need to add box for json input for command and write.
The goal for this work is to demonstrate how to use json/tlv to run cluster interaction with scale, for example, how to send a burst of attributes from multiple clusters using json across components instead of tlv.
The text was updated successfully, but these errors were encountered: