plptools
Loading...
Searching...
No Matches
PlpDrive Class Reference

A class representing information about a Disk drive on the psion. More...

#include <plpdirent.h>

Public Member Functions

 PlpDrive ()
 Default constructor. More...
 
 PlpDrive (const PlpDrive &other)
 Copy constructor. More...
 
uint32_t getMediaType ()
 Retrieve the media type of the drive. More...
 
void getMediaType (std::string &ret)
 Retrieve the media type of the drive. More...
 
uint32_t getDriveAttribute ()
 Retrieve the attributes of the drive. More...
 
void getDriveAttribute (std::string &ret)
 Retrieve the attributes of the drive. More...
 
uint32_t getMediaAttribute ()
 Retrieve the attributes of the media. More...
 
void getMediaAttribute (std::string &ret)
 Retrieve the attributes of the media. More...
 
uint32_t getUID ()
 Retrieve the UID of the drive. More...
 
uint64_t getSize ()
 Retrieve the total capacity of the drive. More...
 
uint64_t getSpace ()
 Retrieve the free capacity on the drive. More...
 
std::string getName ()
 Retrieve the volume name of the drive. More...
 
char getDrivechar ()
 Retrieve the drive letter of the drive. More...
 

Private Member Functions

void setMediaType (uint32_t type)
 
void setDriveAttribute (uint32_t attr)
 
void setMediaAttribute (uint32_t attr)
 
void setUID (uint32_t uid)
 
void setSize (uint32_t sizeLo, uint32_t sizeHi)
 
void setSpace (uint32_t spaceLo, uint32_t spaceHi)
 
void setName (char drive, const char *const volname)
 

Private Attributes

uint32_t mediatype
 
uint32_t driveattr
 
uint32_t mediaattr
 
uint32_t uid
 
uint64_t size
 
uint64_t space
 
char drivechar
 
std::string name
 

Friends

class rfsv32
 
class rfsv16
 

Detailed Description

A class representing information about a Disk drive on the psion.

An Object of this type is used by rfsv::devinfo for returning the information of the probed drive.

Author
Fritz Elfert felfe.nosp@m.rt@t.nosp@m.o.com

Definition at line 196 of file plpdirent.h.

Constructor & Destructor Documentation

◆ PlpDrive() [1/2]

PlpDrive::PlpDrive ( )

Default constructor.

Definition at line 125 of file plpdirent.cc.

◆ PlpDrive() [2/2]

PlpDrive::PlpDrive ( const PlpDrive other)

Copy constructor.

Definition at line 128 of file plpdirent.cc.

Member Function Documentation

◆ getDriveAttribute() [1/2]

uint32_t PlpDrive::getDriveAttribute ( )

Retrieve the attributes of the drive.

Returns
The attributes of the probed drive.
Drive attributes are encoded by a number
in the range 0 .. 63. The bits have the
the following meaning:

  bit 0 = local
  bit 1 = ROM
  bit 2 = redirected
  bit 3 = substituted
  bit 4 = internal
  bit 5 = removable

Definition at line 190 of file plpdirent.cc.

◆ getDriveAttribute() [2/2]

void PlpDrive::getDriveAttribute ( std::string &  ret)

Retrieve the attributes of the drive.

Just like the above function, but returns the attributes as human readable string.

Parameters
retThe string is returned here.

Definition at line 202 of file plpdirent.cc.

◆ getDrivechar()

char PlpDrive::getDrivechar ( )

Retrieve the drive letter of the drive.

returns The letter of the probed drive.

Definition at line 258 of file plpdirent.cc.

◆ getMediaAttribute() [1/2]

uint32_t PlpDrive::getMediaAttribute ( )

Retrieve the attributes of the media.

Returns
The attributes of the probed media.
Media attributes are encoded by a number
in the range 0 .. 15. The bits have the
following meaning:

  bit 0 = variable size
  bit 1 = dual density
  bit 2 = formattable
  bit 3 = write protected

Definition at line 219 of file plpdirent.cc.

◆ getMediaAttribute() [2/2]

void PlpDrive::getMediaAttribute ( std::string &  ret)

Retrieve the attributes of the media.

Just like the above function, but returns the attributes as human readable string.

Parameters
retThe string is returned here.

Definition at line 224 of file plpdirent.cc.

◆ getMediaType() [1/2]

uint32_t PlpDrive::getMediaType ( )

Retrieve the media type of the drive.

Returns
The media type of the probed drive.
Media types are encoded by a number
in the range 0 .. 8 with the following
meaning:

  0 = Not present
  1 = Unknown
  2 = Floppy
  3 = Disk
  4 = CD-ROM
  5 = RAM
  6 = Flash Disk
  7 = ROM
  8 = Remote

Definition at line 168 of file plpdirent.cc.

◆ getMediaType() [2/2]

void PlpDrive::getMediaType ( std::string &  ret)

Retrieve the media type of the drive.

Just like the above function, but returns the media type as human readable string.

Parameters
retThe string is returned here.

Definition at line 185 of file plpdirent.cc.

◆ getName()

string PlpDrive::getName ( )

Retrieve the volume name of the drive.

returns The volume name of the drive.

Definition at line 253 of file plpdirent.cc.

◆ getSize()

uint64_t PlpDrive::getSize ( )

Retrieve the total capacity of the drive.

Returns
The capacity of the probed drive in bytes.

Definition at line 243 of file plpdirent.cc.

◆ getSpace()

uint64_t PlpDrive::getSpace ( )

Retrieve the free capacity on the drive.

Returns
The free space on the probed drive in bytes.

Definition at line 248 of file plpdirent.cc.

◆ getUID()

uint32_t PlpDrive::getUID ( )

Retrieve the UID of the drive.

Each drive, except the ROM drive on a Psion has a unique ID which can be retrieved here.

Returns
The UID of the probed drive.

Definition at line 238 of file plpdirent.cc.

◆ setDriveAttribute()

void PlpDrive::setDriveAttribute ( uint32_t  attr)
private

Definition at line 136 of file plpdirent.cc.

◆ setMediaAttribute()

void PlpDrive::setMediaAttribute ( uint32_t  attr)
private

Definition at line 141 of file plpdirent.cc.

◆ setMediaType()

void PlpDrive::setMediaType ( uint32_t  type)
private

Definition at line 131 of file plpdirent.cc.

◆ setName()

void PlpDrive::setName ( char  drive,
const char *const  volname 
)
private

Definition at line 161 of file plpdirent.cc.

◆ setSize()

void PlpDrive::setSize ( uint32_t  sizeLo,
uint32_t  sizeHi 
)
private

Definition at line 151 of file plpdirent.cc.

◆ setSpace()

void PlpDrive::setSpace ( uint32_t  spaceLo,
uint32_t  spaceHi 
)
private

Definition at line 156 of file plpdirent.cc.

◆ setUID()

void PlpDrive::setUID ( uint32_t  uid)
private

Definition at line 146 of file plpdirent.cc.

Friends And Related Function Documentation

◆ rfsv16

friend class rfsv16
friend

Definition at line 198 of file plpdirent.h.

◆ rfsv32

friend class rfsv32
friend

Definition at line 197 of file plpdirent.h.

Member Data Documentation

◆ driveattr

uint32_t PlpDrive::driveattr
private

Definition at line 343 of file plpdirent.h.

◆ drivechar

char PlpDrive::drivechar
private

Definition at line 348 of file plpdirent.h.

◆ mediaattr

uint32_t PlpDrive::mediaattr
private

Definition at line 344 of file plpdirent.h.

◆ mediatype

uint32_t PlpDrive::mediatype
private

Definition at line 342 of file plpdirent.h.

◆ name

std::string PlpDrive::name
private

Definition at line 349 of file plpdirent.h.

◆ size

uint64_t PlpDrive::size
private

Definition at line 346 of file plpdirent.h.

◆ space

uint64_t PlpDrive::space
private

Definition at line 347 of file plpdirent.h.

◆ uid

uint32_t PlpDrive::uid
private

Definition at line 345 of file plpdirent.h.


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