Blame view

src/DATA/MANAGER/AddLocalVI.php 1.16 KB
531fafe7   Benjamin Renard   Install AddLocalV...
1
2
3
4
<?php

/**
*  @file AddLocalVI.php
34cd00b5   Elena.Budnik   new DATAMANAGER
5
*  @version 
531fafe7   Benjamin Renard   Install AddLocalV...
6
7
8
9
*  @brief DD Server Tools: 
*  @arg    
*/

34cd00b5   Elena.Budnik   new DATAMANAGER
10
11
12
13
14
15
16
17
18
19
	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")); 
531fafe7   Benjamin Renard   Install AddLocalV...
20
21
22
23

/*
*  DEFINITIONS TO FILL
*/
34cd00b5   Elena.Budnik   new DATAMANAGER
24
25
26
27
28
29
30
31
   $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
531fafe7   Benjamin Renard   Install AddLocalV...
32
33
34
/*
*  DO NOT TOUCH
*/
34cd00b5   Elena.Budnik   new DATAMANAGER
35
36
   $base = "LOCAL";
	$baseMgr = new DDBaseMgr();
531fafe7   Benjamin Renard   Install AddLocalV...
37

34cd00b5   Elena.Budnik   new DATAMANAGER
38
	if ($baseMgr->viExists($ViId, $base)) die("$ViId Already Exists!!!".PHP_EOL);
531fafe7   Benjamin Renard   Install AddLocalV...
39

34cd00b5   Elena.Budnik   new DATAMANAGER
40
41
42
43
44
	$baseMgr->setViId($ViId);
	$baseMgr->setViInfo($brief);
	$baseMgr->setViParentsInfo($base, $mission, $instrument);
	$baseMgr->setViLocation($mission_dir, $location);
	$baseMgr->setViSampling($min_sampling, $max_sampling);
531fafe7   Benjamin Renard   Install AddLocalV...
45

34cd00b5   Elena.Budnik   new DATAMANAGER
46
47
	$baseMgr->createVi();
		 
531fafe7   Benjamin Renard   Install AddLocalV...
48
?>