Public Member Functions | Private Attributes

scsi_DeviceList Class Reference

#include <scsi_devicelist.h>

List of all members.

Public Member Functions

 scsi_DeviceList ()
virtual ~scsi_DeviceList ()
void Scan ()
void Print ()
scsi_Device_tFindBySCSIID (UInt32_t a_port, UInt32_t a_channel, UInt32_t a_id, UInt32_t a_lun)
scsi_Device_tFindBySerialNumber ()

Private Attributes

scsi_DeviceVect_t m_deviceVector
 log_CLASSID_m

Detailed Description

Definition at line 38 of file scsi_devicelist.h.


Constructor & Destructor Documentation

scsi_DeviceList::scsi_DeviceList (  ) 

Definition at line 50 of file scsi_devicelist.cpp.

References log_FUNC_m, m_deviceVector, and Scan().

                                 {
    log_FUNC_m(scsi_DeviceList);

    m_deviceVector.reserve(10);
    Scan(); // fill vector of devices...
}

Here is the call graph for this function:

scsi_DeviceList::~scsi_DeviceList (  )  [virtual]

Definition at line 57 of file scsi_devicelist.cpp.

References log_FUNC_m.


Member Function Documentation

scsi_Device_t * scsi_DeviceList::FindBySCSIID ( UInt32_t  a_port,
UInt32_t  a_channel,
UInt32_t  a_id,
UInt32_t  a_lun 
)

Definition at line 293 of file scsi_devicelist.cpp.

References dbg_LOW, log_DBG_m, log_FUNC_m, and m_deviceVector.

                                 {

    log_FUNC_m(FindBySCSIID);

    log_DBG_m(dbg_LOW,
        "Searching SCSI ID: " <<
        a_port << ":" <<
        a_channel << ":" <<
        a_id << ":" <<
        a_lun);

    for (unsigned int i=0; i<m_deviceVector.size(); i++) {
        if ((a_port == ((m_deviceVector[i]).m_port )) &&
            (a_channel == ((m_deviceVector[i]).m_channel)) &&
            (a_id == ((m_deviceVector[i]).m_id)) &&
            (a_lun == ((m_deviceVector[i]).m_lun))) {
            return &m_deviceVector[i];
        }
    }
    return NULL;
}

scsi_Device_t * scsi_DeviceList::FindBySerialNumber (  ) 

Definition at line 318 of file scsi_devicelist.cpp.

References log_FUNC_m.

                                                   {
    log_FUNC_m(FindBySerialNumber);

    return NULL;
}

void scsi_DeviceList::Print (  ) 

Definition at line 256 of file scsi_devicelist.cpp.

References log_FUNC_m, m_deviceVector, and scsi_GetDeviceTypeText().

Referenced by main().

                            {
    log_FUNC_m(Print);

    for (unsigned int i=0; i<m_deviceVector.size(); i++) {
        cout
            << endl
            << "** " << m_deviceVector[i].m_deviceName
            << "        id:"
            << m_deviceVector[i].m_port << ":"
            << m_deviceVector[i].m_channel << ":"
            << m_deviceVector[i].m_id << ":"
            << m_deviceVector[i].m_lun
            << endl;

        cout
            << endl
            << "SCSI device ID: "
            << "port " << m_deviceVector[i].m_port
            << ", ch " << m_deviceVector[i].m_channel
            << ", id " << m_deviceVector[i].m_id
            << ", lun " << m_deviceVector[i].m_lun
            << ", type "
            << scsi_GetDeviceTypeText(m_deviceVector[i].m_deviceType) << " "
            << m_deviceVector[i].m_deviceType
            << endl;

        cout << "Device: "
            << m_deviceVector[i].m_vendorID << " "
            << m_deviceVector[i].m_productID << " "
            << m_deviceVector[i].m_productRevision << " "
            << "ser #: N/A std : N/A"
            << endl;

        cout << endl << endl;
    } // for (...deviceVector.size()...)
}

Here is the call graph for this function:

Here is the caller graph for this function:

void scsi_DeviceList::Scan (  ) 

Definition at line 63 of file scsi_devicelist.cpp.

References log_FUNC_m.

Referenced by scsi_DeviceList().

                           {
    log_FUNC_m(scan);
}

Here is the caller graph for this function:


Member Data Documentation

Definition at line 60 of file scsi_devicelist.h.

Definition at line 58 of file scsi_devicelist.h.

Referenced by FindBySCSIID(), Print(), and scsi_DeviceList().


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