/*
 * Note: this file originally auto-generated by mib2c using
 *  : mib2c.iterate.conf 15999 2007-03-25 22:32:02Z dts12 $
 */
#ifndef MODULE_PARAM_TABLE_H
#define MODULE_PARAM_TABLE_H

//#include "pbmoninsp_defines.h"

/*
 * struct definition and declaration
 */

Netsnmp_Node_Handler moduleParamTable_handler;
Netsnmp_First_Data_Point moduleParamTable_get_first_data_point;
Netsnmp_Next_Data_Point moduleParamTable_get_next_data_point;

/* column number definitions for table moduleParamTable */
#define COLUMN_SYSINFO			1
#define COLUMN_MODINDEX			2
#define COLUMN_MODDESCR			3
#define COLUMN_MODID			4
#define COLUMN_MODOPERSTATUS	5
#define COLUMN_MODLASTCHANGE	6
#define COLUMN_MODNAME			7
#define COLUMN_CHCOUNT			8

#define PBMON_NAME_SIZE	50
#define PBMON_DES_SIZE	50

/**
 *	@name	Definition of modul param, most used via snmp.
 *
 *	@note	All values within the defined structures are little endian
 *			coded.
 */
/**	@{	*/

/**
 *	Writable modul parameters.
 */
typedef struct t_mod_param_writable {
	char	modName[PBMON_NAME_SIZE];	/**< module name				*/
	char	moddescr[PBMON_DES_SIZE];	/**< description of the module	*/
} mod_param_writable;

typedef struct t_modul_param {
	mod_param_writable	writable_param;	/**< writable module parameter			*/

	/**	counter will be incremented if an operator change the modulName
	 *	or the moddescr from  mod_param, or a the chOperStatusCounter
	 *	was changed */
	u_int16_t			modOperStatusCounter ;

	/**	time ticks since last changes of modOperStatus. Use
	 *	'difftime(time(NULL), modLastChange)' if modLastChange > 0	*/
	time_t				modLastChange ;

	char				firmware[PBMON_NAME_SIZE];	/**< firmware from the specific module	*/
	u_int8_t 			modindex;		/**< module index e.g. 0x9101			*/
	char				modID[10];		/**< string of the modindex				*/
	u_int8_t			channelCount;
} modul_param, *pmodul_param;
/**	@}	*/

/* Typical data structure for a row entry */
struct moduleParamTable_entry
{
	/* Index values */
	long moduleEntryID;

	/* Column values */
	modul_param mod_param;

	/* Illustrate using a simple linked list */
	int valid;
	struct moduleParamTable_entry *next;
};

/* function declarations */

void initialize_table_moduleParamTable(void);
void deinitialize_table_moduleParamTable(void);
struct moduleTable_entry *get_moduleTable_entry(void);

//void update_moduleParamTable(void);

#endif /* MODULE_PARAM_TABLE_H */
