HiveMind
Public Member Functions | List of all members
IBittyBuzzVm Class Referenceabstract

Manages BittyBuzz virtual machine. More...

#include <IBittyBuzzVm.h>

Inheritance diagram for IBittyBuzzVm:
Inheritance graph
Collaboration diagram for IBittyBuzzVm:
Collaboration graph

Public Member Functions

virtual ~IBittyBuzzVm ()=default
 
virtual bool init (const std::reference_wrapper< IBittyBuzzLib > *bbzLibs, uint32_t bbzLibsLength)=0
 Init the virtual machine. More...
 
virtual bool start ()=0
 Starts the vm. More...
 
virtual void stop ()=0
 Stops the vm, can be called in another thread or in an interrupt. More...
 
virtual BBVMRet step ()=0
 Does one execution step in the virtual machine. Thus execute the buzz code in the step function. More...
 
virtual void terminate ()=0
 Terminate the virtual machine and removes all messages that were supposed to be processed. More...
 
virtual void logDump (LogLevel logLevel)=0
 Logs the virtual machine state, stack, heap and table segments. More...
 
virtual bbzvm_state getState () const =0
 Get the state of the vm. More...
 
virtual bbzvm_error getError () const =0
 Get the error state of the VM. More...
 
virtual bbzvm_instr getInstruction () const =0
 Get the current instruction of the VM. More...
 

Detailed Description

Manages BittyBuzz virtual machine.

Constructor & Destructor Documentation

◆ ~IBittyBuzzVm()

virtual IBittyBuzzVm::~IBittyBuzzVm ( )
virtualdefault

Member Function Documentation

◆ getError()

virtual bbzvm_error IBittyBuzzVm::getError ( ) const
pure virtual

Get the error state of the VM.

Implemented in BittyBuzzVm.

◆ getInstruction()

virtual bbzvm_instr IBittyBuzzVm::getInstruction ( ) const
pure virtual

Get the current instruction of the VM.

Implemented in BittyBuzzVm.

◆ getState()

virtual bbzvm_state IBittyBuzzVm::getState ( ) const
pure virtual

Get the state of the vm.

Implemented in BittyBuzzVm.

◆ init()

virtual bool IBittyBuzzVm::init ( const std::reference_wrapper< IBittyBuzzLib > *  bbzLibs,
uint32_t  bbzLibsLength 
)
pure virtual

Init the virtual machine.

Parameters
bbzLibsan array of the libraries to init
bbzLibsLengththe length of the libraries to init

Implemented in BittyBuzzVm.

◆ logDump()

virtual void IBittyBuzzVm::logDump ( LogLevel  logLevel)
pure virtual

Logs the virtual machine state, stack, heap and table segments.

Parameters
logLevelThe desired log level for the dumped information

Implemented in BittyBuzzVm.

◆ start()

virtual bool IBittyBuzzVm::start ( )
pure virtual

Starts the vm.

Implemented in BittyBuzzVm.

◆ step()

virtual BBVMRet IBittyBuzzVm::step ( )
pure virtual

Does one execution step in the virtual machine. Thus execute the buzz code in the step function.

Implemented in BittyBuzzVm.

◆ stop()

virtual void IBittyBuzzVm::stop ( )
pure virtual

Stops the vm, can be called in another thread or in an interrupt.

Implemented in BittyBuzzVm.

◆ terminate()

virtual void IBittyBuzzVm::terminate ( )
pure virtual

Terminate the virtual machine and removes all messages that were supposed to be processed.

Implemented in BittyBuzzVm.


The documentation for this class was generated from the following file: