Class representing a mock implementation of the IFrontPanel interface used for testing.

Implements

Constructors

  • Parameters

    • wireWidth: number

      The width of the mock WireIn and WireOut endpoints, measured in bits.

    • triggerVectorWidth: number

      The width of the mock TriggerOut vectors, measured in bits.

    Returns MockFrontPanel

Properties

_RegisterBlock: MockDataBlock
_TriggerOutVectors: MockDataBlock
_WireInBlock: MockDataBlock
_WireOutBlock: MockDataBlock
PIPEIN_ADDRESS_RANGE: AddressRange = ...

Address range for PipeIn endpoints.

PIPEOUT_ADDRESS_RANGE: AddressRange = ...

Address range for PipeOut endpoints

REGISTER_ADDRESS_RANGE: AddressRange = ...

Address range for Register endpoints

TRIGGERIN_ADDRESS_RANGE: AddressRange = ...

Address range for TriggerIn endpoints.

TRIGGEROUT_ADDRESS_RANGE: AddressRange = ...

Address range for TriggerOut endpoints.

WIREIN_ADDRESS_RANGE: AddressRange = ...

Address range for WireIn endpoints.

WIREOUT_ADDRESS_RANGE: AddressRange = ...

Address range for WireOut endpoints.

Accessors

  • get RegisterBlock(): MockDataBlock
  • The Register data block

    Returns MockDataBlock

  • get TriggerOutBlock(): MockDataBlock
  • The TriggerOut data block

    Returns MockDataBlock

  • get WireInBlock(): MockDataBlock
  • The WireIn data block

    Returns MockDataBlock

  • get WireOutBlock(): MockDataBlock
  • The WireOut data block

    Returns MockDataBlock

Methods

  • Activates the mock TriggerIn endpoint at the specified address and bit.

    Parameters

    • address: number

      The address of the mock TriggerIn vector.

    • bit: number

      The bit to activate.

    Returns Promise<void>

    • A promise that resolves when the mock TriggerIn endpoint has been activated.
  • Gets the mock TriggerOut vector at the specified address.

    Parameters

    • address: number

      The address of the mock TriggerOut vector.

    Returns number

    • The mock TriggerOut vector.
  • Gets the value of the mock WireIn endpoint at the specified address.

    Parameters

    • address: number

      The address of the WireIn endpoint.

    Returns number

    • The value of the mock WireIn endpoint.
  • Gets the value of the mock WireOut endpoint at the specified address.

    Parameters

    • address: number

      The address of the wire out.

    Returns number

    • The value of the wire out.
  • Checks if the mock TriggerOut endpoint at the specified address is active by applying the mask.

    Parameters

    • address: number

      The address of the mock TriggerOut vector.

    • mask: number

      The mask to apply to the mock TriggerOut vector.

    Returns boolean

    • True if the TriggerOut endpoint is active, or false otherwise.
  • Reads data from the Block Throttle PipeOut at the specified address.

    Parameters

    • _address: number
    • _blockSize: number
    • _length: number
    • _buffer: ArrayBuffer

    Returns Promise<number>

    • A promise that resolves when the data has been read indicating the number of bytes that were successfully read.
  • Reads data from the PipeOut at the specified address.

    Parameters

    • _address: number
    • _length: number
    • _buffer: ArrayBuffer

    Returns Promise<number>

    • A promise that resolves when the data has been read indicating the number of bytes that were successfully read.
  • Reads the value of the mock Register at the specified address.

    Parameters

    • address: number

      The address of the mock Register.

    Returns Promise<number>

    • A promise that resolves to the value of the mock Register.
  • Reads the data of the Registers at the specified addresses and stores the data in the corresponding array element.

    Parameters

    • _registers: {
          address: number;
          data: number;
      }[]

    Returns Promise<void>

    • A promise that resolves when all the registers have been read.
  • Sets the value of the mock WireIn endpoint at the specified address.

    Parameters

    • address: number

      The address of the mock WireIn endpoint.

    • value: number

      The value to set.

    • mask: number

      The mask to apply to the value.

    Returns void

  • Updates all mock TriggerOut vectors.

    Returns Promise<void>

    • A promise that resolves when all mock TriggerOut vectors have been updated.
  • Updates all mock WireIn endpoints.

    Returns Promise<void>

    • A promise that resolves when all mock WireIn endpoints have been updated.
  • Updates all mock WireOut endpoints.

    Returns Promise<void>

    • A promise that resolves when all mock WireOut endpoints have been updated.
  • Writes a value to the mock Register at the specified address.

    Parameters

    • address: number

      The address of the mock Register.

    • value: number

      The value to write.

    Returns Promise<void>

    • A promise that resolves when the value has been written.
  • Writes data to each of the Registers at the specified addresses.

    Parameters

    • _registers: {
          address: number;
          data: number;
      }[]

    Returns Promise<void>

    • A promise that resolves when the register values have been written.
  • Writes data to the Block Throttle PipeIn at the specified address.

    Parameters

    • _address: number
    • _blockSize: number
    • _length: number
    • _data: ArrayBuffer

    Returns Promise<number>

    • A promise that resolves when the data has been written indicating the number of bytes that were successfully written.
  • Writes data to the PipeIn at the specified address.

    Parameters

    • _address: number
    • _length: number
    • _data: ArrayBuffer

    Returns Promise<number>

    • A promise that resolves when the data has been written indicating the number of bytes that were successfully written.

Generated using TypeDoc