/*
 *========================================================================
 *
 *   시스템명 : AZN_PLAZA_LANE APP
 *   파 일 명 : task_info.h
 *   작 성 자 : JBY
 *   작 성 일 : 2018.07.13
 *   수 정 일 :
 *   설    명 :
 *
 *========================================================================
*/

#ifndef    _TASK_H_
#define    _TASK_H_

#ifndef    NULL
#define    NULL                      0
#endif    /*NULL*/
#define    RESET                     0
#define    SET                       1

/* Definitions Of Task Status */
#define    TASK_STOP                 0
#define    TASK_RUN                  1
#define    TASK_PAUSE                2
#define    TASK_RESTART              3

/* Definition Of Task Information Structure */

typedef    struct
{
    int    task_id;        /* Task ID */
    int    proc_id;        /* Process ID */
    int    act;            /* 0 : stop, 1 : run, 2 : pause, 3 : restart */
    char   name[64];       /* Task & Execution Name */
    char   desc[64];       /* Description */
    int    argc;
    char   argv[4][64];
    int    queue_id;       /* message queue id */
    int    debug;          /* debug flag */
    int    fail;           /* fail count */
    int    run;            /* watchdog flag */
    int    opid;
    char   dummy[60];
} TASK_INFO;

#define    SZ_TASK_INFO        sizeof(TASK_INFO)
#define    MAX_TASKS       50

typedef struct
{
    TASK_INFO    task_info[MAX_TASKS];
} SYS_INFO;

#define    SZ_SYS_INFO        sizeof(SYS_INFO)

#define    MKEY_SYS_INFO        0x20031111
extern SYS_INFO    *system_info;
extern int    my_task_id;

#endif    /*_TASK_H_*/
