Package it.hakvoort.bdf

Examples of it.hakvoort.bdf.BDFReader


*/
public class BDF2TCPExample implements BDFListener {
 
  public BDF2TCPExample() { 
    // create a BDFReader
    BDFReader reader = new BDFReader("data/bdf/example.bdf");
   
    // create and start a BDFNetworkServer
    BDFNetworkServer server = new BDFNetworkServer(reader, 4321);
    server.start();
   
    // wait a second
    try {
      Thread.sleep(1000);
    } catch (InterruptedException e) {
      e.printStackTrace();
    }
   
    // The number of channels which are send by the server and read by the client must be the same! If not, data will be incorrect.
    int channels = reader.getHeader().getNumChannels();

    // create a BDFNetworkClient
    BDFNetworkClient client = new BDFNetworkClient("localhost", 4321, channels);
    client.addListener(this);

View Full Code Here


public class JavaBDFReader implements BDFListener {

  private BDFReader bdfReader;
 
  public JavaBDFReader() {
    bdfReader = new BDFReader("data/bdf/example.bdf");
   
    bdfReader.setFrequency(1);
    bdfReader.setRepeat(true);
   
    bdfReader.addListener(this);
View Full Code Here

      PORT = Integer.parseInt(args[1]);
    }
   
    BDFFile bdf = BDFFile.open(pathname);
     
    BDFReader reader = bdf.getReader();
    reader.setRepeat(repeat);
    reader.setFrequency(frequency);
     
    BDFServer server = new BDFServer(reader, PORT);
    server.start();
  }
View Full Code Here

   
    // create a BDFFile
    BDFFile bdf = BDFFile.open("data/bdf/example.bdf");
   
    // get the bdf reader
    BDFReader reader = bdf.getReader();
   
    // set the reader to start at the beginning of the file when it reached the end
    reader.setRepeat(true);
   
    // create and start a BDFNetworkServer
    BDFServer server = new BDFServer(reader, 4321);
   
    // start the server
View Full Code Here

  public JavaBDFReaderExample() throws IOException, BDFException {
    // create a BDFFile
    BDFFile bdf = BDFFile.open("data/bdf/example.bdf");
   
    // get the bdf reader
    BDFReader reader = bdf.getReader();
   
    // register this class as listener on the reader
    reader.addListener(this);
   
    // start the reader
    reader.start();
  }
View Full Code Here

TOP

Related Classes of it.hakvoort.bdf.BDFReader

Copyright © 2018 www.massapicom. 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.