/*******************************************************************************
 * (c) Copyright 2015 Microsemi Corporation.  All rights reserved.
 *
 *
 *
 * SVN $Revision: $
 * SVN $Date: $
 */

#ifndef __TABLE_CONFIG_H__
#define __TABLE_CONFIG_H__

#include <api_oam_sdk/common/types/inc/mr_api_types.h>
#include <api_oam_sdk/maintenance_association/src/ma_types.h>
#include <api_oam_sdk/maintenance_domain/src/md_types.h>
#include "egl_types.h"
#include "egl_log.h"

#ifdef CPP
	extern "C" {
#endif

void tableConfigInit(void);

/*
 * @brief	Changes the logging level for this module
 *
 * @param[i]	logLevel - The lowest level severity to log
 *
 * This function is used to change the lowest level severity to log for
 * this module. Values of eLOG_LEVEL_DEBUG (lowest) to eLOG_LEVEL_ERROR
 * can be selected. Levels with greater severity than eLOG_LEVEL_ERROR
 * will default to eLOG_LEVEL_ERROR since severity of eLOG_LEVEL_ERROR
 * and higher are non maskable.
 */
void setTableConfigLogLevel(log_level_t logLevel);
int addLocalMep(lMepNum_t lMepNum, uint16_t lMepId, uint16_t vLan, uint8_t mdLvl, uint8_t interval,iFace_t iFace, simpleMaid_t maid, uint16_t *rxLmepTableAddress);
int addRemoteMep(lMepNum_t lMepNum, uint16_t lMepID, uint16_t rMepID, uint8_t interval, uint8_t SA[6], rMepNum_t rMepNum);
int deleteRemoteMep(rMepNum_t rMepNum);
int deleteLocalMep(uint16_t vLan, uint8_t mdLvl, uint16_t lMepNum, uint16_t lMepID,iFace_t iFace);
int addVidToLMep(uint16_t lMepNum, uint16_t vid, uint8_t port, uint8_t dir, uint8_t mdLvl,uint8_t mepType);
int deleteVidFromLMep(uint16_t lMepNum, uint16_t vid, uint8_t port, uint8_t dir, uint8_t mdLvl);
int addLMep2TxNumRam(uint16_t txLMepNum, interval_t interval,iFace_t iFace);
int disableCcmTx(uint16_t lMepNum);
int deleteCcm(uint16_t lMepNum);
bool isCcmTxEnabled(uint16_t lMepNum);
int enableCcmTx(uint16_t lMepNum);
int disableXConnSM(uint16_t lMepNum);
int enableXConnSM(uint16_t lMepNum, ccmInterval_t ccmInterval);
int disableRMepErrSM(uint16_t lMepNum);
int enableRMepErrSM(uint16_t lMepNum, ccmInterval_t ccmInterval);
int disableRMepSM(uint16_t rMepNum);
int enableRMepSM(uint16_t rMepNum, ccmInterval_t ccmInterval);
int changeMepCcmInterval(lMepNum_t lMepNum, ccmInterval_t newCcmInterval);

uint16_t getSTagId(void);
uint16_t getCTagId(void);
uint16_t getCfmTypeId(void);

int tableInit(void);

#ifdef CPP
	}
#endif
#endif
