Skip to main content
. 2022 Jan 13;22(2):612. doi: 10.3390/s22020612
Algorithm 1. Serial connection, RSSI request, message construction and logfile update.
  1. Input: serial object

  2. while continuous loop until exception or program interruption do

  3.  Serial connection to mobile station

  4.  RRSI request

  5.  Response read and parse result in variable (result)

  6.  Close serial connection

  7. if result is not valid then

  8.  Exception handling

  9. else (program continuation)

  10.    Conversion of result according to a RSSI lookup table

  11.    Increment the message counter (msg_count++)

  12.    SDS message construction (contains result and msg_count)

  13.    Serial connection to mobile station

  14.    Send SDS message to the destination

  15.    Close serial connection

  16.    Write content of SDS message in local logfile

  17. end

  18. end