Commit 91e7647e6509964e779fd4be456a16271e090c2d
1 parent
8b185bf5
Exists in
9084
Integration is now capable to send the fillValue to the kernel
Showing
6 changed files
with
37 additions
and
12 deletions
Show diff stats
src/InputOutput/IHMImpl/Params/DataMiningImpl/IHMInputOutputParamsDataMiningClass.php
@@ -42,7 +42,13 @@ class IHMInputOutputParamsDataMiningClass extends IHMInputOutputParamsAbstractCl | @@ -42,7 +42,13 @@ class IHMInputOutputParamsDataMiningClass extends IHMInputOutputParamsAbstractCl | ||
42 | //create a derived param for the expression | 42 | //create a derived param for the expression |
43 | $this->paramManager->addProcessParam($paramId, $expressionInfo["expression"], $input->expression, | 43 | $this->paramManager->addProcessParam($paramId, $expressionInfo["expression"], $input->expression, |
44 | $expressionInfo['params'], $input->sampling_mode, $input->sampling, $input->reference_param, | 44 | $expressionInfo['params'], $input->sampling_mode, $input->sampling, $input->reference_param, |
45 | - $input->gap,time(),"","",$this->paramsData); | 45 | + $input->gap, |
46 | + time(), | ||
47 | + "", | ||
48 | + "", | ||
49 | + "", | ||
50 | + $this->paramsData | ||
51 | + ); | ||
46 | 52 | ||
47 | //add derived param to output | 53 | //add derived param to output |
48 | $paramsNode->addParam($paramId); | 54 | $paramsNode->addParam($paramId); |
src/InputOutput/IHMImpl/Params/GenInfoParamImpl/IHMInputOutputParamsInfoGeneratorClass.php
@@ -18,7 +18,7 @@ class IHMInputOutputParamsInfoGeneratorClass extends IHMInputOutputParamsAbstrac | @@ -18,7 +18,7 @@ class IHMInputOutputParamsInfoGeneratorClass extends IHMInputOutputParamsAbstrac | ||
18 | 18 | ||
19 | $this->paramsData->setBatchEnable(FALSE); | 19 | $this->paramsData->setBatchEnable(FALSE); |
20 | 20 | ||
21 | - $this->paramManager->addGeneratedParam($input->paramId, $input->buildchain, $input->sampling_mode, $input->timestep, $input->reference_param, $this->paramsData); | 21 | + $this->paramManager->addGeneratedParam($input->paramId, $input->buildchain, $input->sampling_mode, $input->timestep, $input->reference_param, $input->fill_value, $this->paramsData); |
22 | 22 | ||
23 | return $this->paramsData; | 23 | return $this->paramsData; |
24 | } | 24 | } |
src/InputOutput/IHMImpl/Tools/IHMParamManagerClass.php
@@ -22,7 +22,7 @@ class IHMParamManagerClass | @@ -22,7 +22,7 @@ class IHMParamManagerClass | ||
22 | $this->cacheExpressionParser = array(); | 22 | $this->cacheExpressionParser = array(); |
23 | } | 23 | } |
24 | 24 | ||
25 | - public function addGeneratedParam($paramId, $expression, $sampling_mode, $sampling_step, $ref_param, $paramsData) | 25 | + public function addGeneratedParam($paramId, $expression, $sampling_mode, $sampling_step, $ref_param, $fillvalue, $paramsData) |
26 | { | 26 | { |
27 | $expressionInfo = $this->parseExpression($expression, $paramsData->getWorkingPath()); | 27 | $expressionInfo = $this->parseExpression($expression, $paramsData->getWorkingPath()); |
28 | if (!$expressionInfo['success']) { | 28 | if (!$expressionInfo['success']) { |
@@ -32,7 +32,13 @@ class IHMParamManagerClass | @@ -32,7 +32,13 @@ class IHMParamManagerClass | ||
32 | //create a process param for the derived parameter | 32 | //create a process param for the derived parameter |
33 | $this->addProcessParam($paramId, $expressionInfo["expression"], $expression, | 33 | $this->addProcessParam($paramId, $expressionInfo["expression"], $expression, |
34 | $expressionInfo['params'], $sampling_mode, $sampling_step, $ref_param, | 34 | $expressionInfo['params'], $sampling_mode, $sampling_step, $ref_param, |
35 | - 0, time(), "", "", $paramsData); | 35 | + 0, |
36 | + time(), | ||
37 | + "", | ||
38 | + "", | ||
39 | + $fillvalue, | ||
40 | + $paramsData | ||
41 | + ); | ||
36 | } | 42 | } |
37 | 43 | ||
38 | /* | 44 | /* |
@@ -54,9 +60,9 @@ class IHMParamManagerClass | @@ -54,9 +60,9 @@ class IHMParamManagerClass | ||
54 | /* | 60 | /* |
55 | * @brief Add a process parameter | 61 | * @brief Add a process parameter |
56 | */ | 62 | */ |
57 | - public function addProcessParam($paramId,$expression,$expression_info,$params, $sampling_mode, $sampling_step, $ref_param, $gap,$dateModif,$units,$ytitle,$paramsData) | 63 | + public function addProcessParam($paramId, $expression, $expression_info, $params, $sampling_mode, $sampling_step, $ref_param, $gap, $dateModif, $units, $ytitle, $fillvalue, $paramsData) |
58 | { | 64 | { |
59 | - $paramsData->addProcessParamToCreate($paramId, $expression, $expression_info, $params, $sampling_mode, $sampling_step, $ref_param, $gap,$dateModif, $units, $ytitle); | 65 | + $paramsData->addProcessParamToCreate($paramId, $expression, $expression_info, $params, $sampling_mode, $sampling_step, $ref_param, $gap, $dateModif, $units, $ytitle, $fillvalue); |
60 | 66 | ||
61 | foreach ($params as $param) { | 67 | foreach ($params as $param) { |
62 | $template_args = NULL; | 68 | $template_args = NULL; |
@@ -327,12 +333,15 @@ class IHMParamManagerClass | @@ -327,12 +333,15 @@ class IHMParamManagerClass | ||
327 | $res_split = $this->splitParamComponents($reference_param); | 333 | $res_split = $this->splitParamComponents($reference_param); |
328 | $reference_param = $res_split['param']; | 334 | $reference_param = $res_split['param']; |
329 | } | 335 | } |
330 | - | 336 | + |
331 | //create a process param for the derived parameter | 337 | //create a process param for the derived parameter |
332 | $this->addProcessParam($paramId, $expressionInfo["expression"], $res["param"]["expression"], | 338 | $this->addProcessParam($paramId, $expressionInfo["expression"], $res["param"]["expression"], |
333 | $expressionInfo['params'], $res["param"]["info"]["sampling_mode"], $res["param"]["info"]["timestep"], $reference_param, | 339 | $expressionInfo['params'], $res["param"]["info"]["sampling_mode"], $res["param"]["info"]["timestep"], $reference_param, |
334 | 0,$res["param"]["dateModif"],!empty($res["param"]["info"]["units"]) ? $res["param"]["info"]["units"] : "", | 340 | 0,$res["param"]["dateModif"],!empty($res["param"]["info"]["units"]) ? $res["param"]["info"]["units"] : "", |
335 | - !empty($res["param"]["info"]["yTitle"]) ? $res["param"]["info"]["yTitle"] : "", $paramsData); | 341 | + !empty($res["param"]["info"]["yTitle"]) ? $res["param"]["info"]["yTitle"] : "", |
342 | + $res["param"]["info"]["fill_value"], | ||
343 | + $paramsData | ||
344 | + ); | ||
336 | 345 | ||
337 | return array("id" => $paramId, "indexes" => $indexes, "calib_infos" => array()); | 346 | return array("id" => $paramId, "indexes" => $indexes, "calib_infos" => array()); |
338 | } | 347 | } |
src/InputOutput/IHMImpl/Tools/IHMUserParamManagerClass.php
@@ -19,6 +19,7 @@ class IHMUserParamManagerClass | @@ -19,6 +19,7 @@ class IHMUserParamManagerClass | ||
19 | //additional info for derived parameter | 19 | //additional info for derived parameter |
20 | private static $infoDerivedUnitsNode = 'units'; | 20 | private static $infoDerivedUnitsNode = 'units'; |
21 | private static $infoDerivedYTitleNode = 'ytitle'; | 21 | private static $infoDerivedYTitleNode = 'ytitle'; |
22 | + private static $infoDerivedFillValueNode = 'fill_value'; | ||
22 | private static $infoDerivedDescriptionNode = 'description'; | 23 | private static $infoDerivedDescriptionNode = 'description'; |
23 | private static $infoDerivedParsedExpNode = 'parsedExp'; | 24 | private static $infoDerivedParsedExpNode = 'parsedExp'; |
24 | private static $infoDerivedParsedExpValAtt = 'exp'; | 25 | private static $infoDerivedParsedExpValAtt = 'exp'; |
@@ -321,6 +322,12 @@ class IHMUserParamManagerClass | @@ -321,6 +322,12 @@ class IHMUserParamManagerClass | ||
321 | $result["yTitle"] = ""; | 322 | $result["yTitle"] = ""; |
322 | } | 323 | } |
323 | } | 324 | } |
325 | + | ||
326 | + //get parameter fill value | ||
327 | + $fillValueNodes = $dom->getElementsByTagName(self::$infoDerivedFillValueNode); | ||
328 | + if ($fillValueNodes->length > 0) { | ||
329 | + $result["fill_value"] = $fillValueNodes->item(0)->nodeValue; | ||
330 | + } | ||
324 | 331 | ||
325 | //get parameter description | 332 | //get parameter description |
326 | $descNodes = $dom->getElementsByTagName(self::$infoDerivedDescriptionNode); | 333 | $descNodes = $dom->getElementsByTagName(self::$infoDerivedDescriptionNode); |
src/Request/ParamsRequestImpl/ParamsRequestDataClass.php
@@ -140,14 +140,17 @@ class ParamsRequestDataClass extends ProcessRequestDataClass | @@ -140,14 +140,17 @@ class ParamsRequestDataClass extends ProcessRequestDataClass | ||
140 | { | 140 | { |
141 | $this->datasetId[] = $dsId; | 141 | $this->datasetId[] = $dsId; |
142 | } | 142 | } |
143 | - | ||
144 | - public function addProcessParamToCreate($paramId, $expression, $expression_info, $getParams, $sampling_mode, $sampling_step, $ref_param, $gap, $dateModif, $units, $ytitle) | 143 | + |
144 | + public function addProcessParamToCreate($paramId, $expression, $expression_info, $getParams, $sampling_mode, $sampling_step, $ref_param, $gap, $dateModif, $units, $ytitle, $fillvalue) | ||
145 | { | 145 | { |
146 | $newParam = new ParamNodeClass(); | 146 | $newParam = new ParamNodeClass(); |
147 | $newParam->setId($paramId); | 147 | $newParam->setId($paramId); |
148 | if (!empty($units)) { | 148 | if (!empty($units)) { |
149 | $newParam->getInfo()->setUnits($units); | 149 | $newParam->getInfo()->setUnits($units); |
150 | } | 150 | } |
151 | + if ($fillvalue != "") { | ||
152 | + $newParam->getInfo()->setFillVal($fillvalue); | ||
153 | + } | ||
151 | if (!empty($ytitle)) { | 154 | if (!empty($ytitle)) { |
152 | $newParam->getInfo()->setShortName($ytitle); | 155 | $newParam->getInfo()->setShortName($ytitle); |
153 | } | 156 | } |
src/Request/ProcessRequestImpl/Process/ProcessClass.php
@@ -280,8 +280,8 @@ class ProcessClass | @@ -280,8 +280,8 @@ class ProcessClass | ||
280 | if (!chdir($this->runningPath)) | 280 | if (!chdir($this->runningPath)) |
281 | return false; | 281 | return false; |
282 | 282 | ||
283 | - if (!$keep_log && file_exists($this->outputFile)) | ||
284 | - unlink($this->outputFile); | 283 | + //if (!$keep_log && file_exists($this->outputFile)) |
284 | + // unlink($this->outputFile); | ||
285 | 285 | ||
286 | if (file_exists($this->exitCodeFile)) | 286 | if (file_exists($this->exitCodeFile)) |
287 | unlink($this->exitCodeFile); | 287 | unlink($this->exitCodeFile); |