IOFWAsyncStreamRxCommand.h [plain text]
#ifndef _IOKIT_IOFWASYNCSTREAMRXCOMMAND_H
#define _IOKIT_IOFWASYNCSTREAMRXCOMMAND_H
#define FIREWIREPRIVATE
#include <IOKit/firewire/IOFireWireLink.h>
#include <IOKit/firewire/IOFWCommand.h>
#include <IOKit/IOBufferMemoryDescriptor.h>
#include <IOKit/firewire/IOFWDCLProgram.h>
#include "IOIPPort.h"
#define MAX_BCAST_BUFFERS 9
typedef struct
{
void *obj;
void *thisObj;
UInt8 *buffer;
UInt16 index;
} RXProcData ;
typedef struct IPRxSegment
{
DCLLabelPtr pSegmentLabelDCL;
DCLJumpPtr pSegmentJumpDCL;
}IPRxSegment, *IPRxSegmentPtr;
class IOFWAsyncStreamRxCommand : public OSObject
{
OSDeclareDefaultStructors(IOFWAsyncStreamRxCommand)
protected:
IOBufferMemoryDescriptor *fBufDesc;
DCLCommandStruct *fdclProgram;
IOIPPort *fAsynStreamPort;
IOFWIsochChannel *fAsyncStreamChan;
IODCLProgram *fIODclProgram;
IOFireWireController *fControl;
IOFireWireLink *fFWIM;
bool bStarted;
bool fInitialized;
UInt32 fChan;
IOFWSpeed fSpeed;
UInt32 fSeg;
IPRxSegmentPtr fReceiveSegmentInfo;
DCLLabel *fDCLOverrunLabel;
UInt16 fIsoRxOverrun;
IORecursiveLock *rxCommandLock;
enum
{
kMaxIsochPacketSize = 4096,
};
struct ExpansionData { };
ExpansionData *reserved;
virtual void free();
DCLCommandStruct *CreateAsyncStreamRxDCLProgram(DCLCallCommandProc* proc, UInt32 size, void *callbackObject);
IOIPPort *CreateAsyncStreamPort(bool talking, DCLCommandStruct *opcodes, void *info,
UInt32 startEvent, UInt32 startState, UInt32 startMask,
UInt32 channel);
void FreeAsyncStreamRxDCLProgram(DCLCommandStruct *dclProgram);
public:
bool initAll(UInt32 channel,
DCLCallCommandProc *proc,
IOFireWireController *control,
UInt32 size,
void *callbackObject);
IOReturn start(IOFWSpeed fBroadCastSpeed);
IOReturn stop();
static void restart(DCLCommandStruct *callProc);
IOReturn modifyDCLJumps(DCLCommandStruct *callProc);
UInt16 getOverrunCounter() {return fIsoRxOverrun;};
private:
void fixDCLJumps(bool bRestart);
OSMetaClassDeclareReservedUnused(IOFWAsyncStreamRxCommand, 0);
OSMetaClassDeclareReservedUnused(IOFWAsyncStreamRxCommand, 1);
};
#endif // _IOKIT_IOFWASYNCSTREAMRXCOMMAND_H