Anthony96922/mpxgen

Update RT using http request

Opened this issue · 5 comments

Hi, Anthony! Can I update RT using data received via an http request?

Use wget to get the RT then write it to the FIFO control pipe.

Use wget to get the RT then write it to the FIFO control pipe.

The problem is that I do not know how to write an update script for FIFO :)

Do you want to get the data from a stream?

No, there is no data in my stream. I want to take track names from a file

If the RT is written to a file, your script could look like this:

oldRt = ""
newRt = ""

while(true) {
  newRt = getFileContents(filename)
  if (newRt != oldRt) { // update only if RT has changed
    write(rds-control, "RT " newRt)
    oldRt = newRt
  }
  sleep(5)
}

I like to know what you're using so I could help you write a script.