Commit 2f2f6cee2b4b3c4933381c0b6e4949d24104e52a
1 parent
1faf036d
Exists in
master
and in
9 other branches
FillValue by default
Showing
2 changed files
with
8 additions
and
3 deletions
Show diff stats
src/DATA/MANAGER/DDBaseMgr.php
@@ -12,7 +12,7 @@ class DDBaseMgr | @@ -12,7 +12,7 @@ class DDBaseMgr | ||
12 | private $ViId, $remoteViId; | 12 | private $ViId, $remoteViId; |
13 | private $DDsysDoc, $DDsys; | 13 | private $DDsysDoc, $DDsys; |
14 | private $base, $mission, $instrument; | 14 | private $base, $mission, $instrument; |
15 | - private $min_sampling, $max_sampling; | 15 | + private $min_sampling, $max_sampling, $fillValue = null; |
16 | public $location, $ViDir; | 16 | public $location, $ViDir; |
17 | public $globalStart = null, $globalStop = null; | 17 | public $globalStart = null, $globalStop = null; |
18 | 18 | ||
@@ -74,6 +74,7 @@ class DDBaseMgr | @@ -74,6 +74,7 @@ class DDBaseMgr | ||
74 | 74 | ||
75 | if (!$infoXml->load($infoXmlFile)) | 75 | if (!$infoXml->load($infoXmlFile)) |
76 | return -10; | 76 | return -10; |
77 | + | ||
77 | $this->base = $base; | 78 | $this->base = $base; |
78 | $this->mission = $infoXml->getElementsByTagName("Mission")->item(0)->nodeValue; | 79 | $this->mission = $infoXml->getElementsByTagName("Mission")->item(0)->nodeValue; |
79 | $this->instrument = $infoXml->getElementsByTagName("Instrument")->item(0)->nodeValue; | 80 | $this->instrument = $infoXml->getElementsByTagName("Instrument")->item(0)->nodeValue; |
@@ -81,7 +82,9 @@ class DDBaseMgr | @@ -81,7 +82,9 @@ class DDBaseMgr | ||
81 | $this->remoteViId = $ds; | 82 | $this->remoteViId = $ds; |
82 | $this->globalStart = $infoXml->getElementsByTagName("GlobalStart")->item(0)->nodeValue; | 83 | $this->globalStart = $infoXml->getElementsByTagName("GlobalStart")->item(0)->nodeValue; |
83 | $this->globalStop = $infoXml->getElementsByTagName("GlobalStop")->item(0)->nodeValue; | 84 | $this->globalStop = $infoXml->getElementsByTagName("GlobalStop")->item(0)->nodeValue; |
84 | - | 85 | + $fillValue = $infoXml->getElementsByTagName("FillValue"); |
86 | + if ($fillValue->length > 0) $this->fillValue = $fillValue->item(0)->nodeValue; | ||
87 | + | ||
85 | $this->location = getenv("DDBASE")."/".$this->base."/".strtoupper($this->ViId)."/"; | 88 | $this->location = getenv("DDBASE")."/".$this->base."/".strtoupper($this->ViId)."/"; |
86 | $this->ViDir = $this->location; | 89 | $this->ViDir = $this->location; |
87 | //--------- Check if additional Info should be added to VI | 90 | //--------- Check if additional Info should be added to VI |
@@ -172,6 +175,8 @@ class DDBaseMgr | @@ -172,6 +175,8 @@ class DDBaseMgr | ||
172 | $rootElement->appendChild($xml_dom->createElement("MinSampling", $this->min_sampling)); | 175 | $rootElement->appendChild($xml_dom->createElement("MinSampling", $this->min_sampling)); |
173 | if ($this->max_sampling > $this->min_sampling) | 176 | if ($this->max_sampling > $this->min_sampling) |
174 | $rootElement->appendChild($xml_dom->createElement("MaxSampling", $this->max_sampling)); | 177 | $rootElement->appendChild($xml_dom->createElement("MaxSampling", $this->max_sampling)); |
178 | + if ($this->fillValue) | ||
179 | + $rootElement->appendChild($xml_dom->createElement("FillValue", $this->fillValue)); | ||
175 | $rootElement->appendChild($xml_dom->createElement("LocalStart")); | 180 | $rootElement->appendChild($xml_dom->createElement("LocalStart")); |
176 | $rootElement->appendChild($xml_dom->createElement("LocalStop")); | 181 | $rootElement->appendChild($xml_dom->createElement("LocalStop")); |
177 | $xml_dom->appendChild($rootElement); | 182 | $xml_dom->appendChild($rootElement); |
src/REMOTEDATA/CDAWEB.php
@@ -351,7 +351,7 @@ class CDAWEB extends RemoteDataCenterClass | @@ -351,7 +351,7 @@ class CDAWEB extends RemoteDataCenterClass | ||
351 | $rootNode->appendChild($this->DDserverXml->createElement("GlobalStop")); | 351 | $rootNode->appendChild($this->DDserverXml->createElement("GlobalStop")); |
352 | $rootNode->appendChild($this->DDserverXml->createElement("MinSampling")); | 352 | $rootNode->appendChild($this->DDserverXml->createElement("MinSampling")); |
353 | // fill value by default - if different - add into param description | 353 | // fill value by default - if different - add into param description |
354 | - $rootNode->appendChild($this->DDserverXml->createElement("FillValue"), -1.0E31); | 354 | + $rootNode->appendChild($this->DDserverXml->createElement("FillValue", -1.0E31)); |
355 | } | 355 | } |
356 | 356 | ||
357 | protected function updateDDServerXml($target, $value) | 357 | protected function updateDDServerXml($target, $value) |