bool SensorUpdater::sensorDownloadTo(REPOS &repo, const std::string path, const VersionList& requestedVersionList) { VersionList list; VersionList currentList; if(!getUpdateList(&list, requestedVersionList, repo)) { return false; } if(!downloadPackagesToPath(list, path)) { return false; } return true; }
/* remove all old packages and install the newest/given version of all packages in the repo which are mandatory */ bool SensorUpdater::sensorUpdate(REPOS &repo, const VersionList& requestedVersionList) { VersionList list; VersionList currentList; std::string localPath = std::string("/tmp/"); if(!getVersionInstalled(¤tList)) { std::cout << "No ViSensor packages were installed on the sensor. Please check your settings or flash your sensor manualy" << std::endl; return false; } if(!checkRepo(repo)) { return false; } if(!getUpdateList(&list, requestedVersionList, repo)) { return false; } if(!downloadPackagesToPath(list, localPath)) { return false; } if (!checkCalibrationConvertion(currentList, list)) { return false; } if(!sensorClean()) { return false; } // update to newest version if(!installPackagesFromPath(list, localPath)) { return false; } return true; }
void Mouth::onAddedToParent() { assertDbg(getUpdateList() && "update list should be available to the body at this time"); getUpdateList()->add(this); }
void Mouth::die() { if (getUpdateList()) getUpdateList()->remove(this); physBody_.onCollision.remove(onCollisionEventHandle); physBody_.collisionEventMask_ = 0; }