func (v *Valve) GetCap() int {
	v.ctrl.Lock()
	defer v.ctrl.Unlock()
	if v.ctrl.stat.Opened {
		return v.ctrl.stat.Cap
	}
	return -1
}
// GetCap returns the capacity of the valve and whether it was set.
GetCap returns the capacity of the valve and whether it was set.
// GetCap returns the capacity of the valve and whether it was set .
func (v *Valve) GetCap() int {
	v.ctrl.Lock()
	defer v.ctrl.Unlock()
	if v.ctrl.stat.Opened {
		return v.ctrl.stat.Cap
	}
	return -1
}
func ( v * Valve ) GetCap ( ) int { v . ctrl . Lock ( ) defer v . ctrl . Unlock ( ) if v . ctrl . stat . Opened { return v . ctrl . stat . Cap } return - 1 }
GetCap returns the capacity of the valve and whether it was set.
GetCap returns the capacity of the valve and whether it was set .