/******************************************************************************/
/*                       Copyright 2001 Broadcom Corporation                  */
/*                                                                            */
/* This material is the confidential trade secret and proprietary information */
/* of Broadcom Corp.  It may not be reproduced, used, sold or transferred to  */
/* any third party without the prior written consent of Broadcom Corp.        */
/* All rights reserved.                                                       */
/******************************************************************************/
/*   FileName        : bcm_hmiLineServices.h                                  */
/*   Purpose         : Provide line manager hmi services throuth QA protocol  */
/*   Limitations     : None                                                   */
/*   Author          : Emmanuel Hanssens                                      */
/*   Creation Date   : 19-Sep-2001                                            */
/*   History         : Compiled by CVS                                        */
/******************************************************************************/
/*   $Id: bcm_hmiLineServices.h,v 1.22 2004/11/15 15:57:19 kdmaeyer Exp $  */
/******************************************************************************/
#ifndef HMI_LINE_SERVICES_H
# define HMI_LINE_SERVICES_H

# include "bcm_hmiLineMsg.h"
# include "bcm_hmiQA.h"

# define ResetLine(dev, applicationId) \
  hmiQA(dev, applicationId, \
  (uint8 *) 0, 0, \
  (uint8 *) 0, 0, \
  &ResetLineLayout)

# define SetLineTrafficConfiguration(dev, applicationId, msgReq) \
  hmiQA(dev, applicationId, \
  (uint8 *) msgReq, SIZE_OF_REQ_MSG(SetLineTrafficConfiguration), \
  (uint8 *) 0, 0, \
  &SetLineTrafficConfigurationLayout)

# define GetLineTrafficConfiguration(dev, applicationId, msgRep) \
  hmiQA(dev, applicationId, \
  (uint8 *) 0, 0, \
  (uint8 *) msgRep, SIZE_OF_REP_MSG(GetLineTrafficConfiguration), \
  &GetLineTrafficConfigurationLayout)

# define SetLinePhysicalLayerConfiguration(dev, applicationId, msgReq) \
  hmiQA(dev, applicationId, \
  (uint8 *) msgReq, SIZE_OF_REQ_MSG(SetLinePhysicalLayerConfiguration), \
  (uint8 *) 0, 0, \
  &SetLinePhysicalLayerConfigurationLayout)

# define GetLinePhysicalLayerConfiguration(dev, applicationId, msgRep) \
  hmiQA(dev, applicationId, \
  (uint8 *) 0, 0, \
  (uint8 *) msgRep, SIZE_OF_REP_MSG(GetLinePhysicalLayerConfiguration), \
  &GetLinePhysicalLayerConfigurationLayout)

# define SetLineTestConfiguration(dev, applicationId, msgReq) \
  hmiQA(dev, applicationId, \
  (uint8 *) msgReq, SIZE_OF_REQ_MSG(SetLineTestConfiguration), \
  (uint8 *) 0, 0, \
  &SetLineTestConfigurationLayout)

# define GetLineTestConfiguration(dev, applicationId, msgRep) \
  hmiQA(dev, applicationId, \
  (uint8 *) 0, 0, \
  (uint8 *) msgRep, SIZE_OF_REP_MSG(GetLineTestConfiguration), \
  &GetLineTestConfigurationLayout)

# define StartLine(dev, applicationId) \
  hmiQA(dev, applicationId, \
  (uint8 *) 0, 0, \
  (uint8 *) 0, 0, \
  &StartLineLayout)

# define StopLine(dev, applicationId) \
  hmiQA(dev, applicationId, \
  (uint8 *) 0, 0, \
  (uint8 *) 0, 0, \
  &StopLineLayout)

# define GetLineCounters(dev, applicationId, msgRep) \
  hmiQA(dev, applicationId, \
  (uint8 *) 0, 0, \
  (uint8 *) msgRep, SIZE_OF_REP_MSG(GetLineCounters), \
  &GetLineCountersLayout)

# define GetLineStatus(dev, applicationId, msgRep) \
  hmiQA(dev, applicationId, \
  (uint8 *) 0, 0, \
  (uint8 *) msgRep, SIZE_OF_REP_MSG(GetLineStatus), \
  &GetLineStatusLayout)

