smartmontools SVN Rev 3317
Utility to control and monitor storage systems with "S.M.A.R.T."
Public Member Functions | Protected Types | Protected Member Functions
ata_device Class Reference

ATA device access. More...

#include <dev_interface.h>

Collaboration diagram for ata_device:
Collaboration graph

List of all members.

Public Member Functions

virtual bool ata_pass_through (const ata_cmd_in &in, ata_cmd_out &out)=0
 ATA pass through.
bool ata_pass_through (const ata_cmd_in &in)
 ATA pass through without output registers.
virtual bool ata_identify_is_cached () const
 Return true if OS caches ATA identify sector.

Protected Types

enum  {
  supports_data_out = 0x01, supports_smart_status = 0x02, supports_output_regs = 0x04, supports_multi_sector = 0x08,
  supports_48bit_hi_null = 0x10, supports_48bit = 0x20
 Flags for ata_cmd_is_supported(). More...

Protected Member Functions

bool ata_cmd_is_supported (const ata_cmd_in &in, unsigned flags, const char *type=0)
 Check command input parameters.
bool ata_cmd_is_ok (const ata_cmd_in &in, bool data_out_support=false, bool multi_sector_support=false, bool ata_48bit_support=false)
 Check command input parameters (old version).
void hide_ata (bool hide=true)
 Hide/unhide ATA interface.
 ata_device ()
 Default constructor, registers device as ATA.

Detailed Description

ATA device access.

Definition at line 490 of file dev_interface.h.

Member Enumeration Documentation

anonymous enum [protected]

Flags for ata_cmd_is_supported().


Definition at line 510 of file dev_interface.h.

Constructor & Destructor Documentation

ata_device::ata_device ( ) [inline, protected]

Default constructor, registers device as ATA.

Definition at line 544 of file dev_interface.h.

Member Function Documentation

bool ata_device::ata_cmd_is_ok ( const ata_cmd_in in,
bool  data_out_support = false,
bool  multi_sector_support = false,
bool  ata_48bit_support = false 
) [inline, protected]

Check command input parameters (old version).

Definition at line 527 of file dev_interface.h.

bool ata_device::ata_cmd_is_supported ( const ata_cmd_in in,
unsigned  flags,
const char *  type = 0 
) [protected]

Check command input parameters.

Return false if required features are not implemented. Calls set_err(...) accordingly.

Definition at line 142 of file dev_interface.cpp.

bool ata_device::ata_identify_is_cached ( ) const [virtual]

Return true if OS caches ATA identify sector.

Default implementation returns false.

Reimplemented in anonymous_namespace{atacmds.cpp}::parsed_ata_device, and os_win32::win_ata_device.

Definition at line 191 of file dev_interface.cpp.

bool ata_device::ata_pass_through ( const ata_cmd_in in)

ATA pass through without output registers.

Return false on error. Calls ata_pass_through(in, dummy), cannot be reimplemented.

Definition at line 136 of file dev_interface.cpp.

virtual bool ata_device::ata_pass_through ( const ata_cmd_in in,
ata_cmd_out out 
) [pure virtual]
void ata_device::hide_ata ( bool  hide = true) [inline, protected]

Hide/unhide ATA interface.

Definition at line 540 of file dev_interface.h.

The documentation for this class was generated from the following files: