Class: Amt::Sol
- Inherits:
-
Object
- Object
- Amt::Sol
- Defined in:
- lib/amt/sol.rb
Instance Method Summary collapse
-
#initialize(client) ⇒ Sol
constructor
A new instance of Sol.
- #start ⇒ Object
- #status ⇒ Object
- #stop ⇒ Object
Constructor Details
#initialize(client) ⇒ Sol
Returns a new instance of Sol.
3 4 5 6 |
# File 'lib/amt/sol.rb', line 3 def initialize client @client = client @instance = @client.get "AMT_RedirectionService", "Name" => "Intel(r) AMT Redirection Service" end |
Instance Method Details
#start ⇒ Object
8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 |
# File 'lib/amt/sol.rb', line 8 def start res = 0 case @instance.EnabledState when 32770 puts "SOL is enabled and IDE-R is disabled" if Amt.debug when 32771 puts "SOL and IDE-R are enabled" if Amt.debug when 32768 # SOL and IDE-R are disabled puts "Enabling SOL" if Amt.debug res = @instance.RequestStateChange(32770) when 32769 # SOL is disabled and IDE-R is enabled puts "Enabling SOL" if Amt.debug res = @instance.RequestStateChange(32771) else puts "unknown #{@instance.EnabledState}" res = 1 end res end |
#status ⇒ Object
30 31 32 33 34 35 36 37 38 39 40 41 42 |
# File 'lib/amt/sol.rb', line 30 def status res = 0 case @instance.EnabledState when 32770, 32771 # SOL is enabled and IDE-R is disabled/enabled puts "SOL is enabled" when 32768, 32769 # SOL is disabled and IDE-R is disabled/enabled puts "SOL is disabled" else puts "unknown #{@instance.EnabledState}" res = 1 end res end |
#stop ⇒ Object
44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 |
# File 'lib/amt/sol.rb', line 44 def stop res = 0 case @instance.EnabledState when 32770 # SOL is enabled and IDE-R is disabled puts "Disabling SOL" if Amt.debug res = @instance.RequestStateChange(32768) when 32771 # SOL and IDE-R are enabled puts "Disabling SOL" if Amt.debug res = @instance.RequestStateChange(32769) when 32768 puts "SOL and IDE-R are disabled" if Amt.debug when 32769 puts "SOL is disabled and IDE-R is enabled" if Amt.debug else puts "unknown #{@instance.EnabledState}" res = 1 end end |