nb.mod(7) | NodeBrain Administrator Guide
Version 0.9.03 - December 2014 |
nb.mod(7) |
NAME | SYNOPSIS | DESCRIPTION | FILES | RULES | ENVIRONMENT | DIAGNOSTICS | HISTORY | BUGS | AUTHOR | DOCUMENTATION | SEE ALSO
nb.mod - NodeBrain Modules (plug-ins) |
#include <nb/nb.h>
See the NodeBrain Library manual for a description of C API functions. |
NodeBrain modules
are dynamic load libraries used as plug-ins to extend the capabilities of the
NodeBrain Rule Engine,
nb(1).
Modules may by used to provide "cell functions" for use in formulas. The API is
called to bind a C function to a cell function that may then be referenced within
formulas in NodeBrain rules. A cell function call that binds to the C sqrt function
looks like this.
Modules may also be used to implement one or more node skills. For each skill, the module must implement one or more skill methods (functions) within a defined set. Once declared, a skill may be associated with any number of nodes. A node is an object that has the defined skill, but also (often) the ability to accumulate a set of knowledge independent of other nodes with the same skill. You will not find enough information here to learn how to write a node module. Here we only provide enough information, hopefully, to demystify NodeBrain modules for those installing or using an existing module. The NodeBrain Library manual describes the API. See http://nodebrain.org for more information. |
|
Here we use the Tree node module included in the NodeBrain distribution to
illustrate how a module is referenced in rules (commands). The Tree module implements a table using a
tree structure internally. In this example, we define two Tree nodes---one
for a critical device table and one for a problem device table.
|
Some of the C functions nb
calls (e.g. for loading dynamic modules) are influenced by environment variables in
ways we assume you can figure out for your environment.
|
If NodeBrain is unable to load a module an error message is displayed.
When a module is successfully loaded but the symbol referenced in a skill declaration is not found, a message is displayed.
NodeBrain does not attempt to load a module when it is declared. Instead, it waits until a module is referenced by a DEFINE command for a node to avoid loading modules unnecessarily. For this reason, either of the messages above will follow a node definition when there is an error. |
Node modules (plug-ins) were introduced in NodeBrain prototype release 0.6.0 in April, 2004. |
See nb(1). Please report bugs to <bugs@nodebrain.org> or enter a bug report at http://nodebrain.org. |
Ed Trettevik <eat@nodebrain.org> |
Online documentation is available at http://nodebrain.org. Manuals are also available in Texinfo format in the git repository. These documents are included in source distribution files. |
nodebrain(7), nb(1), nb.cfg(5), nb.syn(5), nbkit(1), nbkit-caboodle(7) |
NodeBrain 0.9.03 | December 2014 | nb.mod(7) |