// Currents implements the api.MeterCurrent interface
Currents implements the api.MeterCurrent interface
// Currents implements the api . MeterCurrent interface
func (wb *CfosPowerBrain) Currents() (float64, float64, float64, error) {
	var currents []float64
	for _, regCurrent := range cfosRegCurrents {
		b, err := wb.conn.ReadHoldingRegisters(regCurrent, 2)
		if err != nil {
			return 0, 0, 0, err
		}
		currents = append(currents, float64(binary.BigEndian.Uint32(b))/10)
	}
	return currents[0], currents[1], currents[2], nil
}
func ( wb * CfosPowerBrain ) Currents ( ) ( float64 , float64 , float64 , error ) { var currents [ ] float64 for _ , regCurrent := range cfosRegCurrents { b , err := wb . conn . ReadHoldingRegisters ( regCurrent , 2 ) if err != nil { return 0 , 0 , 0 , err } currents = append ( currents , float64 ( binary . BigEndian . Uint32 ( b ) ) / 10 ) } return currents [ 0 ] , currents [ 1 ] , currents [ 2 ] , nil }
Currents implements the api.MeterCurrent interface
Currents implements the api . MeterCurrent interface