~ubuntu-branches/ubuntu/saucy/nut/saucy

« back to all changes in this revision

Viewing changes to clients/upsmon.h

  • Committer: Bazaar Package Importer
  • Author(s): Reinhard Tartler
  • Date: 2005-07-20 19:48:50 UTC
  • mto: (16.1.1 squeeze)
  • mto: This revision was merged to the branch mainline in revision 4.
  • Revision ID: james.westby@ubuntu.com-20050720194850-oo61wjr33rrx2mre
Tags: upstream-2.0.2
ImportĀ upstreamĀ versionĀ 2.0.2

Show diffs side-by-side

added added

removed removed

Lines of Context:
19
19
 
20
20
/* flags for ups->status */
21
21
 
22
 
#define ST_ONLINE       0x001   /* UPS is on line (OL)                  */
23
 
#define ST_ONBATT       0x002   /* UPS is on battery (OB)               */
24
 
#define ST_LOWBATT      0x004   /* UPS has a low battery (LB)           */
 
22
#define ST_ONLINE       0x001   /* UPS is on line (OL)                  */
 
23
#define ST_ONBATT       0x002   /* UPS is on battery (OB)               */
 
24
#define ST_LOWBATT      0x004   /* UPS has a low battery (LB)           */
25
25
#define ST_FSD          0x008   /* master has set forced shutdown flag  */
26
 
#define ST_MASTER       0x010   /* we are the master on this UPS        */
 
26
#define ST_MASTER       0x010   /* we are the master on this UPS        */
27
27
/* was ST_ALIVE 0x020 */
28
 
#define ST_LOGIN        0x040   /* we are logged into this UPS          */
 
28
#define ST_LOGIN        0x040   /* we are logged into this UPS          */
29
29
/* was ST_FIRST 0x080 */
30
30
#define ST_CONNECTED    0x100   /* upscli_connect returned OK           */
31
31
 
37
37
typedef struct {
38
38
        UPSCONN conn;                   /* upsclient state descriptor   */
39
39
 
40
 
        char    *sys;                   /* raw system name from .conf   */
41
 
        char    *upsname;               /* just upsname                 */
 
40
        char    *sys;                   /* raw system name from .conf   */
 
41
        char    *upsname;               /* just upsname                 */
42
42
        char    *hostname;              /* just hostname                */
43
43
        int     port;                   /* just the port                */
44
44
 
45
 
        int     old;                    /* use REQ instead of GET, etc. */
46
 
 
47
 
        int     pv;                     /* power value from conf        */
 
45
        int     pv;                     /* power value from conf        */
48
46
        char    *un;                    /* username (optional for now)  */
49
 
        char    *pw;                    /* password from conf           */
50
 
        int     status;                 /* status (see flags above)     */
 
47
        char    *pw;                    /* password from conf           */
 
48
        int     status;                 /* status (see flags above)     */
51
49
        int     retain;                 /* tracks deletions at reload   */
52
50
 
53
51
        /* handle suppression of COMMOK and ONLINE at startup */
58
56
        time_t  lastnoncrit;            /* time of last non-crit poll   */
59
57
        time_t  lastrbwarn;             /* time of last REPLBATT warning*/
60
58
        time_t  lastncwarn;             /* time of last NOCOMM warning  */
61
 
        void    *next;
 
59
        void    *next;
62
60
}       utype;
63
61
 
64
62
/* notify identifiers */
86
84
 
87
85
struct {
88
86
        int     type;
89
 
        char    *name;
 
87
        const   char    *name;
90
88
        char    *msg;           /* points at stockmsg until overridden */
91
89
        char    *stockmsg;
92
90
        int     flags;