|
| 1 | +# |
| 2 | +# Copyright (c) 2025 Project CHIP Authors |
| 3 | +# |
| 4 | +# Licensed under the Apache License, Version 2.0 (the "License"); |
| 5 | +# you may not use this file except in compliance with the License. |
| 6 | +# You may obtain a copy of the License at |
| 7 | +# |
| 8 | +# http://www.apache.org/licenses/LICENSE-2.0 |
| 9 | +# |
| 10 | +# Unless required by applicable law or agreed to in writing, software |
| 11 | +# distributed under the License is distributed on an "AS IS" BASIS, |
| 12 | +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| 13 | +# See the License for the specific language governing permissions and |
| 14 | +# limitations under the License. |
| 15 | +# |
| 16 | + |
| 17 | +from enum import Enum |
| 18 | + |
| 19 | +""" |
| 20 | + Shared constants across the application. |
| 21 | +""" |
| 22 | + |
| 23 | + |
| 24 | +class TestStateEnum(str, Enum): |
| 25 | + __test__ = False # Needed to indicate to PyTest that this is not a "test" |
| 26 | + PENDING = "pending" |
| 27 | + EXECUTING = "executing" |
| 28 | + PENDING_ACTUATION = "pending_actuation" # TODO: Do we need this |
| 29 | + PASSED = "passed" # Test Passed with no issued |
| 30 | + FAILED = "failed" # Test Failed |
| 31 | + ERROR = "error" # Test Error due to tool setup or environment |
| 32 | + NOT_APPLICABLE = "not_applicable" # Test is not applicable - e.g. PICS mismatch |
| 33 | + CANCELLED = "cancelled" |
| 34 | + |
| 35 | + |
| 36 | +# Enum Keys for different types of messages currently supported by the tool |
| 37 | +class MessageTypeEnum(str, Enum): |
| 38 | + PROMPT_REQUEST = "prompt_request" |
| 39 | + PROMPT_RESPONSE = "prompt_response" |
| 40 | + OPTIONS_REQUEST = "options_request" |
| 41 | + MESSAGE_REQUEST = "message_request" |
| 42 | + TEST_UPDATE = "test_update" |
| 43 | + FILE_UPLOAD_REQUEST = "file_upload_request" |
| 44 | + TIME_OUT_NOTIFICATION = "time_out_notification" |
| 45 | + TEST_LOG_RECORDS = "test_log_records" |
| 46 | + INVALID_MESSAGE = "invalid_message" |
| 47 | + STREAM_VERIFICATION_REQUEST = "stream_verification_request" |
| 48 | + IMAGE_VERIFICATION_REQUEST = "image_verification_request" |
| 49 | + TWO_WAY_TALK_VERIFICATION_REQUEST = "two_way_talk_verification_request" |
| 50 | + PUSH_AV_STREAM_VERIFICATION_REQUEST = "push_av_stream_verification_request" |
| 51 | + |
| 52 | + |
| 53 | +# Enum keys used with messages at the top level |
| 54 | +class MessageKeysEnum(str, Enum): |
| 55 | + TYPE = "type" |
| 56 | + PAYLOAD = "payload" |
| 57 | + |
| 58 | + |
| 59 | +# Enum for DUT Pairing Modes |
| 60 | +class DutPairingModeEnum(str, Enum): |
| 61 | + ON_NETWORK = "onnetwork" |
| 62 | + BLE_WIFI = "ble-wifi" |
| 63 | + BLE_THREAD = "ble-thread" |
| 64 | + WIFIPAF_WIFI = "wifipaf-wifi" |
| 65 | + NFC_THREAD = "nfc-thread" |
0 commit comments