Server

The program, that manages requests to controllers and broadcasts them to every specified controller

Contents:

Dependencies

Configurable Properties

Name

Type

Default

controllerDomains

table

{}

modemSide

string

"top"

controllerDomains

A list containing all the domain names of the controllers, which are used to look up the addresses of the controllers.

local controllerDomains = {}
  • Type: table

  • Default: {}

Important

The specified domain names have to be registered in the DNS Server.


modemSide

The side the wireless modem is connected to the computer.

local modemSide = "top"
  • Type: string

  • Default: "top"


Requests

FLOW

Release 5 essentia from the specified aspect. Fails if aspect is not serverd by controller or amount of essentia of specified aspect is less than 5.

Note

The server only broadcasts this request to the controllers specified with controllerDomains. The controllers actually handle the requests.

{head = "FLOW", contents = {aspect = ""}}

request Contents:

Name

Type

Default

Description

aspect

string

nil

Aspect of which 5 essentia should be released.

Response contents: nil


PROBE

Probe the amount of specified aspect in jar. Fails if aspect is not serverd by controller.

Note

The server only broadcasts this request to the controllers specified with controllerDomains. The controllers actually handle the requests.

{head = "PROBE", contents = {aspect = ""}}

Request Contents:

Name

Type

Default

Description

aspect

string

nil

Aspect of which the amount should be probed.

Response contents:

Name

Type

Description

aspect

string

Aspect in probed jar.

amount

number

Amount of stored essentia in probed jar.

Warning

If aspect in response contents doesn’t match with aspect in request contents, then the order of nbtPeripheralTags is most likely faulty.


Constants

Name

Type

Value

title

string

"Essentia Server"

version

string

"v1.0"

title

The title of this program.

local title = "Essentia Server"
  • Type: string

  • Default: "Essentia Server"


version

The version of this program.

local version = "v1.0"
  • Type: string

  • Default: "v1.0"


Internal Properties

Name

Type

Default

controllerAddresses

table

{}

sModem

sModem

nil

controllerAddresses

A list containing the resolved addresses of the controllers specified in controllerDomains.

local controllerAddresses = {}
  • Type: table

  • Default: {}


sModem

An instance of a secure modem object

local nbtPeripherals = {}
  • Type: sModem

  • Default: nil