# define GetLineFeatures(dev, applicationId, msgRep) \
  hmiQA(dev, applicationId, \
  (uint8 *) 0, 0, \
  (uint8 *) msgRep, SIZE_OF_REP_MSG(GetLineFeatures), \
  &GetLineFeaturesLayout)

# define ReadEocRegister(dev, applicationId, msgReq) \
  hmiQA(dev, applicationId, \
  (uint8 *) msgReq, SIZE_OF_REQ_MSG(ReadEocRegister), \
  (uint8 *) 0, 0, \
  &ReadEocRegisterLayout)

# define GetEocReadResult(dev, applicationId, msgRep) \
  hmiQA(dev, applicationId, \
  (uint8 *) 0, 0, \
  (uint8 *) msgRep, SIZE_OF_REP_MSG(GetEocReadResult), \
  &GetEocReadResultLayout)

# define WriteEocRegister(dev, applicationId, msgReq) \
  hmiQA(dev, applicationId, \
  (uint8 *) msgReq, SIZE_OF_REQ_MSG(WriteEocRegister), \
  (uint8 *) 0, 0, \
  &WriteEocRegisterLayout)

# define GetEocWriteResult(dev, applicationId, msgRep) \
  hmiQA(dev, applicationId, \
  (uint8 *) 0, 0, \
  (uint8 *) msgRep, SIZE_OF_REP_MSG(GetEocWriteResult), \
  &GetEocWriteResultLayout)

# define SendClearEocMessage(dev, applicationId, msgReq) \
  hmiQA(dev, applicationId, \
  (uint8 *) msgReq, SIZE_OF_REQ_MSG(SendClearEocMessage), \
  (uint8 *) 0, 0, \
  &SendClearEocMessageLayout)

# define GetClearEocMessage(dev, applicationId, msgRep) \
  hmiQA(dev, applicationId, \
  (uint8 *) 0, 0, \
  (uint8 *) msgRep, SIZE_OF_REP_MSG(GetClearEocMessage), \
  &GetClearEocMessageLayout)

# define EnterLineTestMode(dev, applicationId, msgReq) \
  hmiQA(dev, applicationId, \
  (uint8 *) msgReq, SIZE_OF_REQ_MSG(EnterLineTestMode), \
  (uint8 *) 0, 0, \
  &EnterLineTestModeLayout)

# define ExitLineTestMode(dev, applicationId) \
  hmiQA(dev, applicationId, \
  (uint8 *) 0, 0, \
  (uint8 *) 0, 0, \
  &ExitLineTestModeLayout)

# define StartLoopCharacterisation(dev, applicationId, msgReq) \
  hmiQA(dev, applicationId, \
  (uint8 *) msgReq, SIZE_OF_REQ_MSG(StartLoopCharacterisation), \
  (uint8 *) 0, 0, \
  &StartLoopCharacterisationLayout)

# define GetLoopCharacteristics(dev, applicationId, msgRep) \
  hmiQA(dev, applicationId, \
  (uint8 *) 0, 0, \
  (uint8 *) msgRep, SIZE_OF_REP_MSG(GetLoopCharacteristics), \
  &GetLoopCharacteristicsLayout)

# define StartSignalGenerationAndMeasurement(dev, applicationId, msgReq) \
  hmiQA(dev, applicationId, \
  (uint8 *) msgReq, SIZE_OF_REQ_MSG(StartSignalGenerationAndMeasurement), \
  (uint8 *) 0, 0, \
  &StartSignalGenerationAndMeasurementLayout)

# define GetSignalMeasurement(dev, applicationId, msgRep) \
  hmiQA(dev, applicationId, \
  (uint8 *) 0, 0, \
  (uint8 *) msgRep, SIZE_OF_REP_MSG(GetSignalMeasurement), \
  &GetSignalMeasurementLayout)

# define StartManufacturingTest(dev, applicationId, msgReq) \
  hmiQA(dev, applicationId, \
  (uint8 *) msgReq, SIZE_OF_REQ_MSG(StartManufacturingTest), \
  (uint8 *) 0, 0, \
  &StartManufacturingTestLayout)

# define GetManufacturingTestResult(dev, applicationId, msgRep) \
  hmiQA(dev, applicationId, \
  (uint8 *) 0, 0, \
  (uint8 *) msgRep, SIZE_OF_REP_MSG(GetManufacturingTestResult), \
  &GetManufacturingTestResultLayout)

