Pooja R Bhat,
Take a look at the Airtime Link Metric (ALM) implementation in the files:
src/mesh/dot11s/airtime-metric.h
src/mesh/dot11s/airtime-metric.cc
Here is defined a method to compute the ALM:
uint32_t AirtimeLinkMetricCalculator::CalculateMetric (Mac48Address peerAddress, Ptr<MeshWifiInterfaceMac> mac);
To get all togheter it is linked to the HWMP (using the proper callback) in the Install method:
//Installing airtime link metric:
Ptr<AirtimeLinkMetricCalculator> metric = CreateObject <AirtimeLinkMetricCalculator> ();
mac->SetLinkMetricCallback (MakeCallback (&AirtimeLinkMetricCalculator::CalculateMetric, metric));
In summary, you must to implement your metric computation according to the ALM (including a sort of CalculateMetric method) and link it to the HWMP.
I hope it helps you.
Regards,
Silvio Sampaio