Object

net.psforever.packet

PacketHelpers

Related Doc: package packet

Permalink

object PacketHelpers

Source
PSPacket.scala
Linear Supertypes
AnyRef, Any
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. PacketHelpers
  2. AnyRef
  3. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. All

Value Members

  1. final def !=(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  2. final def ##(): Int

    Permalink
    Definition Classes
    AnyRef → Any
  3. final def ==(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  4. final def asInstanceOf[T0]: T0

    Permalink
    Definition Classes
    Any
  5. def clone(): AnyRef

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  6. def createEnumerationCodec[E <: Enumeration](enum: E, storageCodec: Codec[Int]): Codec[PacketHelpers.createEnumerationCodec.E.Value]

    Permalink

    Create a Codec for an enumeration type that can correctly represent its value

    Create a Codec for an enumeration type that can correctly represent its value

    E

    The inferred type

    enum

    the enumeration type to create a codec for

    storageCodec

    the Codec used for actually representing the value

    returns

    Generated codec

  7. def createLongEnumerationCodec[E <: Enumeration](enum: E, storageCodec: Codec[Long]): Codec[PacketHelpers.createLongEnumerationCodec.E.Value]

    Permalink

    Same as createEnumerationCodec but with a Codec type of Long

    Same as createEnumerationCodec but with a Codec type of Long

    NOTE: enumerations in scala can't be represented by more than an Int anyways, so this conversion shouldnt matter. This is only to overload createEnumerationCodec to work with uint32[L] codecs (which are Long)

  8. def emptyCodec[T](instance: T): Codec[T]

    Permalink

    Used in certain instances where Codec defintions are stubbed out

  9. def encodedString: Codec[String]

    Permalink

    Codec for how PlanetSide represents strings on the wire

  10. def encodedStringAligned(adjustment: Int): Codec[String]

    Permalink

    Same as encodedString but with a bit adjustment

    Same as encodedString but with a bit adjustment

    This comes in handy when a PlanetSide string is decoded on a non-byte boundary. The PlanetSide client will byte align after decoding the string lenght, but BEFORE the string itself. Scodec doesn't like this variability and there doesn't appear to be a way to fix this issue.

    adjustment

    The adjustment amount in bits

    returns

    Generated string decoding codec with adjustment

  11. def encodedStringSize: Codec[Int]

    Permalink

    Common codec for how PlanetSide stores string sizes

    Common codec for how PlanetSide stores string sizes

    When the first bit of the byte is set, the size can be between [0, 127]. Otherwise, it is between [128, 32767] and two bytes are used for encoding. The magic in this is next level (read as: SCodec makes things hard to understand)

  12. def encodedWideString: Codec[String]

    Permalink

    Common codec for PlanetSide wchar_t strings (wide strings, UTF-16)

    Common codec for PlanetSide wchar_t strings (wide strings, UTF-16)

    An encoded *wide* string is twice the length of the given encoded size and half of the length of the input string. We use xmap to transform the encodedString codec as this change is just a division and multiply

  13. def encodedWideStringAligned(adjustment: Int): Codec[String]

    Permalink

    Same as encodedWideString but with a bit alignment after the decoded size

  14. final def eq(arg0: AnyRef): Boolean

    Permalink
    Definition Classes
    AnyRef
  15. def equals(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  16. def finalize(): Unit

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  17. final def getClass(): Class[_]

    Permalink
    Definition Classes
    AnyRef → Any
  18. def hashCode(): Int

    Permalink
    Definition Classes
    AnyRef → Any
  19. final def isInstanceOf[T0]: Boolean

    Permalink
    Definition Classes
    Any
  20. def listOfNAligned[A](countCodec: Codec[Long], alignment: Int, valueCodec: Codec[A]): Codec[List[A]]

    Permalink

    Encode and decode a byte-aligned List.

    This function is copied almost verbatim from its source, with exception of swapping the normal ListCodec for a new AlignedListCodec.

    Encode and decode a byte-aligned List.

    This function is copied almost verbatim from its source, with exception of swapping the normal ListCodec for a new AlignedListCodec.

    A

    the type of the List contents

    countCodec

    the codec that represents the prefixed size of the List

    alignment

    the number of bits padded between the List size and the List contents

    valueCodec

    a codec that describes each of the contents of the List

    returns

    a codec that works on a List of A

    See also

    codec\package.scala, listOfN

  21. def listOfNSized[A](size: Long, codec: Codec[A]): Codec[List[A]]

    Permalink

    Codec that encodes/decodes a list of n elements, where n is known at compile time.

    This function is copied almost verbatim from its source, with exception of swapping the parameter that is normally a Nat literal.

    Codec that encodes/decodes a list of n elements, where n is known at compile time.

    This function is copied almost verbatim from its source, with exception of swapping the parameter that is normally a Nat literal. The modified function takes a normal unsigned Integer and assures that the parameter is non-negative before further processing.

    A

    the type of the List contents

    size

    the known size of the List

    codec

    a codec that describes each of the contents of the List

    returns

    a codec that works on a List of A but excludes the size from the encoding

    See also

    codec\package.scala, provides

    codec\package.scala, listOfN

    codec\package.scala, sizedList

  22. final def ne(arg0: AnyRef): Boolean

    Permalink
    Definition Classes
    AnyRef
  23. final def notify(): Unit

    Permalink
    Definition Classes
    AnyRef
  24. final def notifyAll(): Unit

    Permalink
    Definition Classes
    AnyRef
  25. def peek[A](target: Codec[A]): Codec[A]

    Permalink

    A peek that decodes like the normal but encodes nothing.

    A peek that decodes like the normal but encodes nothing. Decoding Codec[A] from the input vector emits a value but reverts to the prior read position. Encoding Codec[A] to the input vector appends no new data to the input vector. In effect, peek is a harmless meta-Codec that processes a value and introduces no changes to the input/output vector.

    target

    codec that decodes the value

    returns

    Codec that behaves the same as target but resets the contents of the vector as if Codec were never applied

    See also

    scodec.codecs.peek or codecs/package.scala:peek

  26. final def synchronized[T0](arg0: ⇒ T0): T0

    Permalink
    Definition Classes
    AnyRef
  27. def toString(): String

    Permalink
    Definition Classes
    AnyRef → Any
  28. val utf16: Codec[String]

    Permalink

    Variable for the charset that PlanetSide uses for unicode (2 byte unicode)

  29. final def wait(): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  30. final def wait(arg0: Long, arg1: Int): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  31. final def wait(arg0: Long): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )

Inherited from AnyRef

Inherited from Any

Ungrouped