# define GetLineAGCsetting(dev, applicationId, msgRep) \
  hmiQA(dev, applicationId, \
  (uint8 *) 0, 0, \
  (uint8 *) msgRep, SIZE_OF_REP_MSG(GetLineAGCsetting), \
  &GetLineAGCsettingLayout)

# define GetEcho(dev, applicationId, msgReq, msgRep) \
  hmiQA(dev, applicationId, \
  (uint8 *) msgReq, SIZE_OF_REQ_MSG(GetEcho), \
  (uint8 *) msgRep, SIZE_OF_REP_MSG(GetEcho), \
  &GetEchoLayout)

# define GetSelt(dev, applicationId, msgReq, msgRep) \
  hmiQA(dev, applicationId, \
  (uint8 *) msgReq, SIZE_OF_REQ_MSG(GetSelt), \
  (uint8 *) msgRep, SIZE_OF_REP_MSG(GetSelt), \
  &GetSeltLayout)


# define GetEchoVariance(dev, applicationId, msgReq, msgRep) \
  hmiQA(dev, applicationId, \
  (uint8 *) msgReq, SIZE_OF_REQ_MSG(GetEchoVariance), \
  (uint8 *) msgRep, SIZE_OF_REP_MSG(GetEchoVariance), \
  &GetEchoVarianceLayout)

# define GetLineBitAndSnr(dev, applicationId, msgReq, msgRep) \
  hmiQA(dev, applicationId, \
  (uint8 *) msgReq, SIZE_OF_REQ_MSG(GetLineBitAndSnr), \
  (uint8 *) msgRep, SIZE_OF_REP_MSG(GetLineBitAndSnr), \
  &GetLineBitAndSnrLayout)

# define GetLinePeriodCounters(dev, applicationId, msgReq, msgRep) \
  hmiQA(dev, applicationId, \
  (uint8 *) msgReq, SIZE_OF_REQ_MSG(GetLinePeriodCounters), \
  (uint8 *) msgRep, SIZE_OF_REP_MSG(GetLinePeriodCounters), \
  &GetLinePeriodCountersLayout)

# define SetLineOAMthresholds(dev, applicationId, msgReq) \
  hmiQA(dev, applicationId, \
  (uint8 *) msgReq, SIZE_OF_REQ_MSG(SetLineOAMthresholds), \
  (uint8 *) 0, 0, \
  &SetLineOAMthresholdsLayout)

# define GetLineCPEvendorInfo(dev, applicationId, msgRep) \
  hmiQA(dev, applicationId, \
  (uint8 *) 0, 0, \
  (uint8 *) msgRep, SIZE_OF_REP_MSG(GetLineCPEvendorInfo), \
  &GetLineCPEvendorInfoLayout)

# define SendOverheadMessage(dev, applicationId, msgReq) \
  hmiQA(dev, applicationId, \
  (uint8 *) msgReq, SIZE_OF_REQ_MSG(SendOverheadMessage), \
  (uint8 *) 0, 0, \
  &SendOverheadMessageLayout)

# define GetOverheadMessage(dev, applicationId, msgReq, msgRep) \
  hmiQA(dev, applicationId, \
  (uint8 *) msgReq, SIZE_OF_REQ_MSG(GetOverheadMessage), \
  (uint8 *) msgRep, SIZE_OF_REP_MSG(GetOverheadMessage), \
  &GetOverheadMessageLayout)

# define GetLineLoopDiagResults(dev, applicationId, msgRep) \
  hmiQA(dev, applicationId, \
  (uint8 *) 0, 0, \
  (uint8 *) msgRep, SIZE_OF_REP_MSG(GetLineLoopDiagResults), \
  &GetLineLoopDiagResultsLayout)

# define GetLineLoopDiagHlin(dev, applicationId, msgReq, msgRep) \
  hmiQA(dev, applicationId, \
  (uint8 *) msgReq, SIZE_OF_REQ_MSG(GetLineLoopDiagHlin), \
  (uint8 *) msgRep, SIZE_OF_REP_MSG(GetLineLoopDiagHlin), \
  &GetLineLoopDiagHlinLayout)

