public AuxiliaryBufferCommand(uint bufferOffset, byte inputBufferOffset, byte outputBufferOffset, ref AuxiliaryBufferAddresses sendBufferInfo, bool isEnabled, uint countMax, CpuAddress outputBuffer, CpuAddress inputBuffer, uint updateCount, uint writeOffset, int nodeId) { Enabled = true; NodeId = nodeId; InputBufferIndex = bufferOffset + inputBufferOffset; OutputBufferIndex = bufferOffset + outputBufferOffset; BufferInfo = sendBufferInfo; InputBuffer = inputBuffer; OutputBuffer = outputBuffer; CountMax = countMax; UpdateCount = updateCount; WriteOffset = writeOffset; IsEffectEnabled = isEnabled; }
/// <summary> /// Generate a new <see cref="AuxiliaryBufferCommand"/>. /// </summary> /// <param name="bufferOffset">The target buffer offset.</param> /// <param name="inputBufferOffset">The input buffer offset.</param> /// <param name="outputBufferOffset">The output buffer offset.</param> /// <param name="state">The aux state.</param> /// <param name="isEnabled">Set to true if the effect should be active.</param> /// <param name="countMax">The limit of the circular buffer.</param> /// <param name="outputBuffer">The guest address of the output buffer.</param> /// <param name="inputBuffer">The guest address of the input buffer.</param> /// <param name="updateCount">The count to add on the offset after write/read operations.</param> /// <param name="writeOffset">The write offset.</param> /// <param name="nodeId">The node id associated to this command.</param> public void GenerateAuxEffect(uint bufferOffset, byte inputBufferOffset, byte outputBufferOffset, ref AuxiliaryBufferAddresses state, bool isEnabled, uint countMax, CpuAddress outputBuffer, CpuAddress inputBuffer, uint updateCount, uint writeOffset, int nodeId) { if (state.SendBufferInfoBase != 0 && state.ReturnBufferInfoBase != 0) { AuxiliaryBufferCommand command = new AuxiliaryBufferCommand(bufferOffset, inputBufferOffset, outputBufferOffset, ref state, isEnabled, countMax, outputBuffer, inputBuffer, updateCount, writeOffset, nodeId); command.EstimatedProcessingTime = _commandProcessingTimeEstimator.Estimate(command); AddCommand(command); } }