Commit 044a93058a4ace94f28b7417f4bf830d210bee15

Authored by Benjamin Renard
1 parent 52c1e291

Add intervals drawing type

src/InputOutput/IHMImpl/Params/PlotImpl/IHMInputOutputParamsPlotClass.php
... ... @@ -720,7 +720,11 @@ class IHMInputOutputParamsPlotClass extends IHMInputOutputParamsAbstractClass
720 720 case 'ispectro' :
721 721 $paramNode = $plotNode->getParams()->getParamById($paramInfo['id']);
722 722 $this->unmarshallInstantSpectro($paramData->{'param-drawing-object'}, $plotNode, $paramNode, $paramInfo['indexes']);
723   - break;
  723 + break;
  724 + case 'intervals' :
  725 + $paramNode = $plotNode->getParams()->getParamById($paramInfo['id']);
  726 + $this->unmarshallIntervals($paramData->{'param-drawing-object'}, $paramNode);
  727 + break;
724 728 default :
725 729 throw new Exception('Drawing type not implemented.');
726 730 }
... ... @@ -1012,6 +1016,11 @@ class IHMInputOutputParamsPlotClass extends IHMInputOutputParamsAbstractClass
1012 1016 foreach ($indexes as $index)
1013 1017 $paramNode->addStatusBar($index);
1014 1018 }
  1019 +
  1020 + protected function unmarshallIntervals($paramDrawingData, $paramNode)
  1021 + {
  1022 + $paramNode->addIntervals();
  1023 + }
1015 1024  
1016 1025 protected function unmarshallTickBar($paramDrawingData, $paramNode, $indexes)
1017 1026 {
... ...
src/Request/ParamsRequestImpl/Nodes/Requests/RequestOutputPlotParamsNodeClass.php
... ... @@ -38,6 +38,8 @@ define ("REQUESTOUTPUTPLOTSTATUSBAR_INDEX", "index");
38 38 define ("REQUESTOUTPUTPLOTTICKBAR_NAME", "serie");
39 39 define ("REQUESTOUTPUTPLOTTICKBAR_INDEX", "index");
40 40  
  41 +define ("REQUESTOUTPUTPLOTINTERVALS_NAME", "intervals");
  42 +
41 43 /**
42 44 * @class RequestOutputPlotParamNodeClass
43 45 * @brief Definition of a param for a plot of a plot request
... ... @@ -177,6 +179,13 @@ class RequestOutputPlotParamNodeClass extends NodeClass
177 179 $this->addChild($tickBarNode);
178 180 return $tickBarNode;
179 181 }
  182 +
  183 + public function addIntervals()
  184 + {
  185 + $intervalsNode = new NodeClass(REQUESTOUTPUTPLOTINTERVALS_NAME);
  186 + $this->addChild($intervalsNode);
  187 + return $intervalsNode;
  188 + }
180 189  
181 190 public function loadFromNode($xmlNode)
182 191 {
... ...