Sha256: f3f6bb66f20978cbd5b01601b45ccffd1c4819de84906741878b07cfa875688d

Contents?: true

Size: 855 Bytes

Versions: 128

Compression:

Stored size: 855 Bytes

Contents

# encoding: ascii-8bit

# Copyright 2014 Ball Aerospace & Technologies Corp.
# All Rights Reserved.
#
# This program is free software; you can modify and/or redistribute it
# under the terms of the GNU General Public License
# as published by the Free Software Foundation; version 3 with
# attribution addendums as found in the LICENSE.txt

# This file implements a class to handle responses to limits state changes.

require 'cosmos/packets/limits_response'

# ExampleLimitsResponse class
#
# This class handles a limits response
#
class ExampleLimitsResponse < Cosmos::LimitsResponse

  def call(packet, item, old_limits_state)
    case item.limits.state
    when :RED_HIGH
      cmd('INST', 'COLLECT', 'TYPE' => 'NORMAL', 'DURATION' => 5)
    when :RED_LOW
      cmd_no_hazardous_check('INST', 'CLEAR')
    end
  end

end # class ExampleLimitsResponse

Version data entries

128 entries across 64 versions & 1 rubygems

Version Path
cosmos-4.5.2-java demo/config/targets/INST/lib/example_limits_response.rb
cosmos-4.5.2-java autohotkey/config/targets/INST/lib/example_limits_response.rb
cosmos-4.5.2 demo/config/targets/INST/lib/example_limits_response.rb
cosmos-4.5.2 autohotkey/config/targets/INST/lib/example_limits_response.rb
cosmos-4.5.1-java autohotkey/config/targets/INST/lib/example_limits_response.rb
cosmos-4.5.1-java demo/config/targets/INST/lib/example_limits_response.rb
cosmos-4.5.1 demo/config/targets/INST/lib/example_limits_response.rb
cosmos-4.5.1 autohotkey/config/targets/INST/lib/example_limits_response.rb
cosmos-4.5.0-java autohotkey/config/targets/INST/lib/example_limits_response.rb
cosmos-4.5.0-java demo/config/targets/INST/lib/example_limits_response.rb
cosmos-4.5.0 demo/config/targets/INST/lib/example_limits_response.rb
cosmos-4.5.0 autohotkey/config/targets/INST/lib/example_limits_response.rb
cosmos-4.4.2-java autohotkey/config/targets/INST/lib/example_limits_response.rb
cosmos-4.4.2-java demo/config/targets/INST/lib/example_limits_response.rb
cosmos-4.4.2 autohotkey/config/targets/INST/lib/example_limits_response.rb
cosmos-4.4.2 demo/config/targets/INST/lib/example_limits_response.rb
cosmos-4.4.1-java autohotkey/config/targets/INST/lib/example_limits_response.rb
cosmos-4.4.1-java demo/config/targets/INST/lib/example_limits_response.rb
cosmos-4.4.1 autohotkey/config/targets/INST/lib/example_limits_response.rb
cosmos-4.4.1 demo/config/targets/INST/lib/example_limits_response.rb