Added "mutability" flag to indicate if a sensor is READ/WRITE/RW

Change-Id: I69ee4acb10f64a6939703d4226245f44a6ebff5d
Signed-off-by: Jayanth Othayoth <ojayanth@in.ibm.com>
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 @@
         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 @@
         $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 @@
     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) {