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

#ifndef LM_H_
#define LM_H_

#include <api_oam_sdk/performance_monitoring/inc/pm_lm.h>
#include <api_oam_sdk/performance_monitoring/src/pm_config.h>
#include <api_oam_sdk/table_access/inc/table_types.h>
#include "egl_types.h"

void addLMSvcToLMep(lMepNum_t lMepNum,
		rMepNum_t rMepNum, interval_t pmInterval,
		uint32_t lossThresh,uint8_t prio,
		txTemplateEntry_t *txLMTempl, pmNum_t pmNum, iFace_t iFace);

void clrLMStats(pmNum_t pmNum);

void lmSvcEnable(pmNum_t pmNum, bool enable);

void removeLMSvc(pmNum_t pmNum);

bool lmReadStats(pmNum_t pmNum, lmStatsEntry_t *lossStatsEntry);

#ifdef PM_RAM_HISTORY
int readLmHistoryStats(pmNum_t pmNum, uint32_t statsIndex, lmStats_t *historyStats);

int writeLmHistoryStats(pmNum_t pmNum, lmStats_t *historyStats);

int readLmHistoryAvailStats(pmNum_t pmNum, uint32_t availStatsIndex, lmAvailStats_t *historyAvailStats);

int writeLmHistoryAvailStats(pmNum_t pmNum, lmAvailStats_t *historyAvailStats);

void clearLmHistory(pmNum_t pmNum);
#endif

#endif /* LM_H_ */
