### Table of Contents - [constructor](#constructor) - [start](#start) - [queue](#queue) - [run](#run) - [wait](#wait) - [incrementTicks](#incrementticks) - [send](#send) - [getInstance](#getinstance) ## constructor [exoInterface.js:17-43](https://github.com/primea/js-primea-hypervisor/blob/9b7a855ce9b773c9162179ef6cdb3c70739711f0/exoInterface.js#L17-L43 "Source code on GitHub") the ExoInterface manages the varous message passing functions and provides an interface for the containers to use **Parameters** - `opts` **[Object](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object)** - `opts.state` **[Object](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object)** - `opts.entryPort` **[Object](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object)** - `opts.parentPort` **[Object](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object)** - `opts.hypervisor` **[Object](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object)** - `opts.Container` **[Object](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object)** ## start [exoInterface.js:49-51](https://github.com/primea/js-primea-hypervisor/blob/9b7a855ce9b773c9162179ef6cdb3c70739711f0/exoInterface.js#L49-L51 "Source code on GitHub") starts the container Returns **[Promise](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise)** ## queue [exoInterface.js:57-64](https://github.com/primea/js-primea-hypervisor/blob/9b7a855ce9b773c9162179ef6cdb3c70739711f0/exoInterface.js#L57-L64 "Source code on GitHub") adds a message to this containers message queue **Parameters** - `message` **Message** ## run [exoInterface.js:88-106](https://github.com/primea/js-primea-hypervisor/blob/9b7a855ce9b773c9162179ef6cdb3c70739711f0/exoInterface.js#L88-L106 "Source code on GitHub") run the kernels code with a given enviroment The Kernel Stores all of its state in the Environment. The Interface is used to by the VM to retrive infromation from the Environment. **Parameters** - `message` Returns **[Promise](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise)** ## wait [exoInterface.js:113-127](https://github.com/primea/js-primea-hypervisor/blob/9b7a855ce9b773c9162179ef6cdb3c70739711f0/exoInterface.js#L113-L127 "Source code on GitHub") returns a promise that resolves once the kernel hits the threshould tick count **Parameters** - `threshold` - `fromPort` - `threshould` **[Number](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number)** the number of ticks to wait Returns **[Promise](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise)** ## incrementTicks [exoInterface.js:133-141](https://github.com/primea/js-primea-hypervisor/blob/9b7a855ce9b773c9162179ef6cdb3c70739711f0/exoInterface.js#L133-L141 "Source code on GitHub") updates the number of ticks that the container has run **Parameters** - `count` **[Number](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number)** the number of ticks to add ## send [exoInterface.js:148-166](https://github.com/primea/js-primea-hypervisor/blob/9b7a855ce9b773c9162179ef6cdb3c70739711f0/exoInterface.js#L148-L166 "Source code on GitHub") sends a message to a given port **Parameters** - `portRef` **[Object](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object)** the port - `message` **Message** the message ## getInstance [exoInterface.js:173-175](https://github.com/primea/js-primea-hypervisor/blob/9b7a855ce9b773c9162179ef6cdb3c70739711f0/exoInterface.js#L173-L175 "Source code on GitHub") gets a container instance given a port **Parameters** - `portRef` **[Object](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object)** the port Returns **[Object](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object)**