Mac Developer Library

Developer

IOFWAddressSpace.h Reference

Options
Deployment Target:

On This Page

IOFWAddressSpace.h Reference

Inheritance


Not Applicable

Conforms To


Not Applicable

Import Statement


Not Applicable

Objective-C

@import Kernel;

Included Headers

  • <IOKit/IOMemoryDescriptor.h>

  • <IOKit/firewire/IOFireWireFamilyCommon.h>

  • <IOKit/firewire/IOFWPseudoAddressSpace.h>

  • <IOKit/firewire/IOFWPhysicalAddressSpace.h>

Callbacks

  • Callback called when a read request packet is received for a 'virtual' firewire address.

    Declaration

    Objective-C

    typedef UInt32 ( *FWReadCallback)( void *refcon, UInt16 nodeID, IOFWSpeed &speed, FWAddress addr, UInt32 len, IOMemoryDescriptor **buf, IOByteCount *offset, IOFWRequestRefCon requestRefcon);

    Parameters

    nodeID

    is the node originating the request

    speed

    is the FireWire speed of the request, update it if you need to control the speed of the reply, otherwise the response will be the same speed.

    addr

    is the address the device is requesting to read from

    len

    is the number of bytes to read

    buf

    contains the packet data

    offset

    on return points to the offset into *buf of the packet data

    requestRefcon

    refcon to pass back if sending a delayed response. Also can be queried for extra info about the request

    Return Value

    return: kFWResponsePending = -1, Pseudo response, real response sent later. kFWResponseComplete = 0, OK! kFWResponseConflictError = 4, Resource conflict, may retry kFWResponseDataError = 5, Data not available kFWResponseTypeError = 6, Operation not supported kFWResponseAddressError = 7 Address not valid in target device

    A return of kFWResponsePending should be followed at some later time by a call to IOFireWireController::asyncReadResponse

    Import Statement

    Objective-C

    #include <IOFWAddressSpace.h>;

    Availability

    Available in OS X v10.0 and later.

  • Callback called when a write request packet is received for a 'virtual' firewire address.

    Declaration

    Objective-C

    typedef UInt32 ( *FWWriteCallback)( void *refcon, UInt16 nodeID, IOFWSpeed &speed, FWAddress addr, UInt32 len, const void *buf, IOFWRequestRefCon requestRefcon);

    Parameters

    device

    is the node originating the request

    speed

    is the FireWire speed of the request, update it if you need to control the speed of the reply, otherwise the response will be the same speed.

    addr

    is the address the device is requesting to write to

    len

    is the number of bytes to write

    buf

    contains the packet data

    requestRefcon

    refcon Can be queried for extra info about the request, using IOFireWireController::isLockRequest(), isQuadRequest()

    Return Value

    return: kFWResponseComplete = 0, OK kFWResponseConflictError = 4, Resource conflict, may retry kFWResponseDataError = 5, Data not available kFWResponseTypeError = 6, Operation not supported kFWResponseAddressError = 7 Address not valid in target device

    Import Statement

    Objective-C

    #include <IOFWAddressSpace.h>;

    Availability

    Available in OS X v10.0 and later.