Commit 8267bc850ada5908e1cbbae5d078ee66e5dc7edf
Exists in
master
and in
66 other branches
Merge branch 'master' of https://gitlab.irap.omp.eu/CDPP/AMDA_Integration
Showing
2 changed files
with
29 additions
and
0 deletions
Show diff stats
src/InputOutput/IHMImpl/Params/PlotImpl/IHMInputOutputParamsPlotClass.php
@@ -742,6 +742,10 @@ class IHMInputOutputParamsPlotClass extends IHMInputOutputParamsAbstractClass | @@ -742,6 +742,10 @@ class IHMInputOutputParamsPlotClass extends IHMInputOutputParamsAbstractClass | ||
742 | $paramNode = $plotNode->getParams()->getParamById($paramInfo['id']); | 742 | $paramNode = $plotNode->getParams()->getParamById($paramInfo['id']); |
743 | $this->unmarshallInstantSerie($paramData->{'param-drawing-object'}, $plotNode, $paramNode); | 743 | $this->unmarshallInstantSerie($paramData->{'param-drawing-object'}, $plotNode, $paramNode); |
744 | break; | 744 | break; |
745 | + case 'ispectro' : | ||
746 | + $paramNode = $plotNode->getParams()->getParamById($paramInfo['id']); | ||
747 | + $this->unmarshallInstantSpectro($paramData->{'param-drawing-object'}, $plotNode, $paramNode, $paramInfo['indexes']); | ||
748 | + break; | ||
745 | default : | 749 | default : |
746 | throw new Exception('Drawing type not implemented.'); | 750 | throw new Exception('Drawing type not implemented.'); |
747 | } | 751 | } |
@@ -1016,6 +1020,12 @@ class IHMInputOutputParamsPlotClass extends IHMInputOutputParamsAbstractClass | @@ -1016,6 +1020,12 @@ class IHMInputOutputParamsPlotClass extends IHMInputOutputParamsAbstractClass | ||
1016 | $spectroNode = $paramNode->addSpectro($paramDrawingData->{'spectro-yaxis'}, count($indexes) > 0 ? $indexes[0] : NULL, $paramDrawingData->{'spectro-value-min'}, $paramDrawingData->{'spectro-value-max'}); | 1020 | $spectroNode = $paramNode->addSpectro($paramDrawingData->{'spectro-yaxis'}, count($indexes) > 0 ? $indexes[0] : NULL, $paramDrawingData->{'spectro-value-min'}, $paramDrawingData->{'spectro-value-max'}); |
1017 | } | 1021 | } |
1018 | 1022 | ||
1023 | + protected function unmarshallInstantSpectro($paramDrawingData, $plotNode, $paramNode, $indexes) | ||
1024 | + { | ||
1025 | + //TBD how to process inexes if they are defined ? | ||
1026 | + $spectroNode = $paramNode->addInstantSpectro(REQUESTOUTPUTPLOTELEMENTXY_XAXISID, 'y-left', $paramDrawingData->{'ispectro-dimonxaxis'}); | ||
1027 | + } | ||
1028 | + | ||
1019 | protected function unmarshallStatusBar($paramDrawingData, $paramNode, $indexes) | 1029 | protected function unmarshallStatusBar($paramDrawingData, $paramNode, $indexes) |
1020 | { | 1030 | { |
1021 | if (count($indexes) == 0) | 1031 | if (count($indexes) == 0) |
src/Request/ParamsRequestImpl/Nodes/Requests/RequestOutputPlotParamsNodeClass.php
@@ -25,6 +25,10 @@ define ("REQUESTOUTPUTPLOTSPECTRO_INDEX", "index"); | @@ -25,6 +25,10 @@ define ("REQUESTOUTPUTPLOTSPECTRO_INDEX", "index"); | ||
25 | define ("REQUESTOUTPUTPLOTSPECTRO_MIN", "min"); | 25 | define ("REQUESTOUTPUTPLOTSPECTRO_MIN", "min"); |
26 | define ("REQUESTOUTPUTPLOTSPECTRO_MAX", "max"); | 26 | define ("REQUESTOUTPUTPLOTSPECTRO_MAX", "max"); |
27 | 27 | ||
28 | +define ("REQUESTOUTPUTPLOTINSTANTSPECTRO_NAME", "ispectro"); | ||
29 | +define ("REQUESTOUTPUTPLOTINSTANTSPECTRO_XAXIS", "xAxis"); | ||
30 | +define ("REQUESTOUTPUTPLOTINSTANTSPECTRO_DIMONXAXIS", "dimOnXAxis"); | ||
31 | + | ||
28 | define ("REQUESTOUTPUTPLOTSTATUSBAR_NAME", "serie"); | 32 | define ("REQUESTOUTPUTPLOTSTATUSBAR_NAME", "serie"); |
29 | define ("REQUESTOUTPUTPLOTSTATUSBAR_INDEX", "index"); | 33 | define ("REQUESTOUTPUTPLOTSTATUSBAR_INDEX", "index"); |
30 | 34 | ||
@@ -109,6 +113,21 @@ class RequestOutputPlotParamNodeClass extends NodeClass | @@ -109,6 +113,21 @@ class RequestOutputPlotParamNodeClass extends NodeClass | ||
109 | $this->addChild($spectroNode); | 113 | $this->addChild($spectroNode); |
110 | return $spectroNode; | 114 | return $spectroNode; |
111 | } | 115 | } |
116 | + | ||
117 | + public function addInstantSpectro($xAxis, $yAxis, $dimOnXAxis, $index = NULL, $min = NULL, $max = NULL) | ||
118 | + { | ||
119 | + $ispectroNode = new NodeClass(REQUESTOUTPUTPLOTINSTANTSPECTRO_NAME); | ||
120 | + $ispectroNode->setAttribute(REQUESTOUTPUTPLOTINSTANTSPECTRO_XAXIS, $xAxis); | ||
121 | + $ispectroNode->setAttribute(REQUESTOUTPUTPLOTSPECTRO_YAXIS, $yAxis); | ||
122 | + $ispectroNode->setAttribute(REQUESTOUTPUTPLOTINSTANTSPECTRO_DIMONXAXIS, $dimOnXAxis); | ||
123 | + | ||
124 | + if (isset($min)) | ||
125 | + $ispectroNode->setAttribute(REQUESTOUTPUTPLOTSPECTRO_MIN, $min); | ||
126 | + if (isset($max)) | ||
127 | + $ispectroNode->setAttribute(REQUESTOUTPUTPLOTSPECTRO_MAX, $max); | ||
128 | + $this->addChild($ispectroNode); | ||
129 | + return $ispectroNode; | ||
130 | + } | ||
112 | 131 | ||
113 | public function addXSerie($xAxis = "", $index = -1, $min = NULL, $max = NULL) | 132 | public function addXSerie($xAxis = "", $index = -1, $min = NULL, $max = NULL) |
114 | { | 133 | { |