ifs_status.py 741 Bytes
Newer Older
chenwei@shao.ac.cn's avatar
chenwei@shao.ac.cn committed
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
"""
Identifier:     KSC-SJ6-csst_ifs_common/ifs_status.py
Name:           ifs_status.py
Description:    CSST IFS Status
Author:         Wei Chen
"""

from enum import IntEnum


class CsstIFSStatus(IntEnum):
    """
    The CSST IFS Status class.

    This class provides a set of status which should be returned
    from each CSST L1 IFS functional module.

    Examples
    --------
    >>> def f(num):
    >>>     if num > 0:
    >>>         return CsstIFSStatus.PERFECT
    >>>     return CsstIFSStatus.ERROR
    """
    PERFECT = 0
    WARNING = 1
    ERROR = 2
    # status list to be completed

#
# class IFSError(Exception):
#     def __init__(self, msg):
#         self.msg = msg
#
#     def __str__(self):
#         return self.msg