IOFireWireCompareSwapCommandInterface

Declared In:

Overview

Description forthcoming



Functions

Cancel

Cancel command execution

DidLock

Was the last lock operation successful?

GetStatus

Return command completion status.

GetTargetAddress

Get command target address.

GetTransferredBytes

Return number of bytes transferred by this command object when it last completed execution.

IsExecuting

Is this command object currently executing?

Locked

Get the 32-bit value returned on the last compare swap operation.

Locked64

Get the 64-bit value returned on the last compare swap operation.

SetCallback

Set the completion handler to be called once the command completes asynchronous execution .

SetFlags

Set flags governing this command's execution.

SetGeneration

Set FireWire bus generation for which the command object shall be valid. If the failOnReset attribute has been set, the command will only be considered for execution during the bus generation specified by this function.

SetRefCon

Set the user refCon value. This is the user defined value that will be passed in the refCon argument to the completion function.

SetTarget

Set command target address

SetValues

Set values for 32-bit compare swap operation. Calling this function will make the command object perform 32-bit compare swap transactions on the bus. To perform 64-bit compare swap operations, use the SetValues64() call, below.

SetValues64

Set values for 64-bit compare swap operation. Calling this function will make the command object perform 64-bit compare swap transactions on the bus. To perform 32-bit compare swap operations, use the SetValues() call, above.

Submit
SubmitWithRefconAndCallback

Set the command refCon value and callback handler, and submit the command to FireWire for execution.


Cancel


Cancel command execution

IOReturn ( *Cancel)(
    IOFireWireLibCommandRef self,
    IOReturn reason);  
Parameters
self

The command object interface of interest

Return Value

An IOReturn result code

Discussion

Availability: (for interfaces obtained with ID)

kIOFireWireReadCommandInterfaceID YES
kIOFireWireReadCommandInterfaceID_v2 YES
kIOFireWireWriteCommandInterfaceID YES
kIOFireWireWriteCommandInterfaceID_v2 YES
kIOFireWireReadQuadletCommandInterfaceID YES
kIOFireWireWriteQuadletCommandInterfaceID YES
kIOFireWireCompareSwapCommandInterfaceID YES
kIOFireWireAsyncStreamCommandInterfaceID YES


DidLock


Was the last lock operation successful?

Boolean ( *DidLock)(
    IOFireWireLibCompareSwapCommandRef self);  
Parameters
self

The command object interface of interest

Return Value

Returns true if the last lock operation performed by this command object was successful, false otherwise.

Discussion

Available in v2 and newer.


GetStatus


Return command completion status.

IOReturn ( *GetStatus)(
    IOFireWireLibCommandRef self);  
Parameters
self

The command object interface of interest

Return Value

An IOReturn error code indicating the completion error (if any) returned the last time this command object was executed

Discussion

Availability: (for interfaces obtained with ID)

kIOFireWireReadCommandInterfaceID YES
kIOFireWireReadCommandInterfaceID_v2 YES
kIOFireWireWriteCommandInterfaceID YES
kIOFireWireWriteCommandInterfaceID_v2 YES
kIOFireWireReadQuadletCommandInterfaceID YES
kIOFireWireWriteQuadletCommandInterfaceID YES
kIOFireWireCompareSwapCommandInterfaceID YES
kIOFireWireAsyncStreamCommandInterfaceID YES


GetTargetAddress


Get command target address.

void ( *GetTargetAddress)(
    IOFireWireLibCommandRef self,
    FWAddress *outAddr);  
Parameters
self

The command object interface of interest

outAddr

A pointer to an FWAddress to contain the function result.

Discussion

Availability: (for interfaces obtained with ID)

kIOFireWireReadCommandInterfaceID YES
kIOFireWireReadCommandInterfaceID_v2 YES
kIOFireWireWriteCommandInterfaceID YES
kIOFireWireWriteCommandInterfaceID_v2 YES
kIOFireWireReadQuadletCommandInterfaceID YES
kIOFireWireWriteQuadletCommandInterfaceID YES
kIOFireWireCompareSwapCommandInterfaceID YES
kIOFireWireAsyncStreamCommandInterfaceID NO


GetTransferredBytes


Return number of bytes transferred by this command object when it last completed execution.

