Class: TDriverErrorRecoverySettings
- Defined in:
- lib/tdriver/report/error_recovery/tdriver_error_recovery_settings.rb
Instance Method Summary collapse
- #get_ats4_error_recovery_enabled ⇒ Object
- #get_error_recovery_enabled ⇒ Object
- #get_monitored_sut ⇒ Object
- #get_ping_connection ⇒ Object
- #get_reconnect_attempts ⇒ Object
- #get_reconnect_device ⇒ Object
- #get_wait_time_for_ats4_error_recovery ⇒ Object
-
#initialize ⇒ TDriverErrorRecoverySettings
constructor
A new instance of TDriverErrorRecoverySettings.
-
#read_settings ⇒ Object
Read error recovery settings === params === returns === raises.
Constructor Details
#initialize ⇒ TDriverErrorRecoverySettings
Returns a new instance of TDriverErrorRecoverySettings.
25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 |
# File 'lib/tdriver/report/error_recovery/tdriver_error_recovery_settings.rb', line 25 def initialize @error_recovery_enabled=nil @ping_connection=nil @ping_interval=nil @reconnect_device=nil @reconnect_attempts=nil @monitored_suts=[] @ats4_error_recovery_enabled=false @wait_time_for_ats4_error_recovery=60 read_settings end |
Instance Method Details
#get_ats4_error_recovery_enabled ⇒ Object
74 75 76 |
# File 'lib/tdriver/report/error_recovery/tdriver_error_recovery_settings.rb', line 74 def get_ats4_error_recovery_enabled $parameters[ :ats4_error_recovery_enabled ] end |
#get_error_recovery_enabled ⇒ Object
80 81 82 |
# File 'lib/tdriver/report/error_recovery/tdriver_error_recovery_settings.rb', line 80 def get_error_recovery_enabled $parameters[ :error_recovery_enabled ] end |
#get_monitored_sut ⇒ Object
92 93 94 95 96 97 98 99 100 101 102 103 104 |
# File 'lib/tdriver/report/error_recovery/tdriver_error_recovery_settings.rb', line 92 def get_monitored_sut str_parameter= $parameters[ :error_recovery_monitored_sut_ids ] if str_parameter.include?('|') @monitored_suts=str_parameter.split('|') elsif str_parameter.include?(',') @monitored_suts=str_parameter.split(',') else @monitored_suts=str_parameter end @monitored_suts end |
#get_ping_connection ⇒ Object
83 84 85 |
# File 'lib/tdriver/report/error_recovery/tdriver_error_recovery_settings.rb', line 83 def get_ping_connection $parameters[ :ping_connection ] end |
#get_reconnect_attempts ⇒ Object
89 90 91 |
# File 'lib/tdriver/report/error_recovery/tdriver_error_recovery_settings.rb', line 89 def get_reconnect_attempts $parameters[ :reconnect_attempts ] end |
#get_reconnect_device ⇒ Object
86 87 88 |
# File 'lib/tdriver/report/error_recovery/tdriver_error_recovery_settings.rb', line 86 def get_reconnect_device $parameters[ :reconnect_device ] end |
#get_wait_time_for_ats4_error_recovery ⇒ Object
77 78 79 |
# File 'lib/tdriver/report/error_recovery/tdriver_error_recovery_settings.rb', line 77 def get_wait_time_for_ats4_error_recovery $parameters[ :wait_time_for_ats4_error_recovery ] end |
#read_settings ⇒ Object
Read error recovery settings
params
returns
raises
49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 |
# File 'lib/tdriver/report/error_recovery/tdriver_error_recovery_settings.rb', line 49 def read_settings() @error_recovery_enabled= $parameters[ :error_recovery_enabled ] raise MobyBase::BehaviourError.new("error recovery", "error recovery enabled parameter not defined in tdriver_parameters.xml") if @error_recovery_enabled == nil @ats4_error_recovery_enabled= $parameters[ :ats4_error_recovery_enabled ] raise MobyBase::BehaviourError.new("error recovery", "ats4 error recovery enabled parameter not defined in tdriver_parameters.xml") if @ats4_error_recovery_enabled == nil @wait_time_for_ats4_error_recovery= $parameters[ :wait_time_for_ats4_error_recovery ] raise MobyBase::BehaviourError.new("error recovery", "ats4 error recovery wait time parameter not defined in tdriver_parameters.xml") if @wait_time_for_ats4_error_recovery == nil @ping_connection= $parameters[ :ping_connection ] raise MobyBase::BehaviourError.new("error recovery", "ping connection parameter not defined in tdriver_parameters.xml") if @ping_connection == nil @reconnect_device= $parameters[ :reconnect_device ] raise MobyBase::BehaviourError.new("error recovery", "reconnect device patameter not defined in tdriver_parameters.xml") if @reconnect_device == nil @reconnect_attempts= $parameters[ :reconnect_attempts ] raise MobyBase::BehaviourError.new("error recovery", "reconnect attempts patameter not defined in tdriver_parameters.xml") if @reconnect_attempts == nil str_parameter= $parameters[ :error_recovery_monitored_sut_ids ] raise MobyBase::BehaviourError.new("error recovery", "error_recovery_monitored_sut_ids patameter not defined in tdriver_parameters.xml") if str_parameter == nil @monitored_suts=str_parameter.split('|') end |