
import time
from Decoder import Decoder_main
from PubLibrary.RunOnce import is_program_running

if __name__ == "__main__":

    if not is_program_running():
        decoder = Decoder_main()
        decoder.connect()

        try:
            decoder.start()
            while not decoder.zmqServer.IsExitApp:
                time.sleep(1)
        except KeyboardInterrupt:
            decoder.stop()