SCM Packages
When using ThingWorx Software Content Management (SCM), you can add a script file to a package. When the package is deployed, the script file is sent to one or more devices and executed. For example, developers can write scripts that, when executed on devices, update the firmware on those devices. The SCM utility that is available on the PTC Support portal enables you to create, search for, test, publish, and deploy SCM packages.
The type of package that you can use with the ThingWorx C SDK is file-based package. These packages include a script file that contains installation instructions. All devices using the C SDK with the SCM extension support setting a time to both download and deploy.
* 
While instruction-based packages are also possible in the SCM utility, they are NOT currently supported by the SCM Edge Extension for the C SDK.
Package States Supported by the SCM Edge Extension
The SCM extension provides state definitions that can be exposed in a user interface so that users can monitor the progress of a package and identify in what stage of the process a package failed. The enumerated states are converted to strings for use in the SCM user interface. The following table lists and briefly describes the supported states:
SCM State Definitions
State
Static Variable
Description
created
TW_SWUPDATE_CREATED
The software update job has been created.
notified
TW_SWUPDATE_NOTIFIED
A message has been sent to the platform to say that the device is ready to receive the installation package.
waitForDownload
TW_SWUPDATE_WAIT_FOR_DOWNLOAD
The package is ready to be downloaded, and the device is waiting for it to arrive.
aborted
TW_SWUPDATE_ABORTED
The user who deployed the package aborted the operation.
startDownloading
TW_SWUPDATE_START_DOWNLOAD
The transfer of the package from the platform to the device has started.
downloading
TW_SWUPDATE_DOWNLOADING
The transfer of the package from the platform to the device is underway.
downloaded
TW_SWUPDATE_DOWNLOADED
The transfer of the package from the platform to the device is complete.
waitForInstall
TW_SWUPDATE_WAIT_FOR_INSTALL_COMMANDTW_SWUPDATE_WAIT_FOR_INSTALL_DATETIME
The package is waiting on the device for the installation to begin.
installing
TW_SWUPDATE_INSTALLING
The content of the package (typically a script file) is being installed on the device.
completed
TW_SWUPDATE_COMPLETED
The installation is complete. If the package contained a script file, this state also indicates that the script has been run.
failed
TW_SWUPDATE_FAILED
The package operations failed.
done
TW_SWUPDATE_DONE
For information about state transitions during package processing, refer to SCM State Transitions.
Was this helpful?