1# Copyright (c) 2013 The Chromium OS Authors. All rights reserved. 2# Use of this source code is governed by a BSD-style license that can be 3# found in the LICENSE file. 4 5 6class CellularSystemError(Exception): 7 """ 8 """ 9 pass 10 11 12class BadState(CellularSystemError): 13 """ 14 Indicates the state of the test system is unexpected. For example: 15 when the call drops unexpectedly; or setting a call-box to Band 13, but 16 a Band? query produces 14. 17 """ 18 pass 19 20 21class BadScpiCommand(CellularSystemError): 22 """ 23 Indicates the SCPI command was rejected by the instrument, or that the 24 SCPI query did not return a valid result. 25 """ 26 pass 27 28class ConnectionFailure(CellularSystemError): 29 """ 30 Indicates a connection failure with the cellular network used for the test. 31 For example, the cellular network was not found, an unexpected connection 32 drop happened, etc. 33 """ 34 pass 35 36class SocketTimeout(CellularSystemError): 37 """ 38 Indicates the socket component of a connection exceeded a time limit 39 without a response. This happens when the socket is closed unexpectedly, 40 if if there are network problems with reaching the remote. This usually 41 does not provide information about the instrument, this failure happens 42 before the instrument gets the command. 43 """ 44 pass 45 46 47class InstrumentTimeout(CellularSystemError): 48 """ 49 Indicates a working communication channel to the instrument, and a valid 50 command, but the command took too long to run. 51 """ 52 pass 53 54 55class ChromebookHardwareTimeout(CellularSystemError): 56 """ 57 Indicates an operation took longer then the time allowed. This can 58 be used for cellular GPIB instruments or cellular hardware on the 59 Chromebook. 60 """ 61 pass 62