Examples of CanFrame


Examples of de.entropia.can.CanSocket.CanFrame

    private static void miscTests() throws IOException {
  final CanId id = new CanId(0x30001).setEFFSFF();
  try (final CanSocket s = new CanSocket(Mode.RAW)) {
      final CanInterface canif = new CanInterface(s, "slcan0");
      s.bind(canif);
      s.send(new CanFrame(canif, id, new byte[] {0,
    (byte) 0x91}));
      System.out.println(s.recv());
  }
    }
View Full Code Here

Examples of de.entropia.can.CanSocket.CanFrame

    @Test
    public void testSend() throws IOException {
        try (final CanSocket socket = new CanSocket(Mode.RAW)) {
            final CanInterface canif = new CanInterface(socket, CAN_INTERFACE);
            socket.bind(canif);
            socket.send(new CanFrame(canif,
                    new CanId(0x5), new byte[] {0,0,0,0,0,0,0,0}));
        }
    }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.