// avc.h
typedef struct _AVC_COMMAND_IRB {
AVC_IRB Common;
UCHAR SubunitAddrFlag : 1;
UCHAR AlternateOpcodesFlag : 1;
UCHAR TimeoutFlag : 1;
UCHAR RetryFlag : 1;
union {
UCHAR CommandType;
UCHAR ResponseCode;
};
PUCHAR SubunitAddr;
PUCHAR AlternateOpcodes;
LARGE_INTEGER Timeout;
UCHAR Retries;
UCHAR Opcode;
ULONG OperandLength;
UCHAR Operands[MAX_AVC_OPERAND_BYTES];
NODE_ADDRESS NodeAddress;
ULONG Generation;
} AVC_COMMAND_IRB, *PAVC_COMMAND_IRB;
View the official Windows Driver Kit DDI referenceNo description available.
The AVC_COMMAND_IRB structure defines a structure that contains an AV/C command and response pair.
CommonThis must be set to the AVC_FUNCTION_COMMAND enumerator from the AVC_FUNCTION enumeration.
SubunitAddrFlagThis is a flag indicating if the SubunitAddr member specifies an address. Set to one if it does, otherwise set to zero.
AlternateOpcodesFlagThis is a flag indicating if the AlternateOpcodes member is valid. Set to one if it is, otherwise set to zero.
TimeoutFlagSet this to one if the default time-out is not appropriate for the subunit. If this is set, the Timeout member must be set to the desired time-out (in 100-ns units).
RetryFlagSet this to one if the default retry count is not appropriate for the subunit. If this is set, the Retries member must be set to the desired retry count.
CommandTypeThis specifies a value from the AvcCommandType enumeration. This member is used only during AVC_FUNCTION_GET_REQUEST. It is ignored otherwise.
ResponseCodeThis specifies a value from the AvcResponseCode enumeration. This member is used only during AVC_FUNCTION_SEND_RESPONSE. It is ignored otherwise.
SubunitAddrSet this to the address of nonpaged memory containing the desired subunit address encoded according to Section 5.3.3 of the AV/C Digital Interface Command Set General Specification, Rev 3.0. No length is necessary because the subunit address encoding implies this. This parameter is ignored if SubunitAddrFlag is zero.
AlternateOpcodesSet this to the address of nonpaged memory containing the desired alternate opcode list. The first byte of the opcode list is the count of opcodes to follow (equivalent to the number of bytes). The total length of the memory containing the alternate opcode list is AlternateOpcodes[0]+1. This parameter is ignored if AlternateOpcodesFlag is zero.
TimeoutSet this to the desired time-out in 100-ns units. For example, the default time-out value is: Timeout.QuadPart = 1000000 (100ms in 100ns units). This parameter is ignored if TimeoutFlag is zero.
RetriesSet this to the desired number of times avc.sys should attempt to retry requests after each time-out without a response. Note that a retry count of zero means that the request is tried once. The total amount of time spent trying to process a command without getting a response is Timeout * (Retries + 1). This parameter is ignored if RetryFlag is zero.
OpcodeSet this to the desired AV/C opcode (appropriate for the subunit type). This is a required parameter. On response, if AlternateOpcodesFlag was set, and one of the alternate opcodes was used to match the response, this is set to that alternate opcode.
OperandLengthSet this to the number of bytes used to store the operands in the Operands member. This is a required parameter. On response, this parameter is set to the number of bytes in the operand list used by the response.
OperandsSet this to the operand list appropriate for the subunit type and opcode. This is a required parameter. On response, this parameter contains the operand list of the response.
NodeAddressReserved. This member must be zero.
GenerationReserved. This member must be zero.
This structure is used with the AVC_FUNCTION_COMMAND, AVC_FUNCTION_GET_REQUEST and AVC_FUNCTION_SEND_RESPONSE function codes.