Type alias EventTypes

EventTypes: {
    onClose: (() => void);
    onCommandResponse: ((data) => void);
    onDataReceived: ((data) => void);
    onInitialized: (() => void);
    onMemoryFull: ((data) => void);
    onNewIncomingCall: ((data) => void);
    onNewIncomingUSSD: ((data) => void);
    onNewSms: ((id) => void);
    onOpen: (() => void);
    onSmsSent: ((data) => void);
    onSmsSentFailed: ((data) => void);
    onWriteToModem: ((data) => void);
}

Type declaration

  • onClose: (() => void)

    Event triggered when the modem is successfully closed.

      • (): void
      • Event triggered when the modem is successfully closed.

        Returns void

  • onCommandResponse: ((data) => void)

    Event triggered when a command response is received from the modem.

    Param: data

    The response received from the modem after executing a command.

      • (data): void
      • Event triggered when a command response is received from the modem.

        Parameters

        • data: CommandResponse

          The response received from the modem after executing a command.

        Returns void

  • onDataReceived: ((data) => void)

    Event triggered when data is received from the modem.

    Param: data

    The data received from the modem.

      • (data): void
      • Event triggered when data is received from the modem.

        Parameters

        • data: string

          The data received from the modem.

        Returns void

  • onInitialized: (() => void)

    Event triggered when the modem is successfully initialized.

      • (): void
      • Event triggered when the modem is successfully initialized.

        Returns void

  • onMemoryFull: ((data) => void)

    Event triggered when the modem reports that the memory is full.

    Param: data

    Information about the SIM memory usage.

      • (data): void
      • Event triggered when the modem reports that the memory is full.

        Parameters

        Returns void

  • onNewIncomingCall: ((data) => void)

    Event triggered when a new incoming call is detected.

    Param: data

    Information about the incoming call.

      • (data): void
      • Event triggered when a new incoming call is detected.

        Parameters

        Returns void

  • onNewIncomingUSSD: ((data) => void)

    Event triggered when a new incoming USSD message is detected.

    Param: data

    Information about the incoming USSD message.

      • (data): void
      • Event triggered when a new incoming USSD message is detected.

        Parameters

        Returns void

  • onNewSms: ((id) => void)

    Event triggered when a new SMS is received.

    Param: id

    The id of the received SMS.

      • (id): void
      • Event triggered when a new SMS is received.

        Parameters

        • id: number

          The id of the received SMS.

        Returns void

  • onOpen: (() => void)

    Event triggered when the modem is successfully opened.

      • (): void
      • Event triggered when the modem is successfully opened.

        Returns void

  • onSmsSent: ((data) => void)

    Event triggered when an SMS is successfully sent.

    Param: data

    The successfully sent SMS.

      • (data): void
      • Event triggered when an SMS is successfully sent.

        Parameters

        Returns void

  • onSmsSentFailed: ((data) => void)

    Event triggered when an attempt to send an SMS fails.

    Param: data

    The failed SMS.

      • (data): void
      • Event triggered when an attempt to send an SMS fails.

        Parameters

        Returns void

  • onWriteToModem: ((data) => void)

    Event triggered when data is written to the modem.

    Param: data

    The data written to the modem.

      • (data): void
      • Event triggered when data is written to the modem.

        Parameters

        • data: string

          The data written to the modem.

        Returns void

Generated using TypeDoc