AcsLibrarySlot.hpp 3.39 KB
Newer Older
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
/******************************************************************************
 *
 * This file is part of the Castor project.
 * See http://castor.web.cern.ch/castor
 *
 * Copyright (C) 2003  CERN
 * This program is free software; you can redistribute it and/or
 * modify it under the terms of the GNU General Public License
 * as published by the Free Software Foundation; either version 2
 * of the License, or (at your option) any later version.
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 * You should have received a copy of the GNU General Public License
 * along with this program; if not, write to the Free Software
 * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
 *
 * @author Castor Dev team, castor-dev@cern.ch
 *****************************************************************************/

#pragma once

24
#include "castor/exception/InvalidArgument.hpp"
25
#include "castor/mediachanger/LibrarySlot.hpp"
26

27
28
29
30
31
32
33
34
#include <stdint.h>

namespace castor {
namespace mediachanger {

/**
 * Class reprsenting a slot in an ACS tape-library.
 */
35
class AcsLibrarySlot: public LibrarySlot {
36
37
38
39
40
41
42
43
44
45
public:

  /**
   * Default constructor that sets all integer members to 0.
   */
  AcsLibrarySlot() throw();

  /**
   * Constructor.
   *
46
47
48
49
   * @param acs The acs component of the library slot.
   * @param lsm The lsm component of the library slot.
   * @param panel The panel component of the library slot.
   * @param drive The drive component of the library slot.
50
   */
51
52
53
54
55
56
57
58
  AcsLibrarySlot(const uint32_t acs, const uint32_t lsm,
    const uint32_t panel, const uint32_t drive) throw();

  /**
   * Destructor.
   */
  ~AcsLibrarySlot() throw();

59
  /**
60
   * Creates a clone of this object.
61
   *
62
   * @return The clone.
63
   */
64
65
  LibrarySlot *clone();

66
67
68
69
70
  /**
   * Gets the acs component of the library slot.
   *
   * @return the acs component of the library slot.
   */
71
  uint32_t getAcs() const throw();
72
73
74
75
76
77

  /**
   * Gets the lsm component of the library slot.
   *
   * @return the lsm component of the library slot.
   */
78
  uint32_t getLsm() const throw();
79
80
81
82
83
84

  /**
   * Gets the panel component of the library slot.
   *
   * @return the panel component of the library slot.
   */
85
  uint32_t getPanel() const throw();
86
87
88
89
90
91

  /**
   * Gets the drive component of the library slot.
   *
   * @return the drive component of the library slot.
   */
92
  uint32_t getDrive() const throw();
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114

private:

  /**
   * The acs component of the library slot.
   */
  uint32_t m_acs;

  /**
   * The lsm component of the library slot.
   */
  uint32_t m_lsm;

  /**
   * The panel component of the library slot.
   */
  uint32_t m_panel;

  /**
   * The drive component of the library slot.
   */
  uint32_t m_drive;
115
116
117
118
119
120
121
122
123
124
125
126

  /**
   * Returns the string representation of the specified ACS library slot.
   *
   * @param acs The acs component of the library slot.
   * @param lsm The lsm component of the library slot.
   * @param panel The panel component of the library slot.
   * @param drive The drive component of the library slot.
   * @return The string representation.
   */
  std::string librarySlotToString(const uint32_t acs, const uint32_t lsm,
    const uint32_t panel, const uint32_t drive) const;
127
128
129
130
131
  
}; // class AcsProxy

} // namespace mediachanger
} // namespace castor