# define GetLineLoopDiagHlog(dev, applicationId, msgReq, msgRep) \
  hmiQA(dev, applicationId, \
  (uint8 *) msgReq, SIZE_OF_REQ_MSG(GetLineLoopDiagHlog), \
  (uint8 *) msgRep, SIZE_OF_REP_MSG(GetLineLoopDiagHlog), \
  &GetLineLoopDiagHlogLayout)

# define GetLineLoopDiagQln(dev, applicationId, msgReq, msgRep) \
  hmiQA(dev, applicationId, \
  (uint8 *) msgReq, SIZE_OF_REQ_MSG(GetLineLoopDiagQln), \
  (uint8 *) msgRep, SIZE_OF_REP_MSG(GetLineLoopDiagQln), \
  &GetLineLoopDiagQlnLayout)

# define GetLineLoopDiagSnr(dev, applicationId, msgReq, msgRep) \
  hmiQA(dev, applicationId, \
  (uint8 *) msgReq, SIZE_OF_REQ_MSG(GetLineLoopDiagSnr), \
  (uint8 *) msgRep, SIZE_OF_REP_MSG(GetLineLoopDiagSnr), \
  &GetLineLoopDiagSnrLayout)

# define UpdateTestParameters(dev, applicationId, msgReq, msgRep) \
  hmiQA(dev, applicationId, \
  (uint8 *) msgReq, SIZE_OF_REQ_MSG(UpdateTestParameters), \
  (uint8 *) msgRep, SIZE_OF_REP_MSG(UpdateTestParameters), \
  &UpdateTestParametersLayout)

# define GetLineHlogNE(dev, applicationId, msgRep) \
  hmiQA(dev, applicationId, \
  (uint8 *) 0, 0, \
  (uint8 *) msgRep, SIZE_OF_REP_MSG(GetLineHlogNE), \
  &GetLineHlogNELayout)

# define GetLineQlnNE(dev, applicationId, msgRep) \
  hmiQA(dev, applicationId, \
  (uint8 *) 0, 0, \
  (uint8 *) msgRep, SIZE_OF_REP_MSG(GetLineQlnNE), \
  &GetLineQlnNELayout)

# define GetLineCarrierGains(dev, applicationId, msgReq, msgRep) \
  hmiQA(dev, applicationId, \
  (uint8 *) msgReq, SIZE_OF_REQ_MSG(GetLineCarrierGains), \
  (uint8 *) msgRep, SIZE_OF_REP_MSG(GetLineCarrierGains), \
  &GetLineCarrierGainsLayout)

# define GetLineLinearTssi(dev, applicationId, msgReq, msgRep) \
  hmiQA(dev, applicationId, \
  (uint8 *) msgReq, SIZE_OF_REQ_MSG(GetLineLinearTssi), \
  (uint8 *) msgRep, SIZE_OF_REP_MSG(GetLineLinearTssi), \
  &GetLineLinearTssiLayout)

# define LineIntroduceErrors(dev, applicationId, msgReq) \
  hmiQA(dev, applicationId, \
  (uint8 *) msgReq, SIZE_OF_REQ_MSG(LineIntroduceErrors), \
  (uint8 *) 0, 0, \
  &LineIntroduceErrorsLayout)

# define LineGoToL2(dev, applicationId) \
  hmiQA(dev, applicationId, \
  (uint8 *) 0, 0, \
  (uint8 *) 0, 0, \
  &LineGoToL2Layout)

# define LineGoToL0(dev, applicationId) \
  hmiQA(dev, applicationId, \
  (uint8 *) 0, 0, \
  (uint8 *) 0, 0, \
  &LineGoToL0Layout)

# define LineL2PowerTrim(dev, applicationId, msgReq) \
  hmiQA(dev, applicationId, \
  (uint8 *) msgReq, SIZE_OF_REQ_MSG(LineL2PowerTrim), \
  (uint8 *) 0, 0, \
  &LineL2PowerTrimLayout)

# define LineTriggerOLR(dev, applicationId, msgReq) \
  hmiQA(dev, applicationId, \
  (uint8 *) msgReq, SIZE_OF_REQ_MSG(LineTriggerOLR), \
  (uint8 *) 0, 0, \
  &LineTriggerOLRLayout)

#endif
