brief) || !isset($json_obj->ViId) || !isset($json_obj->mission) || !isset($json_obj->instrument) || !isset($json_obj->mission_dir) || !isset($json_obj->location) || !isset($json_obj->min_sampling)) { echo "[ERROR] Missing some required arguments in json file: ".$json_file.PHP_EOL; exit(1); } $brief = $json_obj->brief; $ViId = $json_obj->ViId; $mission = $json_obj->mission; $instrument = $json_obj->instrument; $mission_dir = $json_obj->mission_dir; $location = $json_obj->location; $min_sampling = $json_obj->min_sampling; $max_sampling = isset($json_obj->max_sampling) ? $json_obj->max_sampling : 0; } $base = "LOCAL"; $baseMgr = new DDBaseMgr(); if ($baseMgr->viExists($ViId, $base)) die("$ViId Already Exists!!!".PHP_EOL); $baseMgr->setViId($ViId); $baseMgr->setViInfo($brief); $baseMgr->setViParentsInfo($base, $mission, $instrument); $baseMgr->setViLocation($mission_dir, $location); $baseMgr->setViSampling($min_sampling, $max_sampling); $baseMgr->createVi(); ?>