Libraries - Create Interface

An interface library is similar to a class in Luna. All elements contained in an interface are included within the interface and features may be dependent on properties within an interface. For example, the assignment of a port pin before calling an initialization function and then using functions.

Mostly classical interfaces can be used to control hardware components. Other possible uses include any type of self-contained applications, eg. An emulated software protocol, or an encapsulated mathematical function with more special input parameters. Compared to the normal classes in Luna, special properties can be assigned and/or retrieved - such as Port pins or a keyword-dependent function. Similar to the built-in Luna Interfaces for example, Ports, timers or others.

The following picture shows an inline method that allows only the allocation of certain constant values:

#library "Library/example.interface"
'[...]
example.myaction(123)