nl::Weave::Profiles::SoftwareUpdate

This namespace includes all interfaces within Weave for the Weave Software Update profile, which includes the corresponding, protocol of the same name.

Summary

Enumerations

@309{
  kMsgType_ImageAnnounce = 0,
  kMsgType_ImageQuery = 1,
  kMsgType_ImageQueryResponse = 2,
  kMsgType_DownloadNotify = 3,
  kMsgType_NotifyResponse = 4,
  kMsgType_UpdateNotify = 5,
  kMsgType_ImageQueryStatus = 6
}
enum
SoftwareUpdate Message types.
@310{
  kStatus_NoUpdateAvailable = 0x0001,
  kStatus_UpdateFailed = 0x0010,
  kStatus_InvalidInstructions = 0x0050,
  kStatus_DownloadFailed = 0x0051,
  kStatus_IntegrityCheckFailed = 0x0052,
  kStatus_Abort = 0x0053,
  kStatus_Retry = 0x0091
}
enum
@311{
  kFlag_PackageSpecPresent = 1,
  kFlag_LocaleSpecPresent = 2,
  kFlag_TargetNodeIdPresent = 4
}
enum
Control flags for the control field of the ImageQuery frame.
@312 enum
Bitmasks for the optional update options field of the ImageQueryResponse.
@313 enum
Shift offsets for the optional update options field of the ImageQueryResponse.
@314{
  kIntegrityType_SHA160 = 0,
  kIntegrityType_SHA256 = 1,
  kIntegrityType_SHA512 = 2,
  kIntegrityType_Last = 3
}
enum
@315 enum
Lengths, in bytes, for the integrity specification byte-strings.
@316{
  kUpdateScheme_HTTP = 0,
  kUpdateScheme_HTTPS = 1,
  kUpdateScheme_SFTP = 2,
  kUpdateScheme_BDX = 3,
  kUpdateScheme_Last = 4
}
enum
@317 enum
Data Element Tags for the SoftwareUpdate Profile.
UpdateCondition{
  IfUnmatched,
  IfLater,
  Unconditionally,
  OnOptIn
}
enum
Conditions governing update policy.
UpdatePriority{
  Normal,
  Critical
}
enum
Update priorities.

Functions

integrityLength(uint8_t aType)
int
A support method mapping the IntegrityTypes values onto the lengths of the hashes of that type.

Classes

nl::Weave::Profiles::SoftwareUpdate::IWeaveImageAnnounceServerDelegate

Interface for WeaveImageAnnounceServer delegate.

nl::Weave::Profiles::SoftwareUpdate::ImageAnnounce

Class describing the ImageAnnounce message.

nl::Weave::Profiles::SoftwareUpdate::ImageQuery

A class to support creation and decoding of image query messages.

nl::Weave::Profiles::SoftwareUpdate::ImageQueryResponse

A class to support creation and decoding of the image query response messages.

nl::Weave::Profiles::SoftwareUpdate::IntegritySpec

An auxiliary class holding the integrity type and the actual hash of the software update image.

nl::Weave::Profiles::SoftwareUpdate::IntegrityTypeList

An auxiliary class to hold a list of integrity types as a part of the image query.

nl::Weave::Profiles::SoftwareUpdate::ProductSpec

An auxiliary class that representing a product specification.

nl::Weave::Profiles::SoftwareUpdate::UpdateSchemeList

An auxiliary class to hold a list of update schemes as a part of the image query.

nl::Weave::Profiles::SoftwareUpdate::WeaveImageAnnounceServer

Server that listens for Weave image announcements.

Enumerations

@309

 @309

SoftwareUpdate Message types.

Properties
kMsgType_DownloadNotify

An optional message from the client to the server used to notify the server about the download status.

Its payload is a nl::Weave::Profiles::StatusReporting::StatusReport with the additional status info drawn from SoftwareUpdateStatusCodes.

kMsgType_ImageAnnounce

An optional unsolicited messsage, used by the server to announce availability of a software update.

The message carries no payload.

kMsgType_ImageQuery

A query message sent by the client to the server.

Its format is defined with the ImageQuery class.

kMsgType_ImageQueryResponse

A message generated in response to a successful image query message.

Its format is defined by the ImageQueryResponse class.

kMsgType_ImageQueryStatus

