:orphan: .. index:: pair: group; Configurator API for Agent job control (tapi_cfg_job) .. _doxid-group__tapi__cfg__job: Configurator API for Agent job control (tapi_cfg_job) ===================================================== .. toctree:: :hidden: enum_cfg_job_exit_status_type_t.rst struct_cfg_job_exit_status_t.rst Overview ~~~~~~~~ Configurator API for Agent job control. :ref:`More...` .. ref-code-block:: cpp :class: doxyrest-overview-code-block // typedefs typedef enum :ref:`cfg_job_exit_status_type_t` :ref:`cfg_job_exit_status_type_t`; typedef struct :ref:`cfg_job_exit_status_t` :ref:`cfg_job_exit_status_t`; // enums enum :ref:`cfg_job_exit_status_type_t`; // structs struct :ref:`cfg_job_exit_status_t`; // global variables const :ref:`tapi_job_methods_t` :ref:`cfg_job_methods`; :ref:`tapi_job_method_create` :ref:`cfg_job_create`; :ref:`tapi_job_method_start` :ref:`cfg_job_start`; :ref:`tapi_job_method_kill` :ref:`cfg_job_kill`; :ref:`tapi_job_method_killpg` :ref:`cfg_job_killpg`; :ref:`tapi_job_method_wait` :ref:`cfg_job_wait`; :ref:`tapi_job_method_stop` :ref:`cfg_job_stop`; :ref:`tapi_job_method_destroy` :ref:`cfg_job_destroy`; :ref:`tapi_job_method_set_workdir` :ref:`cfg_job_set_workdir`; :ref:`tapi_job_method_set_autorestart` :ref:`cfg_job_set_autorestart`; :ref:`tapi_job_method_get_autorestart` :ref:`cfg_job_get_autorestart`; :ref:`tapi_job_method_recreate` :ref:`cfg_job_recreate`; .. _details-group__tapi__cfg__job: Detailed Documentation ~~~~~~~~~~~~~~~~~~~~~~ Configurator API for Agent job control. Since the API is based on "/agent/process" Configurator subtree, terms "job" and "process" are used interchangeably in this file. Copyright (C) 2020-2022 OKTET Labs Ltd. All rights reserved. Typedefs -------- .. index:: pair: typedef; cfg_job_exit_status_type_t .. _doxid-group__tapi__cfg__job_1gafd0473bc6f96f4d145708936ceef6bb9: .. ref-code-block:: cpp :class: doxyrest-title-code-block typedef enum :ref:`cfg_job_exit_status_type_t` cfg_job_exit_status_type_t Cause of process termination .. index:: pair: typedef; cfg_job_exit_status_t .. _doxid-group__tapi__cfg__job_1gab693e98c31189c212efa51549cd77647: .. ref-code-block:: cpp :class: doxyrest-title-code-block typedef struct :ref:`cfg_job_exit_status_t` cfg_job_exit_status_t Structure that represents status of a terminated process Global Variables ---------------- .. index:: pair: variable; cfg_job_methods .. _doxid-group__tapi__cfg__job_1ga452147b6f73ac1ff6c3da8b3768cc87b: .. ref-code-block:: cpp :class: doxyrest-title-code-block const :ref:`tapi_job_methods_t` cfg_job_methods Methods for job created by CFG factory .. index:: pair: variable; cfg_job_create .. _doxid-group__tapi__cfg__job_1gaea2ee735735513b83b421bb86de75107: .. ref-code-block:: cpp :class: doxyrest-title-code-block :ref:`tapi_job_method_create` cfg_job_create Create a job .. rubric:: See also: :ref:`tapi_job_method_create ` .. index:: pair: variable; cfg_job_start .. _doxid-group__tapi__cfg__job_1ga1e25acadb9135609f3b20770c8398d7b: .. ref-code-block:: cpp :class: doxyrest-title-code-block :ref:`tapi_job_method_start` cfg_job_start Start a job .. rubric:: See also: :ref:`tapi_job_method_start ` .. index:: pair: variable; cfg_job_kill .. _doxid-group__tapi__cfg__job_1ga9c57ac38933cb43d05fb9f0b238771fe: .. ref-code-block:: cpp :class: doxyrest-title-code-block :ref:`tapi_job_method_kill` cfg_job_kill Send a signal to the job .. rubric:: See also: :ref:`tapi_job_method_kill ` .. index:: pair: variable; cfg_job_killpg .. _doxid-group__tapi__cfg__job_1ga07ec053ed783ba193244c7bd431e8df3: .. ref-code-block:: cpp :class: doxyrest-title-code-block :ref:`tapi_job_method_killpg` cfg_job_killpg Send a signal to the job's proccess group .. rubric:: See also: :ref:`tapi_job_method_killpg ` .. index:: pair: variable; cfg_job_wait .. _doxid-group__tapi__cfg__job_1gad288f148aa3fbbe1ec9a0f7989f22715: .. ref-code-block:: cpp :class: doxyrest-title-code-block :ref:`tapi_job_method_wait` cfg_job_wait Wait for a job completion Negative ``timeout_ms`` blocks the test execution until the job changes its status. Zero return value may also mean that the job was never started. .. rubric:: See also: :ref:`tapi_job_method_wait ` .. index:: pair: variable; cfg_job_stop .. _doxid-group__tapi__cfg__job_1ga96cd5b1735a8f90dbf67249f40b9f2ae: .. ref-code-block:: cpp :class: doxyrest-title-code-block :ref:`tapi_job_method_stop` cfg_job_stop Stop a job Parameters ``signo`` and ``term_timeout_ms`` are ignored, use ``-1`` to avoid warnings .. rubric:: See also: :ref:`tapi_job_method_stop ` .. index:: pair: variable; cfg_job_destroy .. _doxid-group__tapi__cfg__job_1gacf1c9ce313571353c1dca7a95cbc2a59: .. ref-code-block:: cpp :class: doxyrest-title-code-block :ref:`tapi_job_method_destroy` cfg_job_destroy Destroy a job Parameter ``term_timeout_ms`` is ignored, use ``-1`` to avoid warning .. rubric:: See also: :ref:`tapi_job_method_destroy ` .. index:: pair: variable; cfg_job_set_workdir .. _doxid-group__tapi__cfg__job_1ga1540910245bbfd8036eb1f2619bc603b: .. ref-code-block:: cpp :class: doxyrest-title-code-block :ref:`tapi_job_method_set_workdir` cfg_job_set_workdir Set new working directory for a job. This function should be called before the job is started. .. rubric:: See also: :ref:`tapi_job_method_set_workdir ` .. index:: pair: variable; cfg_job_set_autorestart .. _doxid-group__tapi__cfg__job_1gac8ce8a8535bd285e00e1e50f2a78b3f3: .. ref-code-block:: cpp :class: doxyrest-title-code-block :ref:`tapi_job_method_set_autorestart` cfg_job_set_autorestart Set autorestart timeout for a job This function should be called before the job is started .. rubric:: See also: :ref:`tapi_job_method_set_autorestart ` .. index:: pair: variable; cfg_job_get_autorestart .. _doxid-group__tapi__cfg__job_1ga98834c667c25449c23ed52dcd63b08ff: .. ref-code-block:: cpp :class: doxyrest-title-code-block :ref:`tapi_job_method_get_autorestart` cfg_job_get_autorestart Get autorestart timeout of a job .. rubric:: See also: :ref:`tapi_job_method_get_autorestart ` .. index:: pair: variable; cfg_job_recreate .. _doxid-group__tapi__cfg__job_1ga50238eceb2ccfcdb5ac5fb4b021f0a28: .. ref-code-block:: cpp :class: doxyrest-title-code-block :ref:`tapi_job_method_recreate` cfg_job_recreate Retrieve information about a job from Configurator At this moment the function only checks that a process corresponding to the job exists, but later it might be extended to extract additional job data .. rubric:: See also: :ref:`tapi_job_method_recreate `