sim.simsystem module

This module provides SimSystem class which is used for simulation system control. SimSystem is a static class, it should be called directly without an instance. It is used for other internal modules to do the following:

  • reporting simulation warning due to incorrect implementation

  • stopping simulation due to a critical error

Note

SimSystem.err(err_str)

Call this function when a fatal error has occurred. Calling this function will stop the running and report the provided error message.

SimSystem.warn(warn_str)

Call this function when a non-critical situation has occurred. Calling this function will show a warning on the terminal but will not stop the running.

Note

  • Created by: CH Foh (2021)

class sim.simsystem.SimSystem

Bases: object

It is a static simulation system control class which is used for others to throw warning or error. Warning will not stop the simulation but error will stop the running immediately.

Methods

err(err_str)

Throw an error message and stop the running.

warn(warn_str)

Throw a warning message.

static err(err_str)

Throw an error message and stop the running.

Parameters
err_strstr

The error message to show on the terminal.

static warn(warn_str)

Throw a warning message.

Parameters
warn_strstr

The warning message to show on the terminal.