func (sm *SMA) Currents() (float64, float64, float64, error) {
	values, err := sm.hasValue()

	measurements := []string{"l1_current", "l2_current", "l3_current"}
	if !sm.device.IsEnergyMeter() {
		measurements = []string{"current_ac1", "current_ac2", "current_ac3"}
	}

	var vals [3]float64
	for i := 0; i < 3; i++ {
		vals[i] = sm.asFloat(values[measurements[i]])
	}

	return vals[0], vals[1], vals[2], err
}
// Currents implements the api.MeterCurrent interface
Currents implements the api.MeterCurrent interface
// Currents implements the api . MeterCurrent interface
func (sm *SMA) Currents() (float64, float64, float64, error) {
	values, err := sm.hasValue()
	measurements := []string{"l1_current", "l2_current", "l3_current"}
	if !sm.device.IsEnergyMeter() {
		measurements = []string{"current_ac1", "current_ac2", "current_ac3"}
	}
	var vals [3]float64
	for i := 0; i < 3; i++ {
		vals[i] = sm.asFloat(values[measurements[i]])
	}
	return vals[0], vals[1], vals[2], err
}
func ( sm * SMA ) Currents ( ) ( float64 , float64 , float64 , error ) { values , err := sm . hasValue ( ) measurements := [ ] string { " " , " " , " " } if ! sm . device . IsEnergyMeter ( ) { measurements = [ ] string { " " , " " , " " } } var vals [ 3 ] float64 for i := 0 ; i < 3 ; i ++ { vals [ i ] = sm . asFloat ( values [ measurements [ i ] ] ) } return vals [ 0 ] , vals [ 1 ] , vals [ 2 ] , err }
Currents implements the api.MeterCurrent interface
Currents implements the api . MeterCurrent interface