smartmontools  SVN Rev 5304
Utility to control and monitor storage systems with "S.M.A.R.T."
dev_ata_cmd_set.h
Go to the documentation of this file.
1 /*
2  * dev_ata_cmd_set.h
3  *
4  * Home page of code is: https://www.smartmontools.org
5  *
6  * Copyright (C) 2008-21 Christian Franke
7  *
8  * SPDX-License-Identifier: GPL-2.0-or-later
9  */
10 
11 #ifndef DEV_ATA_CMD_SET_H
12 #define DEV_ATA_CMD_SET_H
13 
14 #define DEV_ATA_CMD_SET_H_CVSID "$Id: dev_ata_cmd_set.h 5198 2021-02-01 20:36:02Z chrfranke $"
15 
16 #include "atacmds.h" // smart_command_set
17 #include "dev_interface.h"
18 
19 /////////////////////////////////////////////////////////////////////////////
20 // ata_device_with_command_set
21 
22 /// Adapter class to implement new ATA pass through old interface.
23 
25 : public /*implements*/ ata_device
26 {
27 public:
28  /// ATA pass through mapped to ata_command_interface().
29  virtual bool ata_pass_through(const ata_cmd_in & in, ata_cmd_out & out) override;
30 
31 protected:
32  /// Old ATA interface called by ata_pass_through()
33  virtual int ata_command_interface(smart_command_set command, int select, char * data) = 0;
34 
37 };
38 
39 #endif // DEV_ATA_CMD_SET_H
smart_command_set
Definition: atacmds.h:29
Adapter class to implement new ATA pass through old interface.
virtual int ata_command_interface(smart_command_set command, int select, char *data)=0
Old ATA interface called by ata_pass_through()
virtual bool ata_pass_through(const ata_cmd_in &in, ata_cmd_out &out) override
ATA pass through mapped to ata_command_interface().
ATA device access.
Base class for all devices.
Definition: dev_interface.h:33
ptr_t data
Definition: megaraid.h:15
ATA pass through input parameters.
ATA pass through output parameters.