How to use the rak811.rak811.ErrorCode function in rak811

To help you get started, we’ve selected a few rak811 examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github AmedeeBulle / pyrak811 / rak811 / rak811.py View on Github external
MAC_BUSY_ERR = -6
    TX_ERR = -7
    INTER_ERR = -8
    WR_CFG_ERR = -11
    RD_CFG_ERR = -12
    TX_LEN_LIMITE_ERR = -13
    UNKNOWN_ERR = -20


ERROR_MESSAGE = {
    ErrorCode.ARG_ERR: 'Invalid argument',
    ErrorCode.ARG_NOT_FIND: 'Argument not found',
    ErrorCode.JOIN_ABP_ERR: 'ABP join error',
    ErrorCode.JOIN_OTAA_ERR: 'OTAA join error',
    ErrorCode.NOT_JOIN: 'Not joined',
    ErrorCode.MAC_BUSY_ERR: 'MAC busy',
    ErrorCode.TX_ERR: 'Transmit error',
    ErrorCode.INTER_ERR: 'Inter error',
    ErrorCode.WR_CFG_ERR: 'Write configuration error',
    ErrorCode.RD_CFG_ERR: 'Read configuration Error',
    ErrorCode.TX_LEN_LIMITE_ERR: 'Transmit len limit error',
    ErrorCode.UNKNOWN_ERR: 'Unknown error',
}


class EventCode(IntEnum):
    """AT commands event codes."""

    RECV_DATA = 0
    TX_COMFIRMED = 1
    TX_UNCOMFIRMED = 2
    JOINED_SUCCESS = 3
github AmedeeBulle / pyrak811 / rak811 / rak811.py View on Github external
ARG_NOT_FIND = -2
    JOIN_ABP_ERR = -3
    JOIN_OTAA_ERR = -4
    NOT_JOIN = -5
    MAC_BUSY_ERR = -6
    TX_ERR = -7
    INTER_ERR = -8
    WR_CFG_ERR = -11
    RD_CFG_ERR = -12
    TX_LEN_LIMITE_ERR = -13
    UNKNOWN_ERR = -20


ERROR_MESSAGE = {
    ErrorCode.ARG_ERR: 'Invalid argument',
    ErrorCode.ARG_NOT_FIND: 'Argument not found',
    ErrorCode.JOIN_ABP_ERR: 'ABP join error',
    ErrorCode.JOIN_OTAA_ERR: 'OTAA join error',
    ErrorCode.NOT_JOIN: 'Not joined',
    ErrorCode.MAC_BUSY_ERR: 'MAC busy',
    ErrorCode.TX_ERR: 'Transmit error',
    ErrorCode.INTER_ERR: 'Inter error',
    ErrorCode.WR_CFG_ERR: 'Write configuration error',
    ErrorCode.RD_CFG_ERR: 'Read configuration Error',
    ErrorCode.TX_LEN_LIMITE_ERR: 'Transmit len limit error',
    ErrorCode.UNKNOWN_ERR: 'Unknown error',
}


class EventCode(IntEnum):
    """AT commands event codes."""
github AmedeeBulle / pyrak811 / rak811 / rak811.py View on Github external
def __init__(self, code):
        """Just assign return codes."""
        try:
            self.errno = int(code)
        except ValueError:
            self.errno = code

        if self.errno in ERROR_MESSAGE:
            self.strerror = ERROR_MESSAGE[self.errno]
        else:
            self.strerror = ERROR_MESSAGE[ErrorCode.UNKNOWN_ERR]
        super().__init__(('[Errno {}] {}').format(self.errno, self.strerror))
github AmedeeBulle / pyrak811 / rak811 / rak811.py View on Github external
TX_LEN_LIMITE_ERR = -13
    UNKNOWN_ERR = -20


ERROR_MESSAGE = {
    ErrorCode.ARG_ERR: 'Invalid argument',
    ErrorCode.ARG_NOT_FIND: 'Argument not found',
    ErrorCode.JOIN_ABP_ERR: 'ABP join error',
    ErrorCode.JOIN_OTAA_ERR: 'OTAA join error',
    ErrorCode.NOT_JOIN: 'Not joined',
    ErrorCode.MAC_BUSY_ERR: 'MAC busy',
    ErrorCode.TX_ERR: 'Transmit error',
    ErrorCode.INTER_ERR: 'Inter error',
    ErrorCode.WR_CFG_ERR: 'Write configuration error',
    ErrorCode.RD_CFG_ERR: 'Read configuration Error',
    ErrorCode.TX_LEN_LIMITE_ERR: 'Transmit len limit error',
    ErrorCode.UNKNOWN_ERR: 'Unknown error',
}


