Skip to main content

imp.getsoftwareversion()

Returns the imp or agent’s firmware version as a string

Availability

Device + Agent

Returns

String — impOS™ version information

Description

This method returns the special version string of the imp firmware, or of the agent environment, depending on where it is called. The version string is human-readable (ie. contains no control characters) and is different for different releases. No other promises are made about the string’s format or content. For example, it is not the name, eg. “Release 14”, that is seen in the release notes, although there is a specific value of imp.getsoftwareversion() output that corresponds to the release number.

This value should be used only for informational purposes. If you wish to determine the presence — or absence — of specific hardware or software features, the recommended procedure is to test for the property’s presence in the imp object:

if ("info" in imp) {
    // Device is running firmware that supports the imp.info() method
}

You can use imp.environment() to determine whether your code is running on an agent or a device. Call imp.info() to determine on which type of imp the code is running.

Example Code

This example shows basic use of imp.getsoftwareversion() at agent and device levels.