PetscTextBelt#

Sends an SMS to an American/Canadian phone number

Synopsis#

PetscErrorCode PetscTextBelt(MPI_Comm comm, const char number[], const char message[], PetscBool *flg)

Not Collective, only the first process in MPI_Comm does anything

Input Parameters#

  • comm - the MPI communicator

  • number - the 10 digit telephone number

  • message - the message

Output Parameter#

Options Database Key#

  • -textbelt <phonenumber[,message]> - sends a message to this number when the program ends

Notes#

TextBelt is run for testing purposes only, please do not use this feature often

As of November 2016 this service does not seem to be actually transmitting the SMS, which is unfortunate since it is such a great service. Consider registering and using PetscTellMyCell() instead. Or email us with other alternatives we might add or make a pull request.

Developer Note#

I do not know how to make the buff[] long enough to receive the “success” string but short enough that the code does not hang waiting for part of the message to arrive that does not exist, hence the success flg may be improperly set to false even though the message was delivered.

See Also#

PetscTellMyCell(), PetscOpenSocket(), PetscHTTPRequest()

Level#

intermediate

Location#

src/sys/webclient/textbelt.c


Edit on GitLab

Index of all Sys routines
Table of Contents for all manual pages
Index of all manual pages