class EventCode(IntEnum):
    """AT commands event codes."""

    RECV_DATA = 0
    TX_COMFIRMED = 1
    TX_UNCOMFIRMED = 2
    JOINED_SUCCESS = 3
    JOINED_FAILED = 4
    TX_TIMEOUT = 5
    RX2_TIMEOUT = 6
    DOWNLINK_REPEATED = 7
    WAKE_UP = 8
github AmedeeBulle / pyrak811 / rak811 / rak811.py View on Github external
ARG_ERR = -1
    ARG_NOT_FIND = -2
    JOIN_ABP_ERR = -3
    JOIN_OTAA_ERR = -4
    NOT_JOIN = -5
    MAC_BUSY_ERR = -6
    TX_ERR = -7
    INTER_ERR = -8
    WR_CFG_ERR = -11
    RD_CFG_ERR = -12
    TX_LEN_LIMITE_ERR = -13
    UNKNOWN_ERR = -20


ERROR_MESSAGE = {
    ErrorCode.ARG_ERR: 'Invalid argument',
    ErrorCode.ARG_NOT_FIND: 'Argument not found',
    ErrorCode.JOIN_ABP_ERR: 'ABP join error',
    ErrorCode.JOIN_OTAA_ERR: 'OTAA join error',
    ErrorCode.NOT_JOIN: 'Not joined',
    ErrorCode.MAC_BUSY_ERR: 'MAC busy',
    ErrorCode.TX_ERR: 'Transmit error',
    ErrorCode.INTER_ERR: 'Inter error',
    ErrorCode.WR_CFG_ERR: 'Write configuration error',
    ErrorCode.RD_CFG_ERR: 'Read configuration Error',
    ErrorCode.TX_LEN_LIMITE_ERR: 'Transmit len limit error',
    ErrorCode.UNKNOWN_ERR: 'Unknown error',
}


class EventCode(IntEnum):
    """AT commands event codes."""
github AmedeeBulle / pyrak811 / rak811 / rak811.py View on Github external
TX_ERR = -7
    INTER_ERR = -8
    WR_CFG_ERR = -11
    RD_CFG_ERR = -12
    TX_LEN_LIMITE_ERR = -13
    UNKNOWN_ERR = -20


ERROR_MESSAGE = {
    ErrorCode.ARG_ERR: 'Invalid argument',
    ErrorCode.ARG_NOT_FIND: 'Argument not found',
    ErrorCode.JOIN_ABP_ERR: 'ABP join error',
    ErrorCode.JOIN_OTAA_ERR: 'OTAA join error',
    ErrorCode.NOT_JOIN: 'Not joined',
    ErrorCode.MAC_BUSY_ERR: 'MAC busy',
    ErrorCode.TX_ERR: 'Transmit error',
    ErrorCode.INTER_ERR: 'Inter error',
    ErrorCode.WR_CFG_ERR: 'Write configuration error',
    ErrorCode.RD_CFG_ERR: 'Read configuration Error',
    ErrorCode.TX_LEN_LIMITE_ERR: 'Transmit len limit error',
    ErrorCode.UNKNOWN_ERR: 'Unknown error',
}


class EventCode(IntEnum):
    """AT commands event codes."""

    RECV_DATA = 0
    TX_COMFIRMED = 1
    TX_UNCOMFIRMED = 2
    JOINED_SUCCESS = 3
    JOINED_FAILED = 4
github AmedeeBulle / pyrak811 / rak811 / rak811.py View on Github external
JOIN_OTAA_ERR = -4
    NOT_JOIN = -5
    MAC_BUSY_ERR = -6
    TX_ERR = -7
    INTER_ERR = -8
    WR_CFG_ERR = -11
    RD_CFG_ERR = -12
    TX_LEN_LIMITE_ERR = -13
    UNKNOWN_ERR = -20


ERROR_MESSAGE = {
    ErrorCode.ARG_ERR: 'Invalid argument',
    ErrorCode.ARG_NOT_FIND: 'Argument not found',
    ErrorCode.JOIN_ABP_ERR: 'ABP join error',
    ErrorCode.JOIN_OTAA_ERR: 'OTAA join error',
    ErrorCode.NOT_JOIN: 'Not joined',
    ErrorCode.MAC_BUSY_ERR: 'MAC busy',
    ErrorCode.TX_ERR: 'Transmit error',
    ErrorCode.INTER_ERR: 'Inter error',
    ErrorCode.WR_CFG_ERR: 'Write configuration error',
    ErrorCode.RD_CFG_ERR: 'Read configuration Error',
    ErrorCode.TX_LEN_LIMITE_ERR: 'Transmit len limit error',
    ErrorCode.UNKNOWN_ERR: 'Unknown error',
}


