versadac  1
versadac - Scalable Recorder Firmware
fb_archiver.h
1 /*******************************************************************************
2 FILE : fb_archiver.h
3 AUTHOR : Karl Wakeham
4 SYSTEM : VxWorks on ARM
5 DESCRIPTION : Archiver header file
6 *******************************************************************************/
7 #ifndef __ARCHIVER_H
8 #define __ARCHIVER_H
9 
10 #include "stdtypes.h"
11 
12 enum AM_RouteNumber
13 {
14  AM_MEDIA_ROUTE,
15  AM_FTP_ROUTE,
16  AM_NUMBER_OF_ROUTES
17 };
18 
19 typedef struct
20 {
21  uint8 *pUnattendedStrategy;
22  uint16 outputFormat; //binary / CSV / binary+CSV
23  uint8 *pDemandStrategy;
24  bool DemandHour;
25  bool DemandDay;
26  bool DemandWeek;
27  bool DemandMonth;
28  bool DemandAll;
29  bool DemandUpToDate;
30  bool StopArchive;
31  bool SuspendArchiving;
32  bool archivingSuspended;
33  bool ftpPrimaryFailed;
34  bool ftpSecondaryFailed;
35  bool mediaFailed;
36  bool transferInProgress;
37  double *pTimeLastWrite;
38 
40 
41 class AM_ArchiveControl;
42 
44 {
45  public:
46  friend class AM_ArchiveControl;
47  friend class AM_ArchiveManager;
48  friend class AM_Archiver;
49 
50  fb_archiver();
51  ~fb_archiver();
52 
53  void kill();
54  void recreate();
55  void copyNonVol();
56  void update(void);
57 
58  uint8 getActiveArchiveType();
59  AM_RouteFunction * getSpecifiedRoute(uint8 z_route){return &m_route[z_route];};
60 
61  private:
62 
63  char* getMediaRoot(int z_media);
64 
65  uint16 m_ftpOption;
66  uint16 m_mediaFullStrategy;
67  uint16 m_mediaPollPeriod;
68  uint16 m_numberOfGroups;
69  uint16 m_mediaPCFullLimit;
70  uint16 m_csvInclValues;
71  uint16 m_csvInclMessages;
72  uint16 m_csvInclHeaderInfo;
73  uint16 m_csvInclColumnHeadings;
74  uint16 m_csvTimeFormat;
75  uint16 m_csvUseTabDelimiter;
76  string_100 m_szUsbPath; // USB path
77  char **m_pszFtpPath; // Array of remote paths, each up to 40 chars long
78  string_40 m_szFtpPrimaryPassword; // Primary password up to 40 chars
79  string_100 m_szFtpPrimaryServer; // Primary host up to 104 chars
80  string_40 m_szFtpPrimaryUser; // Primary user up to 40 chars
81  string_40 m_szFtpSecondaryPassword; // Secondary password up to 40 chars
82  string_100 m_szFtpSecondaryServer; // Secondary host up to 104 chars
83  string_40 m_szFtpSecondaryUser; // Secondary user up to 40 chars
84  string_100 m_szDefaultMediaRoot;
85  string_100 m_szUnattendedMediaRoot;
86  string_100 m_szDemandedMediaRoot;
87  string_100 m_szCurrentMediaRoot;
88  queue_id m_pSystemQueue;
89  int32 m_pTimeZoneRawOffset;
90  uint8 m_pDemandMedia;
91  float64 m_mediaFree;
92  bool m_mediaFull;
93  bool m_mediaPCFull;
94  bool m_mediaMissing;
95  float64 m_mediaSize;
96  float64 m_timeMediaFull;
97  uint8 m_autoStrategy;
98  bool m_isConfiguredMedia;
99  AM_ArchiveControl *m_pArchiveControl;
100  AM_ArchiveManager *m_pArchiveManager;
101  AM_RouteFunction m_route[AM_NUMBER_OF_ROUTES];
102  uc_string_5 m_Country;
103  uc_string_5 m_Language;
104 };
105 
106 #endif // __ARCHIVER_H
Definition: stdtypes.h:189
Definition: fb_archiver.h:19
Definition: am_archiver.h:90
Definition: fb_archiver.h:43
Definition: am_archivecontrol.h:39
Definition: am_manager.h:12