File: raidmeter.h

package info (click to toggle)
xosview 1.7.3-1
  • links: PTS
  • area: main
  • in suites: potato
  • size: 1,000 kB
  • ctags: 1,200
  • sloc: cpp: 7,317; sh: 1,760; ansic: 368; makefile: 46; awk: 20
file content (46 lines) | stat: -rw-r--r-- 894 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
//  
//  Copyright (c) 1999 Thomas Waldmann ( ThomasWaldmann@gmx.de )
//  based on work of Mike Romberg ( romberg@fsl.noaa.gov )
//
//  This file may be distributed under terms of the GPL
//
#ifndef _RAIDMETER_H_
#define _RAIDMETER_H_

#include "bitfieldmeter.h"

#define MAX_MD 8

class RAIDMeter : public BitFieldMeter {
public:
  RAIDMeter( XOSView *parent, int raiddev = 0);
  ~RAIDMeter( void );

  void checkevent( void );

  void checkResources( void );

  static int countRAIDs( void );
  
protected:

  int _raiddev;
  static int mdnum;

  char state[20],
       type[20],
       working_map[20],
       resync_state[20];
  int  disknum;
  
  unsigned long doneColor_, todoColor_, completeColor_;
    
  int find1(char *key, char *findwhat, int num1);
  int find2(char *key, char *findwhat, int num1, int num2);

  int raidparse(char *cp);
    
  void getRAIDstate( void );
};

#endif