class EventCode(IntEnum):
    """AT commands event codes."""

    RECV_DATA = 0
    TX_COMFIRMED = 1
github AmedeeBulle / pyrak811 / rak811 / rak811.py View on Github external
INTER_ERR = -8
    WR_CFG_ERR = -11
    RD_CFG_ERR = -12
    TX_LEN_LIMITE_ERR = -13
    UNKNOWN_ERR = -20


ERROR_MESSAGE = {
    ErrorCode.ARG_ERR: 'Invalid argument',
    ErrorCode.ARG_NOT_FIND: 'Argument not found',
    ErrorCode.JOIN_ABP_ERR: 'ABP join error',
    ErrorCode.JOIN_OTAA_ERR: 'OTAA join error',
    ErrorCode.NOT_JOIN: 'Not joined',
    ErrorCode.MAC_BUSY_ERR: 'MAC busy',
    ErrorCode.TX_ERR: 'Transmit error',
    ErrorCode.INTER_ERR: 'Inter error',
    ErrorCode.WR_CFG_ERR: 'Write configuration error',
    ErrorCode.RD_CFG_ERR: 'Read configuration Error',
    ErrorCode.TX_LEN_LIMITE_ERR: 'Transmit len limit error',
    ErrorCode.UNKNOWN_ERR: 'Unknown error',
}


class EventCode(IntEnum):
    """AT commands event codes."""

    RECV_DATA = 0
    TX_COMFIRMED = 1
    TX_UNCOMFIRMED = 2
    JOINED_SUCCESS = 3
    JOINED_FAILED = 4
    TX_TIMEOUT = 5
github AmedeeBulle / pyrak811 / rak811 / rak811.py View on Github external
RD_CFG_ERR = -12
    TX_LEN_LIMITE_ERR = -13
    UNKNOWN_ERR = -20


ERROR_MESSAGE = {
    ErrorCode.ARG_ERR: 'Invalid argument',
    ErrorCode.ARG_NOT_FIND: 'Argument not found',
    ErrorCode.JOIN_ABP_ERR: 'ABP join error',
    ErrorCode.JOIN_OTAA_ERR: 'OTAA join error',
    ErrorCode.NOT_JOIN: 'Not joined',
    ErrorCode.MAC_BUSY_ERR: 'MAC busy',
    ErrorCode.TX_ERR: 'Transmit error',
    ErrorCode.INTER_ERR: 'Inter error',
    ErrorCode.WR_CFG_ERR: 'Write configuration error',
    ErrorCode.RD_CFG_ERR: 'Read configuration Error',
    ErrorCode.TX_LEN_LIMITE_ERR: 'Transmit len limit error',
    ErrorCode.UNKNOWN_ERR: 'Unknown error',
}


class EventCode(IntEnum):
    """AT commands event codes."""

    RECV_DATA = 0
    TX_COMFIRMED = 1
    TX_UNCOMFIRMED = 2
    JOINED_SUCCESS = 3
    JOINED_FAILED = 4
    TX_TIMEOUT = 5
    RX2_TIMEOUT = 6
    DOWNLINK_REPEATED = 7
github AmedeeBulle / pyrak811 / rak811 / rak811.py View on Github external
JOIN_ABP_ERR = -3
    JOIN_OTAA_ERR = -4
    NOT_JOIN = -5
    MAC_BUSY_ERR = -6
    TX_ERR = -7
    INTER_ERR = -8
    WR_CFG_ERR = -11
    RD_CFG_ERR = -12
    TX_LEN_LIMITE_ERR = -13
    UNKNOWN_ERR = -20


ERROR_MESSAGE = {
    ErrorCode.ARG_ERR: 'Invalid argument',
    ErrorCode.ARG_NOT_FIND: 'Argument not found',
    ErrorCode.JOIN_ABP_ERR: 'ABP join error',
    ErrorCode.JOIN_OTAA_ERR: 'OTAA join error',
    ErrorCode.NOT_JOIN: 'Not joined',
    ErrorCode.MAC_BUSY_ERR: 'MAC busy',
    ErrorCode.TX_ERR: 'Transmit error',
    ErrorCode.INTER_ERR: 'Inter error',
    ErrorCode.WR_CFG_ERR: 'Write configuration error',
    ErrorCode.RD_CFG_ERR: 'Read configuration Error',
    ErrorCode.TX_LEN_LIMITE_ERR: 'Transmit len limit error',
    ErrorCode.UNKNOWN_ERR: 'Unknown error',
}


class EventCode(IntEnum):
    """AT commands event codes."""

    RECV_DATA = 0