Lines Matching +full:sub +full:- +full:path

23 "skip-broken-mrw" => \$skipBrokenMrw,
33 my $targetObj = Targets->new;
34 $targetObj->loadXML($serverwizFile);
37 #Fetch the sensorid,sensortype,class,object path from the mrw.
52 foreach my $target (sort keys %{$targetObj->getAllTargets()})
57 my $path = '';
63 if ($targetObj->getTargetType($target) eq "unit-ipmi-sensor") {
65 $sensorName = $targetObj->getInstanceName($target);
69 $entityID = $targetObj->getAttribute($target, "IPMI_ENTITY_ID");
80 $sensorID = $targetObj->getAttribute($target, "IPMI_SENSOR_ID");
82 $sensorType = hex($targetObj->getAttribute($target,
85 $sensorReadingType = $targetObj->getAttribute($target,
88 $path = $targetObj->getAttribute($target, "INSTANCE_PATH");
91 #Instance path then die
93 if ($sensorID eq '' or $sensorReadingType eq '' or $path eq '') {
99 if (exists $sensorTypeConfig->{$sensorName}{"path"}) {
100 $obmcPath = $sensorTypeConfig->{$sensorName}->{"path"};
103 #removing the string "instance:" from path
104 $path =~ s/^instance:/\//;
105 $obmcPath = Util::getObmcName(\@inventory,$path);
108 # TODO via openbmc/openbmc#2144 - this fixup shouldn't be needed.
113 die("Unable to get the obmc path for path=$path");
119 $sensorTypeConfig->{$sensorName}->{"serviceInterface"};
120 my $readingType = $sensorTypeConfig->{$sensorName}->{"readingType"};
122 $sensorTypeConfig->{$sensorName}->{"sensorNamePattern"};
124 $sensorTypeConfig->{$sensorName}->{"mutability"};
150 my $multiplierM = $sensorTypeConfig->{$sensorName}->{"multiplierM"};
151 my $offsetB = $sensorTypeConfig->{$sensorName}->{"offsetB"};
152 my $bExp = $sensorTypeConfig->{$sensorName}->{"bExp"};
153 my $rExp = $sensorTypeConfig->{$sensorName}->{"rExp"};
154 my $unit = $sensorTypeConfig->{$sensorName}->{"unit"};
155 my $scale = $sensorTypeConfig->{$sensorName}->{"scale"};
167 $data{'PATH'} = $dbusPath;
173 $data{'PATH'} = $obmcPath;
184 # Construct DBus object path for temperature sensors
185 sub temperatureSensorPathFixup
187 my ($sensorName, $target, $path) = @_;
188 $path = "/xyz/openbmc_project/sensors/temperature/";
190 my $core = $targetObj->getTargetParent($target);
191 my $coreNo = $targetObj->getAttribute($core, "IPMI_INSTANCE");
193 my $procNo = $targetObj->getAttribute($proc, "POSITION");
195 $coreNo = $coreNo - ($procNo * $size);
196 $path .= "p" . $procNo . "_core" . $coreNo . "_temp";
199 my $dimm = $targetObj->getTargetParent($target);
200 my $dimmconn = $targetObj->getTargetParent($dimm);
201 my $pos = $targetObj->getAttribute($dimmconn, "POSITION");
202 $path .= "dimm" . $pos . "_temp";
206 my $procNo = $targetObj->getAttribute($proc, "POSITION");
207 $path .= "p" . $procNo . "_vdd_temp";
210 my $gvcard = $targetObj->getTargetParent($target);
211 my $pos = $targetObj->getAttribute($gvcard, "IPMI_INSTANCE");
212 $path .= "gpu" . $pos . "_mem_temp";
215 my $gvcard = $targetObj->getTargetParent($target);
216 my $pos = $targetObj->getAttribute($gvcard, "IPMI_INSTANCE");
217 $path .= "gpu" . $pos . "_core_temp";
222 return $path;
226 sub writeInterfaces
253 sub writeToFile
261 print $fh " path: ".$data{'PATH'}."\n";
279 my $interfaces = $sensorTypeConfig->{$sensorName}->{"interfaces"};
283 # Convert MRW OCC inventory path to application d-bus path
284 sub checkOccPathFixup
286 my ($path) = @_;
287 if ("/system/chassis/motherboard/cpu0/occ" eq $path) {
290 if ("/system/chassis/motherboard/cpu/occ" eq $path) {
293 if ("/system/chassis/motherboard/cpu1/occ" eq $path) {
296 return $path;
300 sub printUsage
303 $0 -i [MRW filename] -m [SensorMetaData filename] -o [Output filename] [OPTIONS]
305 --skip-broken-mrw = Skip broken MRW targets
306 -d = debug mode
312 sub printDebug