UInt32 ( *GetTransferredBytes)(
    IOFireWireLibCommandRef self);  
Parameters
self

The command object interface of interest

Return Value

A UInt32 containing the bytes transferred value

Discussion

Availability: (for interfaces obtained with ID)

kIOFireWireReadCommandInterfaceID YES
kIOFireWireReadCommandInterfaceID_v2 YES
kIOFireWireWriteCommandInterfaceID YES
kIOFireWireWriteCommandInterfaceID_v2 YES
kIOFireWireReadQuadletCommandInterfaceID YES
kIOFireWireWriteQuadletCommandInterfaceID YES
kIOFireWireCompareSwapCommandInterfaceID YES
kIOFireWireAsyncStreamCommandInterfaceID YES


IsExecuting


Is this command object currently executing?

const Boolean (*IsExecuting)(IOFireWireLibCommandRef self);  
Parameters
self

The command object interface of interest

Return Value

Returns true if the command object is executing.

Discussion

Availability: (for interfaces obtained with ID)

kIOFireWireReadCommandInterfaceID YES
kIOFireWireReadCommandInterfaceID_v2 YES
kIOFireWireWriteCommandInterfaceID YES
kIOFireWireWriteCommandInterfaceID_v2 YES
kIOFireWireReadQuadletCommandInterfaceID YES
kIOFireWireWriteQuadletCommandInterfaceID YES
kIOFireWireCompareSwapCommandInterfaceID YES
kIOFireWireAsyncStreamCommandInterfaceID YES


Locked


Get the 32-bit value returned on the last compare swap operation.

IOReturn ( *Locked)(
    IOFireWireLibCompareSwapCommandRef self,
    UInt32 *oldValue);  
Parameters
self

The command object interface of interest

oldValue

A pointer to contain the value returned by the target of this command on the last compare swap operation

Return Value

Returns kIOReturnBadArgument if the last compare swap operation performed was 64-bit.

Discussion

Available in v2 and newer.


Locked64


Get the 64-bit value returned on the last compare swap operation.

IOReturn ( *Locked64)(
    IOFireWireLibCompareSwapCommandRef self,
    UInt64 *oldValue);  
Parameters
self

The command object interface of interest

oldValue

A pointer to contain the value returned by the target of this command on the last compare swap operation

Return Value

Returns kIOReturnBadArgument if the last compare swap performed was 32-bit.

Discussion

Available in v2 and newer.


SetCallback


Set the completion handler to be called once the command completes asynchronous execution .

void ( *SetCallback)(
    IOFireWireLibCommandRef self,
    IOFireWireLibCommandCallback inCallback);  
Parameters
self

The command object interface of interest

inCallback

A callback handler. Passing nil forces the command object to execute synchronously.

Discussion

Availability: (for interfaces obtained with ID)

kIOFireWireReadCommandInterfaceID YES
kIOFireWireReadCommandInterfaceID_v2 YES
kIOFireWireWriteCommandInterfaceID YES
kIOFireWireWriteCommandInterfaceID_v2 YES
kIOFireWireReadQuadletCommandInterfaceID YES
kIOFireWireWriteQuadletCommandInterfaceID YES
kIOFireWireCompareSwapCommandInterfaceID YES
kIOFireWireAsyncStreamCommandInterfaceID YES


SetFlags


Set flags governing this command's execution.

void ( *SetFlags)(
    IOFireWireLibCompareSwapCommandRef self,
    UInt32 inFlags);  
Parameters
self

The command object interface of interest.

inFlags

A UInt32 with bits set corresponding to the flags that should be set.

Discussion

Available in v2 and newer. Same as SetFlags() above.


SetGeneration


Set FireWire bus generation for which the command object shall be valid. If the failOnReset attribute has been set, the command will only be considered for execution during the bus generation specified by this function.

void ( *SetGeneration)(
    IOFireWireLibCommandRef self,
    UInt32 generation);  
Parameters
self

The command object interface of interest

generation

A bus generation. The current bus generation can be obtained from IOFireWireDeviceInterface::GetBusGeneration().

Discussion

Availability: (for interfaces obtained with ID)

