object StreamUnpacker
- Alphabetic
- By Inheritance
- StreamUnpacker
- AnyRef
- Any
- Hide All
- Show All
- Public
- Protected
Value Members
- final def !=(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
- final def ##: Int
- Definition Classes
- AnyRef → Any
- final def ==(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
- def apply[T <: Data, B <: PackedBundle](input: Stream[T], packedbundle: B): StreamUnpacker[T]
Unpacks a Stream into a given PackedBundle The StreamUnpacker will read as many words from
input
as necessary to unpack all fields.Unpacks a Stream into a given PackedBundle The StreamUnpacker will read as many words from
input
as necessary to unpack all fields. Fields that exceed a word width will be wrapped into as many subsequent words needed.- T
Stream Data type
- B
PackedBundle type
- input
Stream to read from
- packedbundle
PackedBundle to unpack into
- returns
Unpacker instance
- def apply[T <: Data](input: Stream[T], layout: List[(Data, Int)]): StreamUnpacker[T]
Unpacks a Stream given a layout of Data fields.
Unpacks a Stream given a layout of Data fields. Field layout is accepted as pairs of Data and their start bits. Starting bits are interpreted as absolute bit positions within a multi-word layout. The StreamUnpacker will read as many words from
input
as necessary to unpack all fields. Fields that exceed a word width will be wrapped into as many subsequent words needed.- T
Stream Data type
- input
Stream to read from
- layout
List of Data fields and their start bits
- returns
Unpacker instance
- final def asInstanceOf[T0]: T0
- Definition Classes
- Any
- def clone(): AnyRef
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.CloneNotSupportedException]) @native() @HotSpotIntrinsicCandidate()
- def decomposeField(field: Data, startBit: Int, wordWidth: Int): Map[Int, (Range, Range)]
Decomposes a Data field into a map of words to Word-relative range -> Field-relative range.
Decomposes a Data field into a map of words to Word-relative range -> Field-relative range. The starting bit is any absolute position within some set of words,
For example, a word with 16 bits starting at bit 4 decomposed into 8 bit words would result in: { 0 -> ((4 to 7) -> (0 to 3)), 1 -> ((0 to 7) -> (4 to 11)), 2 -> ((0 to 3) -> (12 to 15)) }
- field
Data to decompose
- startBit
Bit to start at, as absolute position (may be greater than
wordWidth
)- wordWidth
Word width to decompose into it
- returns
Map of word index to Word-relative range -> Field-relative range
- final def eq(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
- def equals(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef → Any
- final def getClass(): Class[_ <: AnyRef]
- Definition Classes
- AnyRef → Any
- Annotations
- @native() @HotSpotIntrinsicCandidate()
- def hashCode(): Int
- Definition Classes
- AnyRef → Any
- Annotations
- @native() @HotSpotIntrinsicCandidate()
- final def isInstanceOf[T0]: Boolean
- Definition Classes
- Any
- def layoutToWordMap(wordWidth: Int, layout: List[(Data, Int)]): LinkedHashMap[Data, Map[Int, (Range, Range)]]
Converts a layout of Data and starting bit pairs into a map of word range to Data range slices for each word that the Data spans, indexed by each Data.
Converts a layout of Data and starting bit pairs into a map of word range to Data range slices for each word that the Data spans, indexed by each Data. The return type is a 2D map relating each Data to each word index. The range pairs for each word index represent which bits of the word (local to the width of the word) map to the bits of Data that lie within the word.
- wordWidth
Width of the Stream's words
- layout
List of Data to starting bit pairs
- returns
Map of Data, Map of word index to word range, Data range pair
- final def ne(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
- final def notify(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native() @HotSpotIntrinsicCandidate()
- final def notifyAll(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native() @HotSpotIntrinsicCandidate()
- final def synchronized[T0](arg0: => T0): T0
- Definition Classes
- AnyRef
- def toString(): String
- Definition Classes
- AnyRef → Any
- final def wait(arg0: Long, arg1: Int): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException])
- final def wait(arg0: Long): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException]) @native()
- final def wait(): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException])
Deprecated Value Members
- def finalize(): Unit
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.Throwable]) @Deprecated
- Deprecated