Skip to content
Snippets Groups Projects
Select Git revision
  • labcomm2014
  • labcomm2006
  • master default
  • python_sig_hash
  • typedefs
  • anders.blomdell
  • typeref
  • pragma
  • compiler-refactoring
  • labcomm2013
  • v2014.6
  • v2015.0
  • v2014.5
  • v2014.4
  • v2006.0
  • v2014.3
  • v2014.2
  • v2014.1
  • v2014.0
  • v2013.0
20 results

labcomm_memory.c

Blame
  • StaticEncoder.java NaN GiB
    package test;
    import java.io.File;
    import java.io.FileOutputStream;
    import java.io.OutputStream;
    import se.lth.control.labcomm.EncoderChannel;
    
    import gen.foo;
    import gen.bar;
    
    public class StaticEncoder {
    
      EncoderChannel encoder;
    
      public StaticEncoder(OutputStream out) 
        throws Exception 
      {
        encoder = new EncoderChannel(out);
        foo.register(encoder);
        bar.register(encoder);
      }
    
      public void doEncode() throws java.io.IOException {
        foo f = new foo();
        f.x = 17;
        f.y = 42;
        f.z = 37;
    
        int b = 13;
    
        System.out.println("Encoding foo, x="+f.x+", y="+f.y+", z="+f.z);
        foo.encode(encoder, f);
    
        System.out.println("Encoding bar: "+b);
        bar.encode(encoder, b);
      }
    
      public static void main(String[] arg) throws Exception {
        FileOutputStream fos = new FileOutputStream(arg[0]);
        StaticEncoder enc = new StaticEncoder(fos);
        enc.doEncode();
        fos.close();
      }
    }