From af27cefecb4e79abc11e9d8036fc0243c701adc0 Mon Sep 17 00:00:00 2001 From: Jayanth Othayoth Date: Mon, 2 Apr 2018 06:53:36 -0500 Subject: Added "mutability" flag to indicate if a sensor is READ/WRITE/RW Change-Id: I69ee4acb10f64a6939703d4226245f44a6ebff5d Signed-off-by: Jayanth Othayoth --- gen_ipmi_sensor.pl | 5 +++++ 1 file changed, 5 insertions(+) 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) { -- cgit v1.2.1