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); } }
public BufferEvent(string type, short[] value, int sample) { wType = new WrappedObject(type); wValue = new WrappedObject(value); this.sample = sample; offset = duration = 0; }
//--- Arrays ---------- public BufferEvent(string type, string[] value, int sample) { wType = new WrappedObject(type); wValue = new WrappedObject(value); this.Sample = sample; Offset = Duration = 0; }
public BufferEvent(string type, float value, int sample) { wType = new WrappedObject(type); wValue = new WrappedObject(value); this.sample = sample; offset = duration = 0; }
public BufferEvent() { wType = new WrappedObject(); wValue = new WrappedObject(); sample = -1; offset = 0; duration = 0; }
public BufferEvent() { wType = new WrappedObject(); wValue = new WrappedObject(); sample = -1; offset = 0; duration = 0; }
public BufferEvent() { wType = new WrappedObject(); wValue = new WrappedObject(); Sample = -1; Offset = 0; Duration = 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); }
public bool setValue(object valueObj) { wValue = new WrappedObject(valueObj); return(wValue.type != DataType.UNKNOWN); }
public bool setType(object typeObj) { wType = new WrappedObject(typeObj); return(wType.type != DataType.UNKNOWN); }
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; }
public bool setValue(object valueObj) { wValue = new WrappedObject(valueObj); return wValue.type != DataType.UNKNOWN; }
public bool setType(object typeObj) { wType = new WrappedObject(typeObj); return wType.type != DataType.UNKNOWN; }
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); } }
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; } }