C# 클래스 EnergyUsingObject

상속: SimObject
파일 보기 프로젝트 열기: FIU-SCIS-Senior-Projects/SmartBuilding4 1 사용 예제들

공개 메소드들

메소드 설명
ReceiveEnergy ( ) : float

Receives the energy. called from the plug load.. amt of energy used.

addBattery ( Battery, bat ) : void

Adds the battery to batteryList

connectToPlugLoad ( PlugLoad, pl ) : void
disconnectFromPlugLoad ( ) : void
getBatteryEnergyAt ( int batIndex ) : float

Gets the battery level at batIndex.

getConnectedPlugLoad ( ) : PlugLoad,
getEnergyUsagePerSec ( ) : float

Gets the energy usage per sec.

getIsEnergySupplied ( ) : bool

Gets the is energy supplied.

getIsPluggedIn ( ) : bool
getIsPoweredOn ( ) : bool

Gets if is powered on.

getIsUsingBattery ( ) : bool

Gets the is using battery.

getNumBatteries ( ) : int

Gets the number batteries.

getTotalEnergyUsage ( ) : float

Gets the total energy usage.

powerOff ( ) : bool

Powers off.

powerOn ( ) : bool

Powers on.

removeBatteryAt ( int batIndex ) : void

Removes the battery at batIndex.

setBatteryEnergyAt ( int batIndex, float amt ) : void

Sets the battery energy at batIndex and set to amt.

startSupplyingEnergy ( ) : void

Starts the supplying energy.

startUsingBattery ( ) : void

Starts the using battery.

stopSupplyingEnergy ( ) : void

Stops the supplying energy.

stopUsingBattery ( ) : void

Stops the using battery.

toggleSupplyingEnergy ( ) : void
toggleSupplyingEnergy ( Button sender ) : void

for when a button in the ui has to toggle this that way this method auto sets whatever button it was. Hopefully that button is linked to the proper EUO. Oh well.

비공개 메소드들

메소드 설명
Awake ( ) : void
Start ( ) : void
Update ( ) : void

Update this instance. /// Updates the energy use. Does necessary calculations for averages and totals. should be called each frame from the energy hub.

hasPower ( ) : bool

returns if has power.

메소드 상세

ReceiveEnergy() 공개 메소드

Receives the energy. called from the plug load.. amt of energy used.
public ReceiveEnergy ( ) : float
리턴 float

addBattery() 공개 메소드

Adds the battery to batteryList
public addBattery ( Battery, bat ) : void
bat Battery, Bat. the Battery to add
리턴 void

connectToPlugLoad() 공개 메소드

public connectToPlugLoad ( PlugLoad, pl ) : void
pl PlugLoad,
리턴 void

disconnectFromPlugLoad() 공개 메소드

public disconnectFromPlugLoad ( ) : void
리턴 void

getBatteryEnergyAt() 공개 메소드

Gets the battery level at batIndex.
public getBatteryEnergyAt ( int batIndex ) : float
batIndex int Bat index.
리턴 float

getConnectedPlugLoad() 공개 메소드

public getConnectedPlugLoad ( ) : PlugLoad,
리턴 PlugLoad,

getEnergyUsagePerSec() 공개 메소드

Gets the energy usage per sec.
public getEnergyUsagePerSec ( ) : float
리턴 float

getIsEnergySupplied() 공개 메소드

Gets the is energy supplied.
public getIsEnergySupplied ( ) : bool
리턴 bool

getIsPluggedIn() 공개 메소드

public getIsPluggedIn ( ) : bool
리턴 bool

getIsPoweredOn() 공개 메소드

Gets if is powered on.
public getIsPoweredOn ( ) : bool
리턴 bool

getIsUsingBattery() 공개 메소드

Gets the is using battery.
public getIsUsingBattery ( ) : bool
리턴 bool

getNumBatteries() 공개 메소드

Gets the number batteries.
public getNumBatteries ( ) : int
리턴 int

getTotalEnergyUsage() 공개 메소드

Gets the total energy usage.
public getTotalEnergyUsage ( ) : float
리턴 float

powerOff() 공개 메소드

Powers off.
public powerOff ( ) : bool
리턴 bool

powerOn() 공개 메소드

Powers on.
public powerOn ( ) : bool
리턴 bool

removeBatteryAt() 공개 메소드

Removes the battery at batIndex.
public removeBatteryAt ( int batIndex ) : void
batIndex int Bat index.
리턴 void

setBatteryEnergyAt() 공개 메소드

Sets the battery energy at batIndex and set to amt.
public setBatteryEnergyAt ( int batIndex, float amt ) : void
batIndex int Bat index.
amt float Amt.
리턴 void

startSupplyingEnergy() 공개 메소드

Starts the supplying energy.
public startSupplyingEnergy ( ) : void
리턴 void

startUsingBattery() 공개 메소드

Starts the using battery.
public startUsingBattery ( ) : void
리턴 void

stopSupplyingEnergy() 공개 메소드

Stops the supplying energy.
public stopSupplyingEnergy ( ) : void
리턴 void

stopUsingBattery() 공개 메소드

Stops the using battery.
public stopUsingBattery ( ) : void
리턴 void

toggleSupplyingEnergy() 공개 메소드

public toggleSupplyingEnergy ( ) : void
리턴 void

toggleSupplyingEnergy() 공개 메소드

for when a button in the ui has to toggle this that way this method auto sets whatever button it was. Hopefully that button is linked to the proper EUO. Oh well.
public toggleSupplyingEnergy ( Button sender ) : void
sender Button Sender.
리턴 void