ADC Home > Reference Library > Reference > Hardware & Drivers > I/O Kit Framework Reference

 


IOFireWireAVCLibConsumerInterface

Declared In:

Overview

Interface for an asynchronous connection consumer.

Discussion

Used to receive data from an asynchronous connection producer. The functions of the IOFireWireAVCLibConsumerInterface are from the perspective of the Macintosh acting as the consumer/controller pair.



Functions

clearPortFlags

Clears the port flags (currently, there are no flags defined).

connectToRemotePlug

Connects to the producer.

disconnectFromRemotePlug

Disconnects from the remote producer.

frameProcessed

Called by the producer to tell the consumer/controller what mode to write into the producer's register.

getPortFlags

Gets the current value of the port flags (currently, there are no flags defined).

getSegmentBuffer

Returns a pointer to the producer's segment buffer.

getSegmentSize

Gets the maximum size of the producer's segment buffer.

setFrameStatusHandler

Sets the callback handler (of type IOFireWireAVCFrameStatusHandler) to be called when the producer sends data to the consumer.

setMaxPayloadSize

Sets the maximum size of any individual FireWire transaction (an individual block write).

setPortFlags

Sets the port flags to the passed in value (currently, there are no flags defined).

setPortStateHandler

Sets the callback handler to report the state of this connection.

setRemotePlug

Sets the plug to which the consumer is connecting.

setSegmentSize

Sets the maximum size of the producer's segment buffer.

setSubunit

Sets the subunit in the producer to which the consumer is making a connection.


clearPortFlags


Clears the port flags (currently, there are no flags defined).

void ( *clearPortFlags)(
    void *self,
    UInt32 flags );  
Parameters
self

Pointer to IOFireWireAVCLibConsumerInterface.

flags

Currently unused.


connectToRemotePlug


Connects to the producer.

IOReturn ( *connectToRemotePlug)(
    void *self );  
Parameters
self

Pointer to IOFireWireAVCLibConsumerInterface.

Discussion

This function causes the consumer/controller to send commands to the producer and establish a connection. When the connection is established, setPortStateHandler is called and the status is "connected."


disconnectFromRemotePlug


Disconnects from the remote producer.

IOReturn ( *disconnectFromRemotePlug)(
    void *self );  
Parameters
self

Pointer to IOFireWireAVCLibConsumerInterface.


frameProcessed


Called by the producer to tell the consumer/controller what mode to write into the producer's register.

void ( *frameProcessed)(
    void *self,
    UInt32 mode );  
Parameters
self

Pointer to IOFireWireAVCLibConsumerInterface.

mode

The mode to write into the producer's register.


getPortFlags


Gets the current value of the port flags (currently, there are no flags defined).

UInt32 ( *getPortFlags)(
    void *self );  
Parameters
self

Pointer to IOFireWireAVCLibConsumerInterface.


getSegmentBuffer


Returns a pointer to the producer's segment buffer.

char * ( *getSegmentBuffer)(
    void *self );  
Parameters
self

Pointer to IOFireWireAVCLibConsumerInterface.

Return Value

Returns a pointer to the producer's segment buffer.


getSegmentSize


Gets the maximum size of the producer's segment buffer.

UInt32 ( *getSegmentSize)(
    void *self );  
Parameters
self

Pointer to IOFireWireAVCLibConsumerInterface.

Return Value

Returns the size of the segment buffer in bytes.


setFrameStatusHandler


Sets the callback handler (of type IOFireWireAVCFrameStatusHandler) to be called when the producer sends data to the consumer.

void ( *setFrameStatusHandler)(
    void *self,
    void *refcon,
    IOFireWireAVCFrameStatusHandler handler );  
Parameters
self

Pointer to IOFireWireAVCLibConsumerInterface.

refcon

Arbitrary value passed back as first argument of callback.

handler

The consumer's callback function.


setMaxPayloadSize


Sets the maximum size of any individual FireWire transaction (an individual block write).

void ( *setMaxPayloadSize)(
    void *self,
    UInt32 size );  
Parameters
self

Pointer to IOFireWireAVCLibConsumerInterface.

size

The maximum payload size in bytes.


setPortFlags


Sets the port flags to the passed in value (currently, there are no flags defined).

void ( *setPortFlags)(
    void *self,
    UInt32 flags );  
Parameters
self

Pointer to IOFireWireAVCLibConsumerInterface.

flags

Currently unused.


setPortStateHandler


Sets the callback handler to report the state of this connection.

void ( *setPortStateHandler)(
    void *self,
    void *refcon,
    IOFireWireAVCPortStateHandler handler );  
Parameters
self

Pointer to IOFireWireAVCLibConsumerInterface.

refcon

Arbitrary value passed back as first argument of callback.

handler

The consumer's callback function.

Discussion

The handler can return one of the following values in its state parameter: Bus Suspended, Bus Resumed, Plug Reconnected, Plug Disconnected, or Device Removed.


setRemotePlug


Sets the plug to which the consumer is connecting.

void ( *setRemotePlug)(
    void *self,
    UInt8 plugNumber );  
Parameters
self

Pointer to IOFireWireAVCLibConsumerInterface.

plugNumber

The plug number.


setSegmentSize


Sets the maximum size of the producer's segment buffer.

IOReturn ( *setSegmentSize)(
    void *self,
    UInt32 size );  
Parameters
self

Pointer to IOFireWireAVCLibConsumerInterface.

size

The maximum size of the segment buffer in bytes.


setSubunit


Sets the subunit in the producer to which the consumer is making a connection.

void ( *setSubunit)(
    void *self,
    UInt8 subunit );  
Parameters
self

Pointer to IOFireWireAVCLibConsumerInterface.

The

8-bit AV/C address of the subunit.


Did this document help you?
Yes: Tell us what works for you.
It’s good, but: Report typos, inaccuracies, and so forth.
It wasn’t helpful: Tell us what would have helped.

 

Last Updated: 2009-02-23