Ejemplo n.º 1
0
        public BufferEvent(ByteBuffer buf)
        {
            wType  = new WrappedObject();
            wValue = new WrappedObject();

            wType.type   = buf.getInt();
            wType.numel  = buf.getInt();
            wValue.type  = buf.getInt();
            wValue.numel = buf.getInt();
            sample       = buf.getInt();
            offset       = buf.getInt();
            duration     = buf.getInt();
            int size = buf.getInt();

            wType.array = DataType.getObject(wType.type, wType.numel, buf);
            if (wType.array != null)
            {
                wType.size = wType.numel * DataType.wordSize[wType.type];
            }

            wValue.array = DataType.getObject(wValue.type, wValue.numel, buf);
            if (wValue.array != null)
            {
                wValue.size = wValue.numel * DataType.wordSize[wValue.type];
            }

            size -= wType.size + wValue.size;
            if (size != 0)
            {
                buf.position(buf.position() + size);
            }
        }
Ejemplo n.º 2
0
 public BufferEvent(string type, short[] value, int sample)
 {
     wType       = new WrappedObject(type);
     wValue      = new WrappedObject(value);
     this.sample = sample;
     offset      = duration = 0;
 }
Ejemplo n.º 3
0
 //--- Arrays ----------
 public BufferEvent(string type, string[] value, int sample)
 {
     wType = new WrappedObject(type);
     wValue = new WrappedObject(value);
     this.Sample = sample;
     Offset = Duration = 0;
 }
Ejemplo n.º 4
0
 public BufferEvent(string type, float value, int sample)
 {
     wType  = new WrappedObject(type);
     wValue = new WrappedObject(value);
     this.sample = sample;
     offset = duration = 0;
 }
Ejemplo n.º 5
0
 public BufferEvent()
 {
     wType    = new WrappedObject();
     wValue   = new WrappedObject();
     sample   = -1;
     offset   = 0;
     duration = 0;
 }
Ejemplo n.º 6
0
 public BufferEvent()
 {
     wType  = new WrappedObject();
     wValue = new WrappedObject();
     sample     = -1;
     offset     = 0;
     duration   = 0;
 }
Ejemplo n.º 7
0
 public BufferEvent()
 {
     wType = new WrappedObject();
     wValue = new WrappedObject();
     Sample = -1;
     Offset = 0;
     Duration = 0;
 }
Ejemplo n.º 8
0
 public bool setValueUnsigned(byte[] array)
 {
     wValue       = new WrappedObject();
     wValue.array = array.Clone();
     wValue.numel = array.Length;
     wValue.size  = array.Length;
     wValue.type  = DataType.UINT8;
     return(true);
 }
Ejemplo n.º 9
0
 public bool setValue(object valueObj)
 {
     wValue = new WrappedObject(valueObj);
     return(wValue.type != DataType.UNKNOWN);
 }
Ejemplo n.º 10
0
 public bool setType(object typeObj)
 {
     wType = new WrappedObject(typeObj);
     return(wType.type != DataType.UNKNOWN);
 }
Ejemplo n.º 11
0
 public bool setValueUnsigned(byte[] array)
 {
     wValue = new WrappedObject();
     wValue.array = array.Clone();
     wValue.numel = array.Length;
     wValue.size  = array.Length;
     wValue.type  = DataType.UINT8;
     return true;
 }
Ejemplo n.º 12
0
 public bool setValue(object valueObj)
 {
     wValue = new WrappedObject(valueObj);
     return wValue.type != DataType.UNKNOWN;
 }
Ejemplo n.º 13
0
 public bool setType(object typeObj)
 {
     wType = new WrappedObject(typeObj);
     return wType.type != DataType.UNKNOWN;
 }
Ejemplo n.º 14
0
        public BufferEvent(ByteBuffer buf)
        {
            wType  = new WrappedObject();
            wValue = new WrappedObject();

            wType.type   = buf.getInt();
            wType.numel  = buf.getInt();
            wValue.type  = buf.getInt();
            wValue.numel = buf.getInt();
            sample       = buf.getInt();
            offset       = buf.getInt();
            duration     = buf.getInt();
            int size = buf.getInt();

            wType.array  = DataType.getObject(wType.type, wType.numel, buf);
            if (wType.array != null) {
                wType.size = wType.numel * DataType.wordSize[wType.type];
            }

            wValue.array = DataType.getObject(wValue.type, wValue.numel, buf);
            if (wValue.array != null) {
                wValue.size = wValue.numel * DataType.wordSize[wValue.type];
            }

            size -= wType.size + wValue.size;
            if (size != 0) {
                buf.position(buf.position() + size);
            }
        }
Ejemplo n.º 15
0
        public BufferEvent(ByteBuffer buf)
        {
            wType = new WrappedObject();
            wValue = new WrappedObject();

            wType.Type = buf.GetInt();
            wType.Numel = buf.GetInt();
            wValue.Type = buf.GetInt();
            wValue.Numel = buf.GetInt();
            Sample = buf.GetInt();
            Offset = buf.GetInt();
            Duration = buf.GetInt();
            int size = buf.GetInt();

            wType.Array = DataType.GetObject(wType.Type, wType.Numel, buf);
            if (wType.Array != null) {
                wType.Size = wType.Numel * DataType.wordSize[wType.Type];
            }

            wValue.Array = DataType.GetObject(wValue.Type, wValue.Numel, buf);
            if (wValue.Array != null) {
                wValue.Size = wValue.Numel * DataType.wordSize[wValue.Type];
            }

            size -= wType.Size + wValue.Size;
            if (size != 0) {
                buf.Position = buf.Position + size;
            }
        }