i think u can refer to API MPMS code for more knowledge about metering.