/*
** Sella NMS
** $Id: MODULE,v 2.7 2005/01/20 03:52:00 sella Exp $
** Copyright (c) 2001-2005 Digital Genesis Software. All Rights Reserved.
** Released under the GPL Version 2 License.
** http://www.digitalgenesis.com
*/

Until this document is fully fleshed out, examine the included modules. The
'dummy' module is also included in the source tree, and provides a good
example of a simple module. The most simple design for a module is below.

The header would look like this:

#ifndef __DGS_MODULE_SIMPLE_H
#define __DGS_MODULE_SIMPLE_H

#ifdef HAVE_CONFIG_H
	#include "config.h"
#endif

#include "defs.h"
#include "util.h"
#include "../module.h"
#include <stdio.h>
#include <stdlib.h>

class Simple: public Module {
	public:
		Simple();
		~Simple();

	protected:
		virtual RESULT execute();

	private:
		RESULT readConfig();
};

#endif


Modules should be of this form:

#ifdef HAVE_CONFIG_H
	#include "config.h"
#endif

#include "simple.h"
#include "debug.h"
#include "storage/storage.h"
#include "storagedata.h"

Simple::Simple() {
	this->name.append(" simple");

	has_scheduler = false;
	has_execute = true;
}

Simple::~Simple() {
}

RESULT Simple::readConfig() {
	RESULT result = SUCCESS;

	return result;
}

RESULT Simple::execute() {
	RESULT result = SUCCESS;

	return result;
}
