Commit 3dcf7710c41aebc9a56c2c7e1ef110626f3aa18c
1 parent
d77b64a2
Exists in
master
and in
39 other branches
us ok
Showing
2 changed files
with
76 additions
and
3 deletions
Show diff stats
src/InputOutput/IHMImpl/Params/PlotImpl/IHMInputOutputParamsPlotClass.php
... | ... | @@ -584,9 +584,11 @@ class IHMInputOutputParamsPlotClass extends IHMInputOutputParamsAbstractClass |
584 | 584 | } |
585 | 585 | |
586 | 586 | $paramInfo['indexes'] = array(); |
587 | - | |
588 | - $this->paramManager->applyRangesAndIndexes($this->paramsData, $paramData, !$this->isInstantPlot, $paramInfo); | |
589 | - | |
587 | + if($paramData->{'param-drawing-type'} == 'sauvaud'){ | |
588 | + $this->paramManager->applyRangesAndIndexes($this->paramsData, $paramData, false, $paramInfo); | |
589 | + } else { | |
590 | + $this->paramManager->applyRangesAndIndexes($this->paramsData, $paramData, !$this->isInstantPlot, $paramInfo); | |
591 | + } | |
590 | 592 | $this->paramManager->applyFilter($this->paramsData, $paramData, $paramInfo); |
591 | 593 | |
592 | 594 | $requestParamsNode->addParam($paramInfo['id']); |
... | ... | @@ -610,6 +612,10 @@ class IHMInputOutputParamsPlotClass extends IHMInputOutputParamsAbstractClass |
610 | 612 | $paramNode = $plotNode->getParams()->getParamById($paramInfo['id']); |
611 | 613 | $this->unmarshallSpectro($paramData->{'param-drawing-object'}, $plotNode, $paramNode, $paramInfo['indexes']); |
612 | 614 | break; |
615 | + case 'sauvaud': | |
616 | + $paramNode = $plotNode->getParams()->getParamById($paramInfo['id']); | |
617 | + $this->unmarshallSauvaud($paramData->{'param-drawing-object'}, $plotNode, $paramNode, $paramInfo['indexes']); | |
618 | + break; | |
613 | 619 | case 'status-bar': |
614 | 620 | if (($plotNode->getName() == REQUESTOUTPUTPLOTELEMENTSTATUS_NAME) && !isset($statusPlotNode)) |
615 | 621 | $paramNode = $plotNode->getParams()->getParamById($paramInfo['id']); |
... | ... | @@ -906,6 +912,22 @@ class IHMInputOutputParamsPlotClass extends IHMInputOutputParamsAbstractClass |
906 | 912 | !isset($paramDrawingData->{REQUESTOUTPUTPLOTSPECTRO_BGS_DIM}) ? NULL : $paramDrawingData->{REQUESTOUTPUTPLOTSPECTRO_BGS_DIM} |
907 | 913 | ); |
908 | 914 | } |
915 | + protected function unmarshallSauvaud($paramDrawingData, $plotNode, $paramNode, $indexes) | |
916 | + { | |
917 | + $spectroNode = $paramNode->addSauvaud( | |
918 | + $paramDrawingData->{'spectro-yaxis'}, | |
919 | + empty($paramDrawingData->{'spectro-resolution'}) ? NULL : $paramDrawingData->{'spectro-resolution'}, | |
920 | + count($indexes) > 0 ? $indexes[0] : NULL, | |
921 | + $paramDrawingData->{'spectro-value-min'}, | |
922 | + $paramDrawingData->{'spectro-value-max'}, | |
923 | + isset($paramDrawingData->{'spectro-log0-as-min'}) ? $paramDrawingData->{'spectro-log0-as-min'} : false, | |
924 | + empty($paramDrawingData->{'spectro-normalization'}) ? NULL : $paramDrawingData->{'spectro-normalization'}, | |
925 | + empty($paramDrawingData->{REQUESTOUTPUTPLOTSPECTRO_BGS_TYPE}) ? NULL : $paramDrawingData->{REQUESTOUTPUTPLOTSPECTRO_BGS_TYPE}, | |
926 | + !isset($paramDrawingData->{REQUESTOUTPUTPLOTSPECTRO_BGS_VALUE}) ? NULL : $paramDrawingData->{REQUESTOUTPUTPLOTSPECTRO_BGS_VALUE}, | |
927 | + !isset($paramDrawingData->{REQUESTOUTPUTPLOTSPECTRO_BGS_DIM}) ? NULL : $paramDrawingData->{REQUESTOUTPUTPLOTSPECTRO_BGS_DIM}, | |
928 | + $paramDrawingData->{'right_dim'} | |
929 | + ); | |
930 | + } | |
909 | 931 | |
910 | 932 | protected function unmarshallInstantSpectro($paramDrawingData, $plotNode, $paramNode, $indexes) |
911 | 933 | { | ... | ... |
src/Request/ParamsRequestImpl/Nodes/Requests/RequestOutputPlotParamsNodeClass.php
... | ... | @@ -20,6 +20,9 @@ define("REQUESTOUTPUTPLOTCOLORSERIE_NAME", "colorserie"); |
20 | 20 | define("REQUESTOUTPUTPLOTCOLORSERIE_ID", "id"); |
21 | 21 | define("REQUESTOUTPUTPLOTCOLORSERIE_INDEX", "index"); |
22 | 22 | |
23 | +define("REQUESTOUTPUTPLOTSAUVAUD_NAME", "sauvaud"); | |
24 | +define("REQUESTOUTPUTPLOTSAUVAUD_RIGHT_DIM", "right_dim"); | |
25 | + | |
23 | 26 | define("REQUESTOUTPUTPLOTSPECTRO_NAME", "spectro"); |
24 | 27 | define("REQUESTOUTPUTPLOTSPECTRO_YAXIS", "yAxis"); |
25 | 28 | define("REQUESTOUTPUTPLOTSPECTRO_INDEX", "index"); |
... | ... | @@ -150,6 +153,44 @@ class RequestOutputPlotParamNodeClass extends NodeClass |
150 | 153 | $this->addChild($spectroNode); |
151 | 154 | return $spectroNode; |
152 | 155 | } |
156 | + public function addSauvaud( | |
157 | + $yAxis = "", | |
158 | + $resolution = "", | |
159 | + $index = NULL, | |
160 | + $min = NULL, | |
161 | + $max = NULL, | |
162 | + $uselog0asmin = FALSE, | |
163 | + $normalization = NULL, | |
164 | + $bgs_type = NULL, | |
165 | + $bgs_value = NULL, | |
166 | + $bgs_dim = NULL, | |
167 | + $rightDim = NULL | |
168 | + ) { | |
169 | + $sauvaudNode = new NodeClass(REQUESTOUTPUTPLOTSAUVAUD_NAME); | |
170 | + $sauvaudNode->setAttribute(REQUESTOUTPUTPLOTSPECTRO_YAXIS, $yAxis); | |
171 | + $sauvaudNode->setAttribute(REQUESTOUTPUTPLOTSPECTRO_USELOG0ASMIN, $uselog0asmin ? "true" : "false"); | |
172 | + if (isset($resolution)) | |
173 | + $sauvaudNode->setAttribute(REQUESTOUTPUTPLOTSPECTRO_RESOLUTION, $resolution); | |
174 | + if (isset($normalization)) | |
175 | + $sauvaudNode->setAttribute(REQUESTOUTPUTPLOTSPECTRO_NORMALISATION, $normalization); | |
176 | + if (isset($bgs_type)) | |
177 | + $sauvaudNode->setAttribute(REQUESTOUTPUTPLOTSPECTRO_BGS_TYPE, $bgs_type); | |
178 | + if (isset($bgs_value)) | |
179 | + $sauvaudNode->setAttribute(REQUESTOUTPUTPLOTSPECTRO_BGS_VALUE, $bgs_value); | |
180 | + if (isset($bgs_dim)) | |
181 | + $sauvaudNode->setAttribute(REQUESTOUTPUTPLOTSPECTRO_BGS_DIM, $bgs_dim); | |
182 | + if (isset($index)) | |
183 | + $sauvaudNode->setAttribute(REQUESTOUTPUTPLOTSPECTRO_INDEX, $index); | |
184 | + if (isset($min)) | |
185 | + $sauvaudNode->setAttribute(REQUESTOUTPUTPLOTSPECTRO_MIN, $min); | |
186 | + if (isset($max)) | |
187 | + $sauvaudNode->setAttribute(REQUESTOUTPUTPLOTSPECTRO_MAX, $max); | |
188 | + if(isset($rightDim)) | |
189 | + $sauvaudNode->setAttribute(REQUESTOUTPUTPLOTSAUVAUD_RIGHT_DIM, $rightDim); | |
190 | + $this->addChild($sauvaudNode); | |
191 | + return $sauvaudNode; | |
192 | + } | |
193 | + | |
153 | 194 | |
154 | 195 | public function addInstantSpectro($yAxis, $dimOnXAxis, $index = NULL, $min = NULL, $max = NULL) |
155 | 196 | { |
... | ... | @@ -243,6 +284,16 @@ class RequestOutputPlotParamNodeClass extends NodeClass |
243 | 284 | $uselog0asmin = $this->getXmlNodeAttribute($plottypeXmlNode, REQUESTOUTPUTPLOTSPECTRO_USELOG0ASMIN) == "true"; |
244 | 285 | $node = $this->addSpectro($yAxis, $resolution, $index, $min, $max, $uselog0asmin); |
245 | 286 | break; |
287 | + case REQUESTOUTPUTPLOTSAUVAUD_NAME: | |
288 | + $yAxis = $this->getXmlNodeAttribute($plottypeXmlNode, REQUESTOUTPUTPLOTSPECTRO_YAXIS); | |
289 | + $index = $this->getXmlNodeAttribute($plottypeXmlNode, REQUESTOUTPUTPLOTSPECTRO_INDEX); | |
290 | + $min = $this->getXmlNodeAttribute($plottypeXmlNode, REQUESTOUTPUTPLOTSPECTRO_MIN); | |
291 | + $max = $this->getXmlNodeAttribute($plottypeXmlNode, REQUESTOUTPUTPLOTSPECTRO_MAX); | |
292 | + $resolution = $this->getXmlNodeAttribute($plottypeXmlNode, REQUESTOUTPUTPLOTSPECTRO_RESOLUTION); | |
293 | + $uselog0asmin = $this->getXmlNodeAttribute($plottypeXmlNode, REQUESTOUTPUTPLOTSPECTRO_USELOG0ASMIN) == "true"; | |
294 | + $rightDim = $this->getXmlNodeAttribute($plottypeXmlNode, REQUESTOUTPUTPLOTSAUVAUD_RIGHT_DIM); | |
295 | + $node = $this->addSauvaud($yAxis, $resolution, $index, $min, $max, $uselog0asmin, $rightDim); | |
296 | + break; | |
246 | 297 | case REQUESTOUTPUTPLOTXSERIE_NAME: |
247 | 298 | $xAxis = $this->getXmlNodeAttribute($plottypeXmlNode, REQUESTOUTPUTPLOTXSERIE_XAXIS); |
248 | 299 | $index = $this->getXmlNodeAttribute($plottypeXmlNode, REQUESTOUTPUTPLOTXSERIE_INDEX); | ... | ... |