A message generated in response to a failed image query message.

Its payload is a nl::Weave::Profiles::StatusReporting::StatusReport with the additional status info drawn from SoftwareUpdateStatusCodes.

kMsgType_NotifyResponse

A message generated in response to the download notify message.

Its payload is a nl::Weave::Profiles::StatusReporting::StatusReport with the additional status info drawn from SoftwareUpdateStatusCodes.

kMsgType_UpdateNotify

An optional message from the client to the server used to communicate the final status of the update.

Its payload is a nl::Weave::Profiles::StatusReporting::StatusReport with the additional status info drawn from SoftwareUpdateStatusCodes. As the message is expected to be generated post actual update, it is sent on a new ExchangeContext and is treated as an unsolicited message on the server.

@310

 @310

SoftwareUpdate profile-specific status codes.

Properties
kStatus_Abort

server => client, indicates that the client should give up since the server is out of options.

kStatus_DownloadFailed

client => server, indicates that an attempted download failed.

kStatus_IntegrityCheckFailed

client => server, indicates that an image was downloaded but it failed the subsequent integrity check.

kStatus_InvalidInstructions

client => server, indicates that the client was unable to download an image because the download instructions contained in the ImageQueryResponse, i.e.

URI, update scheme, update condition, were poorly formed or inconsistent.

kStatus_NoUpdateAvailable

server => client, indicates that an image query has been received and understood and that the server has no update for the client at this time.

kStatus_Retry

server => client, indicates that the client should submit another image query and restart/continue the update

kStatus_UpdateFailed

client => server, indicates that an attempt to install an image specified by the server has failed.

@311

 @311

Control flags for the control field of the ImageQuery frame.

Properties
kFlag_LocaleSpecPresent

Locale specification is present in the ImageQuery.

kFlag_PackageSpecPresent

Package specification is present in the ImageQuery.

kFlag_TargetNodeIdPresent

Target node ID is present in the ImageQuery.

@312

 @312

Bitmasks for the optional update options field of the ImageQueryResponse.

@313

 @313

Shift offsets for the optional update options field of the ImageQueryResponse.

@314

 @314

Integrity types supported by the SoftwareUpdate profile.

The image query frame contains information about which integrity checking the client supports and the image query response contains an integrity type and value for the image that the client is being instructed to download and install. The supported types are:

Properties
kIntegrityType_Last

Number of valid elements in the enumeration.

kIntegrityType_SHA160

160-bit Secure Hash, (SHA-1), required.

kIntegrityType_SHA256

256-bit Secure Hash (SHA-2).

kIntegrityType_SHA512

512-bit, Secure Hash (SHA-2).

@315

 @315

Lengths, in bytes, for the integrity specification byte-strings.

@316

 @316

Update schemes supported by the SofwareUpdate profile.

Similarly to the supported integrity types, the image query contains information about which update schemes, i.e. download protocols, the client supports, and the response contains a value for indicating the update scheme to use in downloading the images. The supported schemes are:

Properties
kUpdateScheme_BDX

Weave Bulk data transfer shall be used as the download protocol.

kUpdateScheme_HTTP

HTTP shall be used as the download protocol.

kUpdateScheme_HTTPS

HTTPS shall be used as the download protocol.

kUpdateScheme_Last

Number of valid elements in the enumeration.

kUpdateScheme_SFTP

SFTP shall be used as the download protocol.

@317

 @317

Data Element Tags for the SoftwareUpdate Profile.

UpdateCondition

 UpdateCondition

Conditions governing update policy.

Properties
IfLater

Download and install the image if the version specification in the response frame is later than the software version currently installed.

IfUnmatched

Download and install the image if the version specification in the response frame doesn't match the software version currently installed.

OnOptIn

download and install the image on some trigger provided by an on-site user.

Unconditionally

Download and install the image regardless of the currently running software version.

UpdatePriority

 UpdatePriority

Update priorities.

Properties
Critical

Update must be executed immediately.

Normal

Update may be execute at clients discretion.

Functions

integrityLength

int integrityLength(
  uint8_t aType
)

A support method mapping the IntegrityTypes values onto the lengths of the hashes of that type.

Details
Parameters
[in] aType
An IntegrityTypes value
Returns
Length of the hash of the provided hash type.