| nb.mod(7) | NodeBrain Administrator Guide
Version 0.7.4 - February 2009 |
nb.mod(7) |
NAME | SYNOPSIS | DESCRIPTION | FILES | RULES | ENVIRONMENT | DIAGNOSTICS | HISTORY | BUGS | AUTHOR | SEE ALSO
| nb.mod - NodeBrain Node Modules (plug-ins) |
|
#include <nb/nb.h>
int skillAssert (nbCELL context , void * skillHandle , void * knowledgeHandle , nbCELL arglist ); nbCELL skillEvaluate (nbCELL context , void * skillHandle , void * knowledgeHandle , nbCELL arglist ); void * skillBind (nbCELL context ,nbCELL skill ,nbCELL arglist ,char * text ){
declare module module [ {"path"} ] [ package [ (args) ] [ ; | :text ] declare skill skill [ module. ] skill [ (args) ] [ ; | :text ] define term node [ skill [ (args) ] ] [ ; | :text ] |
|
NodeBrain modules
are dynamic load libraries used as plug-ins to extend the capabilities of NodeBrain,
nb(1),
using a defined application program interface (API). There is presently only one
such interface defined -
NodeBrain Node Module C API.
Within the context of NodeBrain, we refer to modules that use this interface simply as
"node modules." A node module implements one or more 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. For that, you will need to study the NodeBrain API Reference. Here we only provide enough information, hopefully, to demystify NodeBrain modules for those installing or using an existing module. See http://www.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. |
Node modules are currently only supported on the following platforms.
For a complete and current list of bugs, you should refer to the project web site. Please report bugs by linking to the project page from the home page, http://www.nodebrain.org, or send email to <bugs@nodebrain.org>. |
| Ed Trettevik <eat@nodebrain.org> |
|
nb(1),
nb.man(7),
nb.cfg(5),
nb.syn(5),
nb.lib(3)
[4] NodeBrain Language Reference |
| NodeBrain 0.7.4 | February 2009 | nb.mod(7) |