Creates a new Brick instance.
The options for creating a Brick.
Private
Optional
#keepThe interval of the keep alive function of the Brick instance. This is a private property used to store the interval of the keep alive function.
Private
#programsThe programs of the Brick instance. This is a private property used to store the programs that the Brick can run.
Private
#tasksThe scheduled tasks of the Brick instance. This is a private property used to store the scheduled tasks that the Brick can run.
Optional
aiThe intelligence of the Brick instance. This is used to manage the AI capabilities of the Brick.
Optional
dbThe database of the Brick instance. This is used to manage the data storage and retrieval for the Brick.
The event emitter of the Brick instance. This is used to emit events that occur in the Brick, such as the running of a program.
The unique identifier of the Brick instance.
The logger used by the Brick instance. This is used to log information about the operation of the Brick.
The name of the Brick instance.
Optional
structureThe parent Structure of the Brick instance, if any.
Toggles the keep alive flag of the Brick instance, which will prevent the Node process from exiting
A boolean indicating whether to turn the keep alive flag on or off.
This is useful if you don't have a server or something else keeping the Node process alive.
Adds a program to the private map of programs.
The program to add.
A Brick is the core of the framework. It encapsulates various functionality such as AI, data storage and retrieval, processing, and logging. Many Bricks can be combined to form a Structure, which may be easily passed around your application.