nl:: Weave:: Profiles:: SoftwareUpdate:: ImageQueryResponse
#include <src/lib/profiles/software-update/SoftwareUpdateProfile.h>
A class to support creation and decoding of the image query response messages.
Summary
The image query response message has the form:
Length | Field Name |
variable | URI |
variable | Version specification |
variable | Integrity specification |
1 byte | Update scheme |
1 byte | Update options |
Bit | Meaning |
0..2 | Update priority |
3..4 | Update condition |
5 | Report status. When set, the client is requested to generate the optional DownloadNotify and UpdateNotify messages. |
5..7 | Reserved |
Constructors and Destructors |
|
---|---|
ImageQueryResponse()
The default constructor for ImageQueryResponse.
|
Public attributes |
|
---|---|
integritySpec
|
A field containing the integrity information (integrity type and a hash) for the software update image.
|
reportStatus
|
bool
Request to inform the server about the progress of software update via the optional DownloadNotify and UpdateNotify messages.
|
updateCondition
|
Instructions as to the conditions under which to proceed with software update.
|
updatePriority
|
Instructions directing the device when to perform the software update.
|
updateScheme
|
uint8_t
The update scheme to be used to download the software update image.
|
uri
|
A variable length UTF-8 string containing the location of the software image.
|
versionSpec
|
A variable length UTF-8 string containing a vendor-specific a software version identification.
|
Public functions |
|
---|---|
init(ReferencedString &, ReferencedString &, IntegritySpec &, uint8_t, UpdatePriority, UpdateCondition, bool)
|
Explicitly initialize the ImageQueryResponse object with the provided values.
|
operator==(const ImageQueryResponse &) const
|
bool
An equality operator.
|
pack(PacketBuffer *)
|
Serialize the ImageQueryResponse into the provided PacketBuffer.
|
print(void)
|
void
|
Public static functions |
|
---|---|
parse(PacketBuffer *, ImageQueryResponse &)
|
Deserialize the image query response message provided in a PacketBuffer into a provided ImageQueryResponse.
|
Public attributes
integritySpec
IntegritySpec integritySpec
A field containing the integrity information (integrity type and a hash) for the software update image.
reportStatus
bool reportStatus
Request to inform the server about the progress of software update via the optional DownloadNotify and UpdateNotify messages.
updateCondition
UpdateCondition updateCondition
Instructions as to the conditions under which to proceed with software update.
updatePriority
UpdatePriority updatePriority
Instructions directing the device when to perform the software update.
updateScheme
uint8_t updateScheme
The update scheme to be used to download the software update image.
Its value is drawn from UpdateSchemes.
uri
ReferencedString uri
A variable length UTF-8 string containing the location of the software image.
The contents of this string must conform to the RFC 3986 specification. For update schemes corresponding to a well defined Internet Protocol (HTTP, HTTPS, SFTP), the scheme element of the URI MUST conform to the canonical URL encoding for that protocol scheme. The string length must not exceed 65565 and the the string must fit within a single Weave message, which may be subject to MTU limitations.
versionSpec
ReferencedString versionSpec
A variable length UTF-8 string containing a vendor-specific a software version identification.
The string length must not exceed 256 bytes.
Public functions
ImageQueryResponse
ImageQueryResponse()
The default constructor for ImageQueryResponse.
The ImageQueryResponse may be populated by via the init() method or by deserializing the object from a message.
init
WEAVE_ERROR init( ReferencedString &, ReferencedString &, IntegritySpec &, uint8_t, UpdatePriority, UpdateCondition, bool )
Explicitly initialize the ImageQueryResponse object with the provided values.
Details | |||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Parameters |
|
||||||||||||||
Returns |
WEAVE_NO_ERROR Unconditionally.
|
operator==
bool operator==( const ImageQueryResponse & ) const
An equality operator.
Details | |||
---|---|---|---|
Parameters |
|
||
Returns |
true if all the fields in both objects are equal, false otherwise
|
pack
WEAVE_ERROR pack( PacketBuffer * )
Serialize the ImageQueryResponse into the provided PacketBuffer.
Details | |||||
---|---|---|---|---|---|
Parameters |
|
||||
Return Values |
|
void print( void )
Public static functions
parse
WEAVE_ERROR parse( PacketBuffer *, ImageQueryResponse & )
Deserialize the image query response message provided in a PacketBuffer into a provided ImageQueryResponse.
Details | |||||
---|---|---|---|---|---|
Parameters |
|
||||
Returns |
WEAVE_NO_ERROR On success
|
||||
Returns |
WEAVE_ERROR_BUFFER_TOO_SMALL If the message was too small to contain all the fields of the ImageQuery
|
||||
Returns |
WEAVE_ERROR_INVALID_INTEGRITY_TYPE If the provided integrity type is not one of the values specified in IntegrityTypes
|