Sha256: 21450fabe354029cd7a1c052b587b0ada8f1bcad0ca2a5b19d7d46e4e4c2790e

Contents?: true

Size: 1.09 KB

Versions: 12

Compression:

Stored size: 1.09 KB

Contents

# Copyright 2023 OpenC3, Inc.
# All Rights Reserved.
#
# This program is free software; you can modify and/or redistribute it
# under the terms of the GNU Affero General Public License
# as published by the Free Software Foundation; version 3 with
# attribution addendums as found in the LICENSE.txt
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
# GNU Affero General Public License for more details.
#
# This file may also be used under the terms of a commercial license
# if purchased from OpenC3, Inc.

from openc3.packets.limits_response import LimitsResponse
from openc3.api.cmd_api import cmd, cmd_no_hazardous_check


class ExampleLimitsResponse(LimitsResponse):
    def call(self, packet, item, old_limits_state):
        match item.limits.state:
            case "RED_HIGH":
                cmd("<%= target_name %>", "COLLECT", {"TYPE": "NORMAL", "DURATION": 7})
            case "RED_LOW":
                cmd_no_hazardous_check("<%= target_name %>", "CLEAR")

Version data entries

12 entries across 12 versions & 1 rubygems

Version Path
openc3-cosmos-demo-5.18.0 targets/INST2/lib/example_limits_response.py
openc3-cosmos-demo-5.17.1 targets/INST2/lib/example_limits_response.py
openc3-cosmos-demo-5.17.0 targets/INST2/lib/example_limits_response.py
openc3-cosmos-demo-5.16.0 targets/INST2/lib/example_limits_response.py
openc3-cosmos-demo-5.15.2 targets/INST2/lib/example_limits_response.py
openc3-cosmos-demo-5.15.1 targets/INST2/lib/example_limits_response.py
openc3-cosmos-demo-5.15.0 targets/INST2/lib/example_limits_response.py
openc3-cosmos-demo-5.14.2 targets/INST2/lib/example_limits_response.py
openc3-cosmos-demo-5.14.1 targets/INST2/lib/example_limits_response.py
openc3-cosmos-demo-5.14.0 targets/INST2/lib/example_limits_response.py
openc3-cosmos-demo-5.13.0 targets/INST2/lib/example_limits_response.py
openc3-cosmos-demo-5.12.0 targets/INST2/lib/example_limits_response.py