sendData = &$sendData; } public function configure(Huawei $huawei){ $this->huawei = $huawei; return $this; } public function setVoltageOrTxPower($data, $subId, $metricName, $metricCodeName){ if(isset($data[$this->huawei->getIndex()]) && !empty($data[$this->huawei->getIndex()])) { $metric = $subId.$metricCodeName; $m = "{$metric}{$this->huawei->getPonPort()}"; $v = $data[$this->huawei->getIndex()] * 0.01; $this->sendData[$m] = "{$v}|g"; $this->huawei->stats[$metricName] = $v; } return $this; } public function setTemperatureOrBiasCurrent($data, $subId, $metricName, $metricCodeName){ if(isset($data[$this->huawei->getIndex()]) && !empty($data[$this->huawei->getIndex()])) { $metric = $subId.$metricCodeName; $m = "{$metric}{$this->huawei->getPonPort()}"; $v = $data[$this->huawei->getIndex()]; $this->sendData[$m] = "{$v}|g"; $this->huawei->stats[$metricName] = $v; } return $this; } public function setRxPower($ponPortOnuId, $ponsCache, $subId, $rx, &$ponStatsCached){ $indexPon = $ponPortOnuId[0]; if(isset($ponsCache[$indexPon])) { $onuId = $ponPortOnuId[1]; $ponPort = str_replace ('/','.',$ponsCache[$indexPon]['ponPort']); $m = "{$subId}_pon_rx_{$ponPort}.{$onuId}"; $v = ($rx - 10000) * 0.01; if(isset($ponStatsCached[$indexPon]['rxPower'])) { $ponStatsCached[$indexPon]['rxPower'][$onuId] = $v; } $this->sendData[$m] = "{$v}|g"; } } }