public CanProt(){
  for (int i=0; i < getMsgParameters().length; i++) {
    int convId=getMsgParameters()[i][FLD_ID_CONV];
    Integer paramId=Integer.valueOf(i);
    Integer canId=getMsgParameters()[i][FLD_ID_CANID];
    Vector<Integer> paramList=canMsgMap.get(canId);
    if (paramList == null)     paramList=new Vector<Integer>();
    paramList.add(paramId);
    canMsgMap.put(canId,paramList);
    EcuDataPv pidData=new EcuDataPv();
    pidData.put(EcuDataPv.FID_PID,paramId);
    pidData.put(EcuDataPv.FID_DESCRIPT,getMsgDescriptors()[i]);
    pidData.put(EcuDataPv.FID_UNITS,Conversions.getUnits(convId));
    pidData.put(EcuDataPv.FID_VALUE,Float.valueOf(0));
    pidData.put(EcuDataPv.FID_FORMAT,"%." + getMsgParameters()[i][FLD_ID_DECIMALS] + "d");
    pidData.put(EcuDataPv.FID_CNVID,Integer.valueOf(getMsgParameters()[i][FLD_ID_CONV]));
    CanPvs.put(paramId,pidData);
  }
}

public CanProt ( ) { for ( int i = 0 ; i < getMsgParameters ( ) . length ; i ++ ) { int convId = getMsgParameters ( ) [ i ] [ FLD_ID_CONV ] ; Integer paramId = Integer . valueOf ( i ) ; Integer canId = getMsgParameters ( ) [ i ] [ FLD_ID_CANID ] ; Vector < Integer > paramList = canMsgMap . get ( canId ) ; if ( paramList == null ) paramList = new Vector < Integer > ( ) ; paramList . add ( paramId ) ; canMsgMap . put ( canId , paramList ) ; EcuDataPv pidData = new EcuDataPv ( ) ; pidData . put ( EcuDataPv . FID_PID , paramId ) ; pidData . put ( EcuDataPv . FID_DESCRIPT , getMsgDescriptors ( ) [ i ] ) ; pidData . put ( EcuDataPv . FID_UNITS , Conversions . getUnits ( convId ) ) ; pidData . put ( EcuDataPv . FID_VALUE , Float . valueOf ( 0 ) ) ; pidData . put ( EcuDataPv . FID_FORMAT , "%." + getMsgParameters ( ) [ i ] [ FLD_ID_DECIMALS ] + "d" ) ; pidData . put ( EcuDataPv . FID_CNVID , Integer . valueOf ( getMsgParameters ( ) [ i ] [ FLD_ID_CONV ] ) ) ; CanPvs . put ( paramId , pidData ) ; } }
creates a new instance of canprot
