Total Status

Avatar

sdg.marinusvz
2023-07-12 09:53

Concerning the status column of the Totals, it essentially do one digit for every one of the 6 registers.


Here are some code excerpts to explain:


  //define the indexes for the TOTAL functions for different registers

  public static final int TOT_E1 = 0; //E1 normal energy

  public static final int TOT_F1 = 1; //F1 lagging vars

  public static final int TOT_E2 = 2; //E2 reverse energy

  public static final int TOT_F3 = 3; //F3

  public static final int TOT_F2 = 4; //F2

  public static final int TOT_F4 = 5; //F4


  //define primitives for the values of totals. Please note, that this is

  //multiplied by 10^(total constant), e.g.

  //3 for F1 becomes 3*10^TOT_F1 = 3*10^1 = 30.

  //The status for the row is the sum of the status for all totals columns.

  public static final int TOT_ST_CALCULATED_IN_ISOLATION = 1;

  public static final int TOT_ST_CALCULATED_FROM_METER_READING = 2;

  public static final int TOT_ST_READ_FROM_METER = 3;

  public static final int TOT_ST_ESTIMATED_FOR_BILL = 4;

  public static final int TOT_ST_READ_FROM_METER_RT = 5;

  public static final int TOT_ST_CALCULATED_FROM_MANUAL_ENTRY = 8;

  public static final int TOT_ST_MANUAL_ENTRY = 9;

Please log in to post a comment