Changeset 144


Ignore:
Timestamp:
09/20/2008 12:37:40 PM (5 years ago)
Author:
kascade
Message:

add j2534 support

Location:
trunk/src/com/romraider/io/j2534
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/com/romraider/io/j2534/api/J2534.java

    r143 r144  
    1818    void writeMsg(int channelId, byte[] data); 
    1919 
    20     // FIX - Needs to return msg type, etc. Create Response object. 
    2120    byte[] readMsg(int channelId); 
    2221 
  • trunk/src/com/romraider/io/j2534/api/TestJ2534.java

    r143 r144  
    77import static com.romraider.io.j2534.op20.OpenPort20.FLAG_NONE; 
    88import static com.romraider.io.j2534.op20.OpenPort20.PROTOCOL_ISO9141; 
     9import com.romraider.util.HexUtil; 
    910 
    1011public final class TestJ2534 { 
     
    2728 
    2829                    byte[] ecuInit = {(byte) 0x80, (byte) 0x10, (byte) 0xF0, (byte) 0x01, (byte) 0xBF}; 
     30 
    2931                    api.writeMsg(channelId, ecuInit); 
     32                    byte[] response = api.readMsg(channelId); 
     33 
     34                    System.out.println("Request  = " + HexUtil.asHex(ecuInit)); 
     35                    System.out.println("Response = " + HexUtil.asHex(response)); 
    3036 
    3137                } finally { 
  • trunk/src/com/romraider/io/j2534/op20/J2534OpenPort20.java

    r143 r144  
    8989    } 
    9090 
     91    // FIX - Needs to check msg type and retry until msg received 
    9192    public byte[] readMsg(int channelId) { 
    9293        PassThruMessage msg = passThruMessage(); 
Note: See TracChangeset for help on using the changeset viewer.