kIOFireWireReadCommandInterfaceID YES
kIOFireWireReadCommandInterfaceID_v2 YES
kIOFireWireWriteCommandInterfaceID YES
kIOFireWireWriteCommandInterfaceID_v2 YES
kIOFireWireReadQuadletCommandInterfaceID YES
kIOFireWireWriteQuadletCommandInterfaceID YES
kIOFireWireCompareSwapCommandInterfaceID YES
kIOFireWireAsyncStreamCommandInterfaceID YES


SetRefCon


Set the user refCon value. This is the user defined value that will be passed in the refCon argument to the completion function.

void ( *SetRefCon)(
    IOFireWireLibCommandRef self,
    void *refCon);  
Discussion

Availability: (for interfaces obtained with ID)

kIOFireWireReadCommandInterfaceID YES
kIOFireWireReadCommandInterfaceID_v2 YES
kIOFireWireWriteCommandInterfaceID YES
kIOFireWireWriteCommandInterfaceID_v2 YES
kIOFireWireReadQuadletCommandInterfaceID YES
kIOFireWireWriteQuadletCommandInterfaceID YES
kIOFireWireCompareSwapCommandInterfaceID YES
kIOFireWireAsyncStreamCommandInterfaceID YES


SetTarget


Set command target address

void ( *SetTarget)(
    IOFireWireLibCommandRef self,
    const FWAddress* addr);  
Parameters
self

The command object interface of interest

addr

A pointer to an FWAddress.

Discussion

Availability: (for interfaces obtained with ID)

kIOFireWireReadCommandInterfaceID YES
kIOFireWireReadCommandInterfaceID_v2 YES
kIOFireWireWriteCommandInterfaceID YES
kIOFireWireWriteCommandInterfaceID_v2 YES
kIOFireWireReadQuadletCommandInterfaceID YES
kIOFireWireWriteQuadletCommandInterfaceID YES
kIOFireWireCompareSwapCommandInterfaceID YES
kIOFireWireAsyncStreamCommandInterfaceID NO


SetValues


Set values for 32-bit compare swap operation. Calling this function will make the command object perform 32-bit compare swap transactions on the bus. To perform 64-bit compare swap operations, use the SetValues64() call, below.

void ( *SetValues)(
    IOFireWireLibCompareSwapCommandRef self,
    UInt32 cmpVal,
    UInt32 newVal);  
Parameters
self

The command object interface of interest

cmpVal

The value expected at the address targeted by this command object

newVal

The value to be written at the address targeted by this command object

Discussion

Available in v2 and newer.


SetValues64


Set values for 64-bit compare swap operation. Calling this function will make the command object perform 64-bit compare swap transactions on the bus. To perform 32-bit compare swap operations, use the SetValues() call, above.

void ( *SetValues64)(
    IOFireWireLibCompareSwapCommandRef self,
    UInt64 cmpVal,
    UInt64 newVal);  
Parameters
self

The command object interface of interest

cmpVal

The value expected at the address targeted by this command object

newVal

The value to be written at the address targeted by this command object

Discussion

Available in v2 and newer.


Submit


IOReturn ( *Submit)(
    IOFireWireLibCommandRef self);  
Discussion

Description forthcoming


SubmitWithRefconAndCallback


Set the command refCon value and callback handler, and submit the command to FireWire for execution.

IOReturn ( *SubmitWithRefconAndCallback)(
    IOFireWireLibCommandRef self,
    void *refCon,
    IOFireWireLibCommandCallback inCallback);  
Parameters
self

The command object interface of interest

Return Value

An IOReturn result code indicating whether or not the command was successfully submitted

Discussion

Availability: (for interfaces obtained with ID)

kIOFireWireReadCommandInterfaceID YES
kIOFireWireReadCommandInterfaceID_v2 YES
kIOFireWireWriteCommandInterfaceID YES
kIOFireWireWriteCommandInterfaceID_v2 YES
kIOFireWireReadQuadletCommandInterfaceID YES
kIOFireWireWriteQuadletCommandInterfaceID YES
kIOFireWireCompareSwapCommandInterfaceID YES
kIOFireWireAsyncStreamCommandInterfaceID YES

Member Data

revision
version

revision


UInt32 revision;  
Discussion

Interface revision.


version


UInt32 version;  
Discussion

Interface version.

 

Did this document help you? Yes It's good, but... Not helpful...

 

Last Updated: 2009-10-15