AddLocalVI.php
1.16 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
<?php
/**
* @file AddLocalVI.php
* @version
* @brief DD Server Tools:
* @arg
*/
if (!function_exists('__autoload'))
{
function __autoload($class_name) {
require_once $class_name . '.php';
}
}
putenv("LD_LIBRARY_PATH=".getenv("LD_LIBRARY_PATH"));
putenv("PATH=./:".getenv("DDBASEBIN").":/bin:/usr/bin");
set_include_path("./:".getenv("DATAMANAGER").":".getenv("REMOTEDATA").":".getenv("CALLEXT"));
/*
* DEFINITIONS TO FILL
*/
$brief = "jedi"; // prefix $argv[1]
$ViId = "juno_jedi_i180"; // $argv[2]
$mission = "JUNO"; // $argv[3]
$instrument= "JEDI"; // $argv[4]
$mission_dir = "JUNO/"; // $argv[5]
$location = "JEDI/I_180"; // $argv[6]
$min_sampling = 2;// $argv[7]
$max_sampling = 3;// $argv[8] // 0 if constant sampling
/*
* DO NOT TOUCH
*/
$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();
?>