[operations] [attributes] [fields] [template] [definition]
[implementation] [documentation]
To use the search tool you need to use a browser which supports JAVA (c)

[next] [prev] [superclass] [next peer] [prev peer] [subclass] [index] [hierarchy]

CardSlot

abstract
inherits from Object
inherits from HasReinitialize
inherits from WantsPowerEvents

Object <- CardSlot



Operations

Get list of all operations

AnnounceSlot
CISChanged
CardBatteryState
CardDetectState
CardInsertion
CardLockswitchState
CardNeeded
CardReadyState
CardRemoval
CardsHaveChanged
CommitShouldAttemptCardReintegrationFlags
FindTuple
FirstTuple
Get8BitCardCommonReadWriteAccess
Get8BitCardIOReadWriteAccess
NextTuple
NextTupleAddress
PowerOnSetupSlot
PoweringUp
RegisterPCCardInterruptHandler
ResetCard
ResetCardEmergencyFlags
ResetClass
SetCardNeeded
SlotBatteryState
SlotLockedSwitchState
UnregisterPCCardInterruptHandler


Attributes

Get list of all attributes

AllowedLockswitchStates
AttributeAddress
AttributeIOSpeed
BatteryStateDescription
CardHiByteMode
CardImage
CardLoByteMode
CardMounted
CardName
CardOptionInserted
CardVcc
CardVpp
CommonAddress
CommonAddressUncached
CommonSpeed
HasBattery
IOMode
IoAddress
Length
Servers
ShouldAttemptReintegrationOnCard
SlotNumber
ValidCIS
WaitSignalEnabled


Fields

Field Type
CardSlot: slotNumber: Unsigned
commonAddress: Unsigned
attributeAddress: Unsigned
ioAddress: Unsigned
length: Unsigned
cardMounted: Boolean
hasBattery: Boolean
cardImage: Image
cardName: Text
validCIS: Boolean
cardOptionInserted: Boolean
servers: ObjectList
shouldAttemptReintegrationOnCard: Boolean


Instance template

Class CardSlot cannot be instantiated.


Class definition

