Mac Developer Library

Developer

IOFWPseudoAddressSpace Class Reference

Options
Deployment Target:

On This Page

IOFWPseudoAddressSpace

  • returns number of bytes starting at addr in this space

    Declaration

    virtual UInt32 contains( FWAddress addr);

    Return Value

    0 if it doesn't contain the address

  • A method for processing an address space read request

    Declaration

    virtual UInt32 doRead( UInt16 nodeID, IOFWSpeed & speed, FWAddress addr, UInt32 len, IOMemoryDescriptor **buf, IOByteCount *offset, IOFWRequestRefCon reqrefcon);

    Parameters

    nodeID

    FireWire Read from nodeID.

    speed

    at this 'speed'.

    addr

    with FireWire address 'addr'.

    len

    read 'len' bytes from nodeID.

    buf

    points to a memory descriptor containing the packet data.

    offset

    start from this 'offset' in 'buf'.

    reqrefcon

    Can be queried for extra info about the request.

    Return Value

    UIn32 returns kFWResponseComplete on success

  • A method for processing an address space write request

    Declaration

    virtual UInt32 doWrite( UInt16 nodeID, IOFWSpeed& speed, FWAddress addr, UInt32 len, const void *buf, IOFWRequestRefCon reqrefcon);

    Parameters

    nodeID

    FireWire Write to nodeID.

    speed

    at this 'speed'.

    addr

    with FireWire address 'addr'.

    len

    write 'len' bytes to nodeID.

    buf

    obtain bytes from location given by 'buf'.

    reqrefcon

    Can be queried for extra info about the request.

    Return Value

    UIn32 returns kFWResponseComplete on success

  • Initialize an address space object to handle r/w memory

    Declaration

    virtual bool initAll( IOFireWireBus *bus, FWAddress *addr, UInt32 len, FWReadCallback reader, FWWriteCallback writer, void *refcon);

    Parameters

    bus

    Points to IOFireWireBus object.

    addr

    Points to starting address for the Pseudo Address Space.

    len

    Length of the Pseudo Address Space.

    reader

    Callback handler for incoming Read.

    writer

    Callback handler for incoming Write.

    refcon

    Client's callback object.

    Return Value

    returns true on success, false on failure

  • Initialize a fixed address space at top of kCSRRegisterSpaceBaseAddressHi

    Declaration

    virtual bool initFixed( IOFireWireBus *bus, FWAddress addr, UInt32 len, FWReadCallback reader, FWWriteCallback writer, void *refcon);

    Parameters

    bus

    Points to IOFireWireBus object.

    addr

    Points to starting address for the Pseudo Address Space.

    reader

    Callback handler for incoming Read.

    writer

    Callback handler for incoming Write.

    refcon

    Client's callback object.

    Return Value

    returns true on success, false on failure

  • Installs a callback to receive notification, when FWIM has completed ARxReqInt processing and no incoming packets are left in the queue.

    Declaration

    inline void setARxReqIntCompleteHandler( void *refcon, IOFWARxReqIntCompleteHandler handler )

    Parameters

    refcon

    Client's callback object.

    handler

    Client callback to be invoked, at the end of interrupt processing.

    Return Value

    none.

  • Create an address space object to handle read-only memory (eg. the local ROM) handles everything itself

    Declaration

    static IOFWPseudoAddressSpace* simpleRead( IOFireWireBus *bus, FWAddress *addr, UInt32 len, const void *data);

    Parameters

    bus

    Points to IOFireWireBus object.

    addr

    Points to starting address for the Pseudo Address Space.

    len

    Length of the Pseudo Address Space.

    data

    The virtual address of the first byte in the memory.

    Return Value

    returns valid IOFWPseudoAddressSpace on success, null on failure

  • A method for processing an address space read request

    Declaration

    static UInt32 simpleReader( void *refcon, UInt16 nodeID, IOFWSpeed & speed, FWAddress addr, UInt32 len, IOMemoryDescriptor **buf, IOByteCount *offset, IOFWRequestRefCon reqrefcon);

    Parameters

    refcon

    Client's callback object.

    nodeID

    FireWire Read from nodeID.

    speed

    at this 'speed'.

    addr

    with FireWire address 'addr'.

    len

    read 'len' bytes from nodeID.

    buf

    points to a memory descriptor containing the packet data.

    offset

    start from this 'offset' in 'buf'.

    reqrefcon

    Can be queried for extra info about the request.

    Return Value

    UIn32 returns kFWResponseComplete on success

  • Create an address space object to handle fixed read-only memory (eg. the local ROM) handles everything itself

    Declaration

    static IOFWPseudoAddressSpace* simpleReadFixed( IOFireWireBus *bus, FWAddress addr, UInt32 len, const void *data);

    Parameters

    bus

    Points to IOFireWireBus object.

    addr

    Points to starting address for the Pseudo Address Space.

    len

    Length of the Pseudo Address Space.

    data

    The virtual address of the first byte in the memory.

    Return Value

    returns valid IOFWPseudoAddressSpace on success, null on failure

  • Create an address space object to handle r/w memory handles everything itself

    Declaration

    static IOFWPseudoAddressSpace* simpleRW( IOFireWireBus *bus, FWAddress *addr, IOMemoryDescriptor *data);

    Parameters

    bus

    Points to IOFireWireBus object.

    addr

    Points to starting address for the Pseudo Address Space.

    data

    The virtual address of the first byte in the memory.

    Return Value

    returns valid IOFWPseudoAddressSpace on success, null on failure

  • Create an address space object to handle r/w memory handles everything itself

    Declaration

    static IOFWPseudoAddressSpace* simpleRW( IOFireWireBus *bus, FWAddress *addr, UInt32 len, void *data);

    Parameters

    bus

    Points to IOFireWireBus object.

    addr

    Points to starting address for the Pseudo Address Space.

    len

    Length of the Pseudo Address Space.

    data

    The virtual address of the first byte in the memory.

    Return Value

    returns valid IOFWPseudoAddressSpace on success, null on failure

  • Create a Read/Write fixed address space at top of kCSRRegisterSpaceBaseAddressHi.

    Declaration

    static IOFWPseudoAddressSpace * simpleRWFixed( IOFireWireBus *control, FWAddress addr, UInt32 len, const void *data );

    Parameters

    control

    Points to IOFireWireBus object.

    addr

    Points to starting address for the Pseudo Address Space.

    len

    Length of the address range.

    data

    The virtual address of the first byte in the memory.

    Return Value

    returns valid IOFWPseudoAddressSpace on success, null on failure

  • A method for processing an address space write request

    Declaration

    static UInt32 simpleWriter( void *refcon, UInt16 nodeID, IOFWSpeed& speed, FWAddress addr, UInt32 len, const void *buf, IOFWRequestRefCon reqrefcon);

    Parameters

    refcon

    Client's callback object.

    nodeID

    FireWire Write to nodeID.

    speed

    at this 'speed'.

    addr

    with FireWire address 'addr'.

    len

    write 'len' bytes to nodeID.

    buf

    obtain bytes from location given by 'buf'.

    reqrefcon

    Can be queried for extra info about the request.

    Return Value

    UIn32 returns kFWResponseComplete on success

Data Types

  • Declaration

    struct ExpansionData { };

    Discussion

    This structure will be used to expand the capablilties of the class in the future.

Instance Variables

  • Reserved for future use. (Internal use only)

    Declaration

    ExpansionData *reserved;