Class: WMI::Win32_Battery
Overview
Win32_Battery クラスにより、コンピュータ システムに接続されているバッテリが表されます。このクラスはラップトップ システムのバッテリ、およびほかの内部/外部バッテリの両方に適用されます。
Instance Attribute Summary (collapse)
-
- (uint16) Availability
readonly
デバイスの利用可能性と状態です。.
-
- (uint32) BatteryRechargeTime
readonly
BatteryRechargeTime プロパティは、バッテリを完全に帯電するのに必要な時間を示します。.
-
- (uint16) BatteryStatus
readonly
バッテリの充電状態を示します。.
-
- (string) Caption
readonly
Caption プロパティは、オブジェクトについての簡単な説明 (1 行分の文字列) です。.
-
- (uint16) Chemistry
readonly
バッテリの特質を示す列挙です。.
-
- (uint32) ConfigManagerErrorCode
readonly
Win32 構成マネージャのエラー コードを示します。.
-
- (boolean) ConfigManagerUserConfig
readonly
デバイスがユーザー定義の構成を使用しているかどうかを示します。.
-
- (string) CreationClassName
readonly
CreationClassName は、インスタンスの作成で使用されるクラス名、またはサブクラス名を示します。.
-
- (string) Description
readonly
Description プロパティでオブジェクトの説明が提供されます。.
-
- (uint32) DesignCapacity
readonly
ミリワット時単位のバッテリのデザイン容量です。.
-
- (uint64) DesignVoltage
readonly
ミリボルト単位のバッテリのデザイン電圧です。.
-
- (string) DeviceID
readonly
DeviceID プロパティには、バッテリを識別する文字列が含まれています。.
-
- (boolean) ErrorCleared
readonly
ErrorCleared は LastErrorCode プロパティで報告されたエラーが現在は消去されていることを示すブール値のプロパティです。.
-
- (string) ErrorDescription
readonly
ErrorDescription は LastErrorCode プロパティで記録されたエラーに関する情報および実行される可能性がある修正の情報を提供する自由形式の文字列です。.
-
- (uint16) EstimatedChargeRemaining
readonly
完全に充電するための残りのパーセントを予想します。.
-
- (uint32) EstimatedRunTime
readonly
EstimatedRunTime は、ユーティリティ電力がオフになっているか、電力がない状態になっている、またはラップトップが電源につながっていない場合、現在のロード状態でのバッテリの消耗予想時間 (分) です。.
-
- (uint32) ExpectedBatteryLife
readonly
ExpectedBatteryLife プロパティにより、バッテリを完全に充電した後に、完全に放電させるのにかかる時間を示します。.
-
- (uint32) ExpectedLife
readonly
バッテリが完全に充電されているとして、バッテリの寿命の予想時間を分で示します。.
-
- (uint32) FullChargeCapacity
readonly
バッテリの完全充電の容量 (ミリワット時単位) この値と DesignCapacity プロパティを比較することで、バッテリの交換が必要となるときが決定されます。.
-
- (datetime) InstallDate
readonly
InstallDate プロパティは、オブジェクトがインストールされた日時を示す値です。.
-
- (uint32) LastErrorCode
readonly
論理デバイスで報告されたエラー コードが LastErrorCode によってキャプチャされます。.
-
- (uint32) MaxRechargeTime
readonly
MaxRechargeTime はバッテリを完全に充電するための最長時間 (分) を示します。.
-
- (string) Name
readonly
Name プロパティで、オブジェクトを認識するラベルを定義します。.
-
- (string) PNPDeviceID
readonly
論理デバイスの Win32 プラグ アンド プレイ デバイス ID を示します。.
-
- (uint16) PowerManagementCapabilities
readonly
論理デバイスの特定の電源関連機能を示します。.
-
- (boolean) PowerManagementSupported
readonly
デバイスを電源管理できることを示すブール値です - 例、省電力状態にする。.
-
- (string) SmartBatteryVersion
readonly
このバッテリにサポートされる Smart Battery Data Specification バージョン番号です。.
-
- (string) Status
readonly
Status プロパティはオブジェクトの現在の状態を示す文字列です。.
-
- (uint16) StatusInfo
readonly
StatusInfo は、論理デバイスが有効 (値 = 3)、無効 (値 = 4) またはその他 (1) または不明 (2) 状態であるかどうかを示す文字列です。.
-
- (string) SystemCreationClassName
readonly
スコーピング システムの CreationClassName です。.
-
- (string) SystemName
readonly
スコーピング システムの名前です。.
-
- (uint32) TimeOnBattery
readonly
TimeOnBattery は、コンピュータ システムの UPS がバッテリ電源に最後に切り替わったときからの経過時間 (秒)か、システムまたは UPS が最後に再起動したときの時間を示します。.
-
- (uint32) TimeToFullCharge
readonly
現在の充電レートと使用で、バッテリを完全に充電するまでの残り時間 (分) です。.
Instance Method Summary (collapse)
-
- (uint32) Reset
論理デバイスのリセットを要求します。 要求が正常に実行された場合、返される値は 0 で、要求がサポートされない場合は 1 です。 また、エラーが発生した場合は、ほかの値となります。.
-
- (uint32) SetPowerState(PowerState, Time)
SetPowerState により、論理デバイスの電源状態およびデバイスがいつその状態に入るかが定義されます。 電源状態は、PowerState パラメータを次の整数値の 1 つに設定することによって指定されます: 1="通常の電力"、2="省電力- 低電力モード"、3="省電力 - スタンバイ"、4="省電力 - その他"、5="電源サイクル" または 6="電源オフ"。 時間パラメータ (5 の "Power Cycle" を除くすべての状態の変更用) は、通常の日付値または間隔値 (メソッド実行の受信時に間隔が開始される) のどちらかにいつ電源状態が設定される必要があるかを示します。 PowerState パラメータが 5 ("Power Cycle") であるとき、時間パラメータはいつデバイスが再度電源オンになるかを示します。 直ちに電源をオフにします。 成功の場合、SetPowerState は 0 を返し、指定された PowerState および要求時間がサポートされていない場合は、1 を返し、ほかのエラーが発生する場合はほかの値が返されます。 サブクラスでは、可能な返信コードのセットはメソッド上の ValueMap 修飾子を使って指定することも可能です。.
Methods inherited from Base
#AddRef, #AssociatorsAsync_, #Associators_, #Clone_, #CompareTo_, #DeleteAsync_, #Delete_, #Derivation_, #ExecMethodAsync_, #ExecMethod_, #GetIDsOfNames, #GetObjectText_, #GetText_, #GetTypeInfo, #GetTypeInfoCount, #InstancesAsync_, #Instances_, #Invoke, #Methods_, #Path_, #Properties_, #PutAsync_, #Put_, #Qualifiers_, #QueryInterface, #ReferencesAsync_, #References_, #Refresh_, #Release, #Security_, #SetFromText_, #SpawnDerivedClass_, #SpawnInstance_, #SubclassesAsync_, #Subclasses_, #SystemProperties_
Instance Attribute Details
- (uint16) Availability (readonly)
デバイスの利用可能性と状態です。
36 37 38 |
# File 'lib/Win32_Battery.rb', line 36 def Availability @Availability end |
- (uint32) BatteryRechargeTime (readonly)
BatteryRechargeTime プロパティは、バッテリを完全に帯電するのに必要な時間を示します。
BatteryRechargeTime
44 45 46 |
# File 'lib/Win32_Battery.rb', line 44 def BatteryRechargeTime @BatteryRechargeTime end |
- (uint16) BatteryStatus (readonly)
バッテリの充電状態を示します。
"充電完了" (
52 53 54 |
# File 'lib/Win32_Battery.rb', line 52 def BatteryStatus @BatteryStatus end |
- (string) Caption (readonly)
Caption プロパティは、オブジェクトについての簡単な説明 (1 行分の文字列) です。
57 58 59 |
# File 'lib/Win32_Battery.rb', line 57 def Caption @Caption end |
- (uint16) Chemistry (readonly)
バッテリの特質を示す列挙です。
62 63 64 |
# File 'lib/Win32_Battery.rb', line 62 def Chemistry @Chemistry end |
- (uint32) ConfigManagerErrorCode (readonly)
Win32 構成マネージャのエラー コードを示します。
135 136 137 |
# File 'lib/Win32_Battery.rb', line 135 def ConfigManagerErrorCode @ConfigManagerErrorCode end |
- (boolean) ConfigManagerUserConfig (readonly)
デバイスがユーザー定義の構成を使用しているかどうかを示します。
140 141 142 |
# File 'lib/Win32_Battery.rb', line 140 def ConfigManagerUserConfig @ConfigManagerUserConfig end |
- (string) CreationClassName (readonly)
CreationClassName は、インスタンスの作成で使用されるクラス名、またはサブクラス名を示します。
146 147 148 |
# File 'lib/Win32_Battery.rb', line 146 def CreationClassName @CreationClassName end |
- (string) Description (readonly)
Description プロパティでオブジェクトの説明が提供されます。
152 153 154 |
# File 'lib/Win32_Battery.rb', line 152 def Description @Description end |
- (uint32) DesignCapacity (readonly)
ミリワット時単位のバッテリのデザイン容量です。
158 159 160 |
# File 'lib/Win32_Battery.rb', line 158 def DesignCapacity @DesignCapacity end |
- (uint64) DesignVoltage (readonly)
ミリボルト単位のバッテリのデザイン電圧です。
164 165 166 |
# File 'lib/Win32_Battery.rb', line 164 def DesignVoltage @DesignVoltage end |
- (string) DeviceID (readonly)
DeviceID プロパティには、バッテリを識別する文字列が含まれています。
171 172 173 |
# File 'lib/Win32_Battery.rb', line 171 def DeviceID @DeviceID end |
- (boolean) ErrorCleared (readonly)
ErrorCleared は LastErrorCode プロパティで報告されたエラーが現在は消去されていることを示すブール値のプロパティです。
176 177 178 |
# File 'lib/Win32_Battery.rb', line 176 def ErrorCleared @ErrorCleared end |
- (string) ErrorDescription (readonly)
ErrorDescription は LastErrorCode プロパティで記録されたエラーに関する情報および実行される可能性がある修正の情報を提供する自由形式の文字列です。
181 182 183 |
# File 'lib/Win32_Battery.rb', line 181 def ErrorDescription @ErrorDescription end |
- (uint16) EstimatedChargeRemaining (readonly)
完全に充電するための残りのパーセントを予想します。
186 187 188 |
# File 'lib/Win32_Battery.rb', line 186 def EstimatedChargeRemaining @EstimatedChargeRemaining end |
- (uint32) EstimatedRunTime (readonly)
EstimatedRunTime は、ユーティリティ電力がオフになっているか、電力がない状態になっている、またはラップトップが電源につながっていない場合、現在のロード状態でのバッテリの消耗予想時間 (分) です。
191 192 193 |
# File 'lib/Win32_Battery.rb', line 191 def EstimatedRunTime @EstimatedRunTime end |
- (uint32) ExpectedBatteryLife (readonly)
ExpectedBatteryLife プロパティにより、バッテリを完全に充電した後に、完全に放電させるのにかかる時間を示します。
ExpectedBatteryLife
199 200 201 |
# File 'lib/Win32_Battery.rb', line 199 def ExpectedBatteryLife @ExpectedBatteryLife end |
- (uint32) ExpectedLife (readonly)
バッテリが完全に充電されているとして、バッテリの寿命の予想時間を分で示します。
205 206 207 |
# File 'lib/Win32_Battery.rb', line 205 def ExpectedLife @ExpectedLife end |
- (uint32) FullChargeCapacity (readonly)
バッテリの完全充電の容量 (ミリワット時単位) この値と DesignCapacity プロパティを比較することで、バッテリの交換が必要となるときが決定されます。
212 213 214 |
# File 'lib/Win32_Battery.rb', line 212 def FullChargeCapacity @FullChargeCapacity end |
- (datetime) InstallDate (readonly)
InstallDate プロパティは、オブジェクトがインストールされた日時を示す値です。
218 219 220 |
# File 'lib/Win32_Battery.rb', line 218 def InstallDate @InstallDate end |
- (uint32) LastErrorCode (readonly)
論理デバイスで報告されたエラー コードが LastErrorCode によってキャプチャされます。
223 224 225 |
# File 'lib/Win32_Battery.rb', line 223 def LastErrorCode @LastErrorCode end |
- (uint32) MaxRechargeTime (readonly)
MaxRechargeTime はバッテリを完全に充電するための最長時間 (分) を示します。
229 230 231 |
# File 'lib/Win32_Battery.rb', line 229 def MaxRechargeTime @MaxRechargeTime end |
- (string) Name (readonly)
Name プロパティで、オブジェクトを認識するラベルを定義します。
235 236 237 |
# File 'lib/Win32_Battery.rb', line 235 def Name @Name end |
- (string) PNPDeviceID (readonly)
論理デバイスの Win32 プラグ アンド プレイ デバイス ID を示します。
241 242 243 |
# File 'lib/Win32_Battery.rb', line 241 def PNPDeviceID @PNPDeviceID end |
- (uint16) PowerManagementCapabilities (readonly)
論理デバイスの特定の電源関連機能を示します。
0="不明"
252 253 254 |
# File 'lib/Win32_Battery.rb', line 252 def PowerManagementCapabilities @PowerManagementCapabilities end |
- (boolean) PowerManagementSupported (readonly)
デバイスを電源管理できることを示すブール値です - 例、省電力状態にする。
260 261 262 |
# File 'lib/Win32_Battery.rb', line 260 def PowerManagementSupported @PowerManagementSupported end |
- (string) SmartBatteryVersion (readonly)
このバッテリにサポートされる Smart Battery Data Specification バージョン番号です。
266 267 268 |
# File 'lib/Win32_Battery.rb', line 266 def SmartBatteryVersion @SmartBatteryVersion end |
- (string) Status (readonly)
Status プロパティはオブジェクトの現在の状態を示す文字列です。
279 280 281 |
# File 'lib/Win32_Battery.rb', line 279 def Status @Status end |
- (uint16) StatusInfo (readonly)
StatusInfo は、論理デバイスが有効 (値 = 3)、無効 (値 = 4) またはその他 (1) または不明 (2) 状態であるかどうかを示す文字列です。
285 286 287 |
# File 'lib/Win32_Battery.rb', line 285 def StatusInfo @StatusInfo end |
- (string) SystemCreationClassName (readonly)
スコーピング システムの CreationClassName です。
291 292 293 |
# File 'lib/Win32_Battery.rb', line 291 def SystemCreationClassName @SystemCreationClassName end |
- (string) SystemName (readonly)
スコーピング システムの名前です。
296 297 298 |
# File 'lib/Win32_Battery.rb', line 296 def SystemName @SystemName end |
- (uint32) TimeOnBattery (readonly)
TimeOnBattery は、コンピュータ システムの UPS がバッテリ電源に最後に切り替わったときからの経過時間 (秒)か、システムまたは UPS が最後に再起動したときの時間を示します。
302 303 304 |
# File 'lib/Win32_Battery.rb', line 302 def TimeOnBattery @TimeOnBattery end |
- (uint32) TimeToFullCharge (readonly)
現在の充電レートと使用で、バッテリを完全に充電するまでの残り時間 (分) です。
307 308 309 |
# File 'lib/Win32_Battery.rb', line 307 def TimeToFullCharge @TimeToFullCharge end |
Instance Method Details
- (uint32) Reset
論理デバイスのリセットを要求します。 要求が正常に実行された場合、返される値は 0 で、要求がサポートされない場合は 1 です。 また、エラーが発生した場合は、ほかの値となります。
25 26 |
# File 'lib/Win32_Battery.rb', line 25 def Reset end |
- (uint32) SetPowerState(PowerState, Time)
SetPowerState により、論理デバイスの電源状態およびデバイスがいつその状態に入るかが定義されます。 電源状態は、PowerState パラメータを次の整数値の 1 つに設定することによって指定されます: 1="通常の電力"、2="省電力- 低電力モード"、3="省電力 - スタンバイ"、4="省電力 - その他"、5="電源サイクル" または 6="電源オフ"。 時間パラメータ (5 の "Power Cycle" を除くすべての状態の変更用) は、通常の日付値または間隔値 (メソッド実行の受信時に間隔が開始される) のどちらかにいつ電源状態が設定される必要があるかを示します。 PowerState パラメータが 5 ("Power Cycle") であるとき、時間パラメータはいつデバイスが再度電源オンになるかを示します。 直ちに電源をオフにします。 成功の場合、SetPowerState は 0 を返し、指定された PowerState および要求時間がサポートされていない場合は、1 を返し、ほかのエラーが発生する場合はほかの値が返されます。 サブクラスでは、可能な返信コードのセットはメソッド上の ValueMap 修飾子を使って指定することも可能です。
ValueMap
値の配置修飾子としてサブクラスで指定される場合もあります。
17 18 |
# File 'lib/Win32_Battery.rb', line 17 def SetPowerState PowerState, Time end |