summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJayanth Othayoth <ojayanth@in.ibm.com>2018-04-02 06:53:36 -0500
committerJayanth Othayoth <ojayanth@in.ibm.com>2018-04-02 06:57:55 -0500
commitaf27cefecb4e79abc11e9d8036fc0243c701adc0 (patch)
tree06346f682c7f2760fc7b064a79665c38caec0e63
parent49b3e649570ecb0d2725777b08af9799de737855 (diff)
downloadphosphor-mrw-tools-af27cefecb4e79abc11e9d8036fc0243c701adc0.tar.gz
phosphor-mrw-tools-af27cefecb4e79abc11e9d8036fc0243c701adc0.zip
Added "mutability" flag to indicate if a sensor is READ/WRITE/RW
Change-Id: I69ee4acb10f64a6939703d4226245f44a6ebff5d Signed-off-by: Jayanth Othayoth <ojayanth@in.ibm.com>
-rwxr-xr-xgen_ipmi_sensor.pl5
1 files changed, 5 insertions, 0 deletions
diff --git a/gen_ipmi_sensor.pl b/gen_ipmi_sensor.pl
index f975290..5ac15b2 100755
--- a/gen_ipmi_sensor.pl
+++ b/gen_ipmi_sensor.pl
@@ -116,6 +116,8 @@ foreach my $target (sort keys %{$targetObj->getAllTargets()})
my $readingType = $sensorTypeConfig->{$sensorName}->{"readingType"};
my $sensorNamePattern =
$sensorTypeConfig->{$sensorName}->{"sensorNamePattern"};
+ my $mutability =
+ $sensorTypeConfig->{$sensorName}->{"mutability"};
# store the values in hash
my %data;
@@ -124,12 +126,14 @@ foreach my $target (sort keys %{$targetObj->getAllTargets()})
$data{'SERVICE_INTF'} = $serviceInterface;
$data{'READING_TYPE'} = $readingType;
$data{'SENSOR_NAME_PATTERN'} = $sensorNamePattern;
+ $data{'MUTABILITY'} = $mutability;
$data{'ENTITY_ID'} = $entityID;
$data{'ENTITY_INSTANCE'} = $entityInstance;
$data{'FH'} = $fh;
my $debug = "$sensorID : $sensorName : $sensorType : ";
$debug .= "$serviceInterface: $readingType : $sensorNamePattern : ";
+ $debug .= "$serviceInterface: $readingType : $mutability : ";
$debug .= "$entityID : $entityInstance : ";
# temperature sensor
if($sensorType == 0x01) {
@@ -255,6 +259,7 @@ sub writeToFile
print $fh " serviceInterface: ".$data{'SERVICE_INTF'}."\n";
print $fh " readingType: ".$data{'READING_TYPE'}."\n";
print $fh " sensorNamePattern: ".$data{'SENSOR_NAME_PATTERN'}."\n";
+ print $fh " mutability: ".$data{'MUTABILITY'}."\n";
# temperature sensor
if ($sensorType == 0x01) {
OpenPOWER on IntegriCloud