set_enum

Creates a new enumerator type.

This function generates an event.

Function

set_enum(enum, members)

Arguments

Argument Type Description
enum str The name of the enumerator type to create.
members thing Thing containing all the members to be set.

Return value

The value nil.

Example

This code shows how to use set_enum():

set_enum('Status', {
    OK: 0,
    NOK: -1
});

Return value in JSON format

null