Define Class CardSlot;
    abstract;
    inherits from Object;
    inherits from HasReinitialize, WantsPowerEvents;

    field slotNumber: Unsigned, getter;
        // get the slot number of this slot, or nil
    field commonAddress: Unsigned, getter;
        // base address of the slot's common memory space
    field attributeAddress: Unsigned, getter;
        // base address of the slot's attribute memory space
    field ioAddress: Unsigned, getter;
        // base address of the slot's i/o memory-mapped registers space
    field length: Unsigned, getter;
        // size of the slot's memory span, in bytes
    field cardMounted: Boolean, getter, setter;
        // true if a card is inserted and has servers for it
    field hasBattery: Boolean, getter, setter;
    
    field cardImage: Image, getter, sharedSetter;
    attribute CardImage: Image;
    
    field cardName: Text, getter, setter;
    attribute CardName: Text;
    
    field validCIS : Boolean, getter, setter;
    field cardOptionInserted: Boolean, getter, setter;
        // state valid at insertion time, so that any other code can
        // ask if user requested this
    field servers: ObjectList, getter;
        // List of CardServers who share the card in the slot
    field shouldAttemptReintegrationOnCard: Boolean, getter, setter;
        // warm boot should attempt to perform early integration on the card in the slot

    overrides ResetClass;
    overrides PoweringUp;

    attribute SlotNumber: Unsigned, readOnly;
    attribute CommonAddress: Unsigned, readOnly;
    attribute CommonAddressUncached: Unsigned, readOnly;
        // Common space base address to use when using
        // CardCommonAccess class. Don't use otherwise.
    attribute AttributeAddress: Unsigned, readOnly;
    attribute IoAddress: Unsigned, readOnly;
    attribute Length: Unsigned, readOnly;
    attribute CardMounted: Boolean;
    attribute HasBattery: Boolean;
    attribute BatteryStateDescription: Text, readOnly;
    attribute Servers: ObjectList, readOnly;
    attribute ShouldAttemptReintegrationOnCard: Boolean;

    /* Slot Events */
    operation CardInsertion();
        // override this for behavior after the card is fully seated in the device
        // (Slot Detect Pins were asserted)
    operation CardRemoval();
        // override this for behavior after the card is fully removed
        // (ejection switch was tripped)
    attribute CardOptionInserted: Boolean;
        // is user trying to force a reformat

    /* Slot Configuration */
    attribute CardVcc: Unsigned;
        // Set the Card Operating Voltage
    attribute CardVpp: Unsigned;
        // Set the Card Programming Voltage
    attribute CommonSpeed: Unsigned, noGetter, noSetter;
        // Access Time (in nS)
        // (Set # of wait states necessary to access the Common Memory Space correctly)
        // Hardware-dependent: the getter and setter must be defined in the subclass
    attribute AttributeIOSpeed: Unsigned, noGetter, noSetter;
        // Access Time (in nS)
        // Set # of wait states necessary to access the Attribute Memory or
        // IO Space correctly.
        // Hardware-dependent: the getter and setter must be defined in the subclass
    attribute CardLoByteMode: Boolean, noGetter, noSetter;
        // Hardware-dependent: the getter and setter must be defined in the subclass
    attribute CardHiByteMode: Boolean, noGetter, noSetter;
        // Hardware-dependent: the getter and setter must be defined in the subclass
    attribute WaitSignalEnabled: Boolean, noGetter, noSetter;
        // Hardware-dependent: the getter and setter must be defined in the subclass

    operation ResetCard(resetState: Boolean), noMethod;
        // Set or clear the hardware reset line to the card
        // Hardware-dependent: must be defined in the subclass

    attribute AllowedLockswitchStates: UnsignedShort;
        // Get/Set valid states for lockswitch
        // use kCard2LockMasks, etc.
        
    operation CardNeeded(): Boolean;
    operation SetCardNeeded(needed : Boolean): Boolean;
        // Get/Set card needed flag
        // if set, system will force user to reinsert ejected cards
        // SetCardNeeded returns false if there is no card inserted

    /* Card Status */
    operation SlotLockedSwitchState(): Boolean;
        // Read the hardware and return the current state of the slot's external
        // lock switch
        // (true == the slot is locked)
    operation SlotBatteryState(): Unsigned, noMethod;
        // Read the hardware and return the current state of the slot's BVD pins
        // Always returns state of the BVD pins regardless of slot or card configuration
        // Hardware-dependent: must be defined in the subclass

    operation CardDetectState(): Boolean;
        // Read the hardware and return the current card detect value
        // (true == card is fully seated in slot)
    operation CardBatteryState(): Unsigned, noFail;
        // Read the hardware and return the current battery state (full, low, dead)
    operation CardLockswitchState(): Boolean;
        // Read the hardware and return the current lockswitch state
        // (true == cardLocked)
    operation CardReadyState(): Boolean;
        // Read the hardware and return the current card Ready status
        // (true == cardReady, false == cardBusy)

    operation AnnounceSlot(announcement: Announcement; target: Object);
        // sets iCurrentPCCard indexical, then calls Announce on <announcement> to
        // map card slot name into announcement text.
        // if <target> is supplied, sets target of announcement to it

    /* Card Tuple Access */
    operation CISChanged();
        // Call whenever the CIS information on the card has changed
    operation FirstTuple(var tupleSearchInfo: PCCardTupleSearchInfo): Boolean;
        // searches for desired tuple starting at the beginning of the primary tuple chain
        // returns true if a tuple was found
        // if tupleSearchInfo.bufferPtr is non-nil, it copies the tuple into the buffer
    operation NextTuple(var tupleSearchInfo: PCCardTupleSearchInfo): Boolean;
        // searches for desired tuple starting where last call to FirstTuple/NextTuple
        // left off
        // returns true if a tuple was found
        // if tupleSearchInfo.bufferPtr is non-nil, it copies the tuple into the buffer
        
    attribute ValidCIS: Boolean;
        // true if a card is in the slot and it has a valid CIS tuple

    /* IO Card interrupt handling */
    operation RegisterPCCardInterruptHandler(interruptNumber: UnsignedShort; function: ExceptionFunction; params: Pointer): CardIRQInfoPointer;
        // Register a handler for a PC Card interrupt
        //      (see Utitilies.h for the list of interruptNumbers)

    operation UnregisterPCCardInterruptHandler(interruptNumber: UnsignedShort; function: ExceptionFunction);
        // Unregister a previously registered handler.
        //      (see Utitilies.h for the list of interruptNumbers)

    attribute IOMode: Boolean;
        // Put card into I/O Mode.

    operation Get8BitCardIOReadWriteAccess(): CardIOAccessPointer;
        // Get class for loading/storing bytes to the I/O space on an
        // 8-bit PC Card. These may vary from device to device
        // depending on if/when the Dino I/O Card bug is fixed in
        // hardware.
        //
        // XXX more comments here -jdc
        //
        // NOTE: Card must be in I/O mode for these functions to work!
        // See IOMode attribute.

    operation Get8BitCardCommonReadWriteAccess(): CardCommonAccessPointer;
        // Get class for loading/storing/copying bytes to the common
        // space on an 8-bit memory-mapped hardware card, e.g. a LAN
        // card. Implementation of the class will vary depending on
        // communicator hardware (this is required due to Dino
        // eccentricities).

    operation FindTuple(address: UnsignedBytePointer; desiredTuple: Unsigned; var tupleAddress: UnsignedBytePointer; var pInAttributeMemory: Boolean; var nextTupleAddress: UnsignedBytePointer): Boolean, intrinsic;
    intrinsic NextTupleAddress(attributeMemory: Boolean; address: UnsignedBytePointer; var sawEndOfChainInLinkField: Boolean): UnsignedBytePointer;
    operation ResetCardEmergencyFlags(), intrinsic;
    intrinsic CardsHaveChanged(): Boolean;
    intrinsic CommitShouldAttemptCardReintegrationFlags();

    // The following operations are not a part of the functional interface.
    // They help inplement the hardware-abstraction.

    operation PowerOnSetupSlot(), noMethod;
        // The hardware has power cycled, reset the slot hardware
end class;