<?php $sensor_value = hytera_h2f(str_replace("\"", "", snmp_get($device, $sensor['sensor_oid'], "-OUqnv", "")), 2);
<?php $sensor_value = hytera_h2f(str_replace("\"", "", $sensor_value), 2);
<?php if ($device['os'] == "hytera") { $oids = snmp_walk($device, "rptPaTemprature", "-OsqnU", "HYTERA-REPEATER-MIB"); d_echo($oids); if ($oids !== false) { echo "HYTERA-REPEATER-MIB "; } $divisor = 1; $type = "hytera"; foreach (explode("\n", $oids) as $data) { $data = trim($data); if ($data) { list($oid, $descr) = explode(" ", $data, 2); $split_oid = explode('.', $oid); $index = $split_oid[count($split_oid) - 1]; $descr = "PA Temperature " . $index; $oid = ".1.3.6.1.4.1.40297.1.2.1.2.2." . $index; $temperature = hytera_h2f(str_replace("\"", "", snmp_get($device, $oid, "-Oqv")), 2); discover_sensor($valid['sensor'], 'temperature', $device, $oid, $index, $type, $descr, $divisor, '1', 0, 0, 70, 75, $temperature); } } }
<?php if ($device['os'] == "hytera") { $oids = snmp_walk($device, "rptVoltage", "-OsqnU", "HYTERA-REPEATER-MIB"); d_echo($oids); if ($oids !== false) { echo "HYTERA-REPEATER-MIB "; } $divisor = 1; $type = "hytera"; foreach (explode("\n", $oids) as $data) { $data = trim($data); if ($data) { list($oid, $descr) = explode(" ", $data, 2); $split_oid = explode('.', $oid); $index = $split_oid[count($split_oid) - 1]; $descr = "Voltage " . $index; $oid = ".1.3.6.1.4.1.40297.1.2.1.2.1." . $index; $voltage = hytera_h2f(str_replace("\"", "", snmp_get($device, $oid, "-OUqnv", "")), 2); discover_sensor($valid['sensor'], 'voltage', $device, $oid, $index, $type, $descr, $divisor, '1', 11.0, 11.5, 14.5, 15, $voltage); } } }