Interface CPUContext

  • All Superinterfaces:
    Context

    public interface CPUContext
    extends Context
    CPU context can be used by plugins which are connected to CPU. Custom CPU contexts can extend the runtime functionality accessible to plugins. Plugins which need the specific CPU contexts, should declare a dependency on the CPU plugin.
    • Method Detail

      • isRawInterruptSupported

        boolean isRawInterruptSupported()
        Determine whether this CPU supports raw interrupts.
        Returns:
        true, if raw interrupts are supported, false otherwise
      • signalRawInterrupt

        void signalRawInterrupt​(DeviceContext<?> device,
                                byte[] data)
        Send raw interrupt signal to the CPU. Does nothing if raw interrupts are not supported.
        Parameters:
        device - Device that interrupts the CPU
        data - interrupt data
      • isInterruptSupported

        boolean isInterruptSupported()
        Determine whether this CPU supports interrupts.
        Returns:
        true, if interrupts are supported, false otherwise
      • signalInterrupt

        void signalInterrupt​(DeviceContext<?> device,
                             int mask)
        Send interrupt signal to the CPU.
        Parameters:
        device - Device that interrupts the CPU
        mask - interrupt mask
      • clearInterrupt

        void clearInterrupt​(DeviceContext<?> device,
                            int mask)
        Cancel sending interrupt signal if it was not handled yet.
        Parameters:
        device - Device that wants to cancel the interrupt signal
        mask - clear interrupt mask
      • getCPUFrequency

        int getCPUFrequency()
        Get CPU frequency in kHz
        Returns:
        CPU frequency in kHz or 0 if it is not supported