#!/usr/bin/env python3 # -*- coding: utf-8 -*- # Copyright 2023 NXP # SPDX-License-Identifier: BSD-3-Clause import json import posix_ipc import time import sys import os if __name__ == "__main__": mq = posix_ipc.MessageQueue("/command_queue") #Enqueue with send, str,Send unicode params = sys.argv[2] if sys.argv[2] == '4': os.system("killall smart-kitchen-gui") elif sys.argv[2] == '3': if os.system("ps -a | grep \"smart-kitchen-gui\" ") != 0: os.system("/home/root/.nxp-demo-experience/scripts/multimedia/smart-kitchen/smart-kitchen-gui & ") else: mq.send(params) print("running " + sys.argv[0]) print("command id: " + sys.argv[2]) print("ended")