Display the state transition for an application using the following
function where appName is the name of the application,
appState is the state of the application, and
actionStatus is the status of an action performed on the
application.
function applicationStateCallback(appName, appState, actionStatus)
if actionStatus
switch appState
case linux.AppState.IDLE
disp(['application ' appName ' has moved to idle state.']);
case linux.AppState.RUNNING
disp(['application ' appName ' has moved to running state.']);
case linux.AppState.SUSPENDED
disp(['application ' appName ' has moved to suspended state.']);
endelse
disp(['Action performed on application ' appName ' has failed']);
endend
tg.setApplicationStateCallback(@applicationStateCallback);
Provide a function with required action to occur when state of the application gets
changed. A callback is expected to have 3 input arguments specifying application name,
application state, and status of an action performed on the application.
You clicked a link that corresponds to this MATLAB command:
Run the command by entering it in the MATLAB Command Window.
Web browsers do not support MATLAB commands.
Seleccione un país/idioma
Seleccione un país/idioma para obtener contenido traducido, si está disponible, y ver eventos y ofertas de productos y servicios locales. Según su ubicación geográfica, recomendamos que seleccione: .
También puede seleccionar uno de estos países/idiomas:
Cómo obtener el mejor rendimiento
Seleccione China (en idioma chino o inglés) para obtener el mejor rendimiento. Los sitios web de otros países no están optimizados para ser accedidos desde su ubicación geográfica.