SoftBank Robotics documentation What's new in NAOqi 2.8?

PackageManager API

NAOqi Core - Overview | API


Namespace : qi

PackageManager does not have yet a specialized proxy.

Methods

bool PackageManager::install(const std::string& path)

Install a package from a path.

Parameters:
  • path – The path to the package file.
bool PackageManager::installCheckMd5(const std::string& path, const std::string& md5)

Check for md5 compatibility then, if successful, install the package from a path.

Parameters:
  • path – The path to the package file.
  • md5 – The hash of the package file.
void PackageManager::removePkg(const std::string& uuid)

Remove a package with his uuid. Throw if no package has this uuid.

Parameters:
  • uuid – The uid of the package to remove.
bool PackageManager::hasPackage(const std::string& uuid)

Check for existence of a package with his uuid.

Parameters:
  • uuid – The uid of the package to look for.
std::vector<qi::PackageInfo2> PackageManager::packages2()

Get the list of all installed packages.

qi::PackageInfo2 PackageManager::package2(const std::string& uuid)

Get a package with his uuid. Throw if no package has this uuid.

Parameters:
  • uuid – The uid of the package.
qi::PackageInfoList PackageManager::packages()

Get the list of all installed packages. With this function you cannot access to new created fields.

qi::PackageInfo PackageManager::package(const std::string& uuid)

Get a package with his uuid. Throw if no package has this uuid. With this function you cannot access to new created fields.

Parameters:
  • uuid – The uid of the package.
std::string PackageManager::packageIcon(const std::string& uuid)

Get the icon of the package specified by this uuid.

Parameters:
  • uuid – The uid of the package.
Returns:

a string which is a bytearray of a png image.

AL::ALValue PackageManager::getPackage(const std::string& uuid)

Deprecated since version 1.22: Please use PackageManager::package instead

Get a package with his uuid. Throw if no package has this uuid. With this function you cannot access to new created fields.

Parameters:
  • uuid – The uid of the package.
AL::ALValue PackageManager::getPackages()

Deprecated since version 1.22: Please use PackageManager::packages instead

Get the list of all installed packages. With this function you cannot access to new created fields.

AL::ALValue PackageManager::getPackageIcon(const std::string& uuid)

Deprecated since version 1.22: Please use PackageManager::packageIcon instead.

Get the icon of the package specified by this uuid.

Parameters:
  • uuid – The uid of the package.

Javascript sample

function LoadPackageIcon(uuid) {
    qi_package.getPackageIcon(uuid).then(function(buff){
    var bytes = new Uint8Array(buff);
    var iblob = new Blob([bytes.buffer]);
    var image = document.getElementById('PkgIcn'+uuid);
    var reader = new FileReader();
    reader.onload = function(e) {
        image.src = e.target.result;
    };
    reader.readAsDataURL(iblob);
    },function(error){AddLog('Unable to get Package Icon', true);});
}

Signals

qi::Signal<qi::PackageInfo2> PackageManager::onPackageInstalled2

Signal emitted after a package has been installed.

qi::Signal<qi::PackageInfo2> PackageManager::onPackageRemoved2

Signal emitted after a package has been removed.

qi::Signal<qi::PackageInfo> PackageManager::onPackageInstalled

Signal emitted after a package has been installed.

qi::Signal<qi::PackageInfo> PackageManager::onPackageRemoved

Signal emitted after a package has been removed.

qi::Signal<qi::PackageInfo> PackageManager::packageInstalled

Deprecated since version 1.22: Please use PackageManager::onPackageInstalled instead

Signal emitted after a package has been installed.

qi::Signal<qi::PackageInfo> PackageManager::packageRemoved

Deprecated since version 1.22: Please use PackageManager::onPackageRemoved instead

Signal emitted after a package has been removed.