Skip to content

Commit 2046f12

Browse files
committed
translib: gofmt pfm_app.go
Signed-off-by: Kanji Nakano <kanji.nakano@ntt.com>
1 parent b64e32a commit 2046f12

File tree

1 file changed

+40
-40
lines changed

1 file changed

+40
-40
lines changed

translib/pfm_app.go

Lines changed: 40 additions & 40 deletions
Original file line numberDiff line numberDiff line change
@@ -1065,26 +1065,26 @@ func (app *PlatformApp) getCompTransceiverPhysicalChannelStateLaserBiasCurrentFr
10651065
}
10661066

10671067
type CompTransceiverThresholdStateDb struct {
1068-
temphighalarm float64
1069-
templowalarm float64
1070-
vcchighalarm float64
1071-
vcclowalarm float64
1072-
temphighwarning float64
1073-
templowwarning float64
1074-
vcchighwarning float64
1075-
vcclowwarning float64
1076-
txpowerhighalarm float64
1077-
txpowerlowalarm float64
1078-
rxpowerhighalarm float64
1079-
rxpowerlowalarm float64
1080-
txbiashighalarm float64
1081-
txbiaslowalarm float64
1082-
txpowerhighwarning float64
1083-
txpowerlowwarning float64
1084-
rxpowerhighwarning float64
1085-
rxpowerlowwarning float64
1086-
txbiashighwarning float64
1087-
txbiaslowwarning float64
1068+
temphighalarm float64
1069+
templowalarm float64
1070+
vcchighalarm float64
1071+
vcclowalarm float64
1072+
temphighwarning float64
1073+
templowwarning float64
1074+
vcchighwarning float64
1075+
vcclowwarning float64
1076+
txpowerhighalarm float64
1077+
txpowerlowalarm float64
1078+
rxpowerhighalarm float64
1079+
rxpowerlowalarm float64
1080+
txbiashighalarm float64
1081+
txbiaslowalarm float64
1082+
txpowerhighwarning float64
1083+
txpowerlowwarning float64
1084+
rxpowerhighwarning float64
1085+
rxpowerlowwarning float64
1086+
txbiashighwarning float64
1087+
txbiaslowwarning float64
10881088
}
10891089

10901090
func (app *PlatformApp) getCompTransceiverThresholdStateDbObj(ifName string) CompTransceiverThresholdStateDb {
@@ -1102,18 +1102,18 @@ func (app *PlatformApp) getCompTransceiverThresholdStateDbObj(ifName string) Com
11021102
compTransceiverThresholdStateDbObj.templowwarning, _ = strconv.ParseFloat(transceiverDomThresholdTable.Get("templowwarning"), 64)
11031103
compTransceiverThresholdStateDbObj.vcchighwarning, _ = strconv.ParseFloat(transceiverDomThresholdTable.Get("vcchighwarning"), 64)
11041104
compTransceiverThresholdStateDbObj.vcclowwarning, _ = strconv.ParseFloat(transceiverDomThresholdTable.Get("vcclowwarning"), 64)
1105-
compTransceiverThresholdStateDbObj.txpowerhighalarm, _ = strconv.ParseFloat(transceiverDomThresholdTable.Get("txpowerhighalarm"), 64)
1106-
compTransceiverThresholdStateDbObj.txpowerlowalarm, _ = strconv.ParseFloat(transceiverDomThresholdTable.Get("txpowerlowalarm"), 64)
1107-
compTransceiverThresholdStateDbObj.rxpowerhighalarm, _ = strconv.ParseFloat(transceiverDomThresholdTable.Get("rxpowerhighalarm"), 64)
1108-
compTransceiverThresholdStateDbObj.rxpowerlowalarm, _ = strconv.ParseFloat(transceiverDomThresholdTable.Get("rxpowerlowalarm"), 64)
1109-
compTransceiverThresholdStateDbObj.txbiashighalarm, _ = strconv.ParseFloat(transceiverDomThresholdTable.Get("txbiashighalarm"), 64)
1110-
compTransceiverThresholdStateDbObj.txbiaslowalarm, _ = strconv.ParseFloat(transceiverDomThresholdTable.Get("txbiaslowalarm"), 64)
1111-
compTransceiverThresholdStateDbObj.txpowerhighwarning, _ = strconv.ParseFloat(transceiverDomThresholdTable.Get("txpowerhighwarning"), 64)
1112-
compTransceiverThresholdStateDbObj.txpowerlowwarning, _ = strconv.ParseFloat(transceiverDomThresholdTable.Get("txpowerlowwarning"), 64)
1113-
compTransceiverThresholdStateDbObj.rxpowerhighwarning, _ = strconv.ParseFloat(transceiverDomThresholdTable.Get("rxpowerhighwarning"), 64)
1114-
compTransceiverThresholdStateDbObj.rxpowerlowwarning, _ = strconv.ParseFloat(transceiverDomThresholdTable.Get("rxpowerlowwarning"), 64)
1115-
compTransceiverThresholdStateDbObj.txbiashighwarning, _ = strconv.ParseFloat(transceiverDomThresholdTable.Get("txbiashighwarning"), 64)
1116-
compTransceiverThresholdStateDbObj.txbiaslowwarning, _ = strconv.ParseFloat(transceiverDomThresholdTable.Get("txbiaslowwarning"), 64)
1105+
compTransceiverThresholdStateDbObj.txpowerhighalarm, _ = strconv.ParseFloat(transceiverDomThresholdTable.Get("txpowerhighalarm"), 64)
1106+
compTransceiverThresholdStateDbObj.txpowerlowalarm, _ = strconv.ParseFloat(transceiverDomThresholdTable.Get("txpowerlowalarm"), 64)
1107+
compTransceiverThresholdStateDbObj.rxpowerhighalarm, _ = strconv.ParseFloat(transceiverDomThresholdTable.Get("rxpowerhighalarm"), 64)
1108+
compTransceiverThresholdStateDbObj.rxpowerlowalarm, _ = strconv.ParseFloat(transceiverDomThresholdTable.Get("rxpowerlowalarm"), 64)
1109+
compTransceiverThresholdStateDbObj.txbiashighalarm, _ = strconv.ParseFloat(transceiverDomThresholdTable.Get("txbiashighalarm"), 64)
1110+
compTransceiverThresholdStateDbObj.txbiaslowalarm, _ = strconv.ParseFloat(transceiverDomThresholdTable.Get("txbiaslowalarm"), 64)
1111+
compTransceiverThresholdStateDbObj.txpowerhighwarning, _ = strconv.ParseFloat(transceiverDomThresholdTable.Get("txpowerhighwarning"), 64)
1112+
compTransceiverThresholdStateDbObj.txpowerlowwarning, _ = strconv.ParseFloat(transceiverDomThresholdTable.Get("txpowerlowwarning"), 64)
1113+
compTransceiverThresholdStateDbObj.rxpowerhighwarning, _ = strconv.ParseFloat(transceiverDomThresholdTable.Get("rxpowerhighwarning"), 64)
1114+
compTransceiverThresholdStateDbObj.rxpowerlowwarning, _ = strconv.ParseFloat(transceiverDomThresholdTable.Get("rxpowerlowwarning"), 64)
1115+
compTransceiverThresholdStateDbObj.txbiashighwarning, _ = strconv.ParseFloat(transceiverDomThresholdTable.Get("txbiashighwarning"), 64)
1116+
compTransceiverThresholdStateDbObj.txbiaslowwarning, _ = strconv.ParseFloat(transceiverDomThresholdTable.Get("txbiaslowwarning"), 64)
11171117

11181118
return compTransceiverThresholdStateDbObj
11191119
}
@@ -1228,12 +1228,12 @@ func (app *PlatformApp) getCompTransceiverThresholdStateFromDb(oc_val *ocbinds.O
12281228
oc_val.SupplyVoltageLower = &vcclowwarning
12291229
}
12301230
}
1231-
if all || targetUriPath == "/openconfig-platform:components/component/openconfig-platform-transceiver:transceiver/thresholds/threshold/state/output-power-upper" {
1232-
transceiverDomThresholdTable := app.transceiverDomThresholdTable[ifName].entry
1233-
if transceiverDomThresholdTable.Has("txpowerhighwarning") {
1234-
v := math.Floor(compTransceiverThresholdStateDb.txpowerhighwarning*fractionDigits2) / fractionDigits2
1235-
oc_val.OutputPowerUpper = &v
1236-
}
1231+
if all || targetUriPath == "/openconfig-platform:components/component/openconfig-platform-transceiver:transceiver/thresholds/threshold/state/output-power-upper" {
1232+
transceiverDomThresholdTable := app.transceiverDomThresholdTable[ifName].entry
1233+
if transceiverDomThresholdTable.Has("txpowerhighwarning") {
1234+
v := math.Floor(compTransceiverThresholdStateDb.txpowerhighwarning*fractionDigits2) / fractionDigits2
1235+
oc_val.OutputPowerUpper = &v
1236+
}
12371237
}
12381238
if all || targetUriPath == "/openconfig-platform:components/component/openconfig-platform-transceiver:transceiver/thresholds/threshold/state/output-power-lower" {
12391239
transceiverDomThresholdTable := app.transceiverDomThresholdTable[ifName].entry
@@ -1269,7 +1269,7 @@ func (app *PlatformApp) getCompTransceiverThresholdStateFromDb(oc_val *ocbinds.O
12691269
v := math.Floor(compTransceiverThresholdStateDb.txbiaslowwarning*fractionDigits2) / fractionDigits2
12701270
oc_val.LaserBiasCurrentLower = &v
12711271
}
1272-
}
1272+
}
12731273
}
12741274

12751275
return nil
@@ -2098,4 +2098,4 @@ func (app *PlatformApp) doGetPlatformInfo() error {
20982098
}
20992099
}
21002100
return err
2101-
}
2101+
}

0 commit comments

Comments
 (0)