Changeset 42


Ignore:
Timestamp:
05/17/11 11:56:15 (13 years ago)
Author:
jhall
Message:
  • bugfix of LOWORD/HIWORD
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/EventBenchConsole/src/de/ugoe/cs/eventbench/EventGenerator.java

    r41 r42  
    400400                                        if( loword!=null ) { 
    401401                                                paramValue = loHiWord(genMsgChild); 
     402                                                generatedMessage.setLPARAM(paramValue); 
    402403                                        } else { 
    403404                                                try { 
     
    414415                                        if( loword!=null ) { 
    415416                                                paramValue = loHiWord(genMsgChild); 
     417                                                generatedMessage.setWPARAM(paramValue); 
    416418                                        } else { 
    417419                                                try { 
     
    727729                String lowordStr = getTermValue(null, (Element) loword.getChildren().get(0)); 
    728730                String hiwordStr = getTermValue(null, (Element) hiword.getChildren().get(0)); 
    729                 return LOWORD(Integer.parseInt(lowordStr))+HIWORD(Integer.parseInt(hiwordStr)); 
     731                return MAKEPARAM(Integer.parseInt(lowordStr), Integer.parseInt(hiwordStr)); 
    730732        } 
    731733         
    732         private static short LOWORD(long data) { 
    733                 return (short) (data & 0xffff); 
    734         } 
    735  
    736         private static short HIWORD(long data) { 
    737                 return (short) (data >> 16); 
     734        private static long MAKEPARAM(int loword, int hiword) { 
     735                return loword| ((long) hiword) << 32; 
    738736        } 
    739737 
Note: See TracChangeset for help on using the changeset viewer.