pamoja for TypeScript - v0.2.0
    Preparing search index...

    Class CommandPart

    A part that is not there, answering commands with the replies it was given.

    A write sends a command and any arguments after it; a read then takes the reply that command left, once, padded with 0xFF the way an idle bus reads. A command given no reply leaves none, and a read then is not acknowledged, which is what a real part does when asked for data it does not have.

    Index
    • A part answering at one address that has been given no replies yet; a command takes width bytes, two unless given.

      Parameters

      • address: number
      • Optionalwidth: number | null

      Returns CommandPart

    • get received(): Buffer<ArrayBufferLike>[]

      Every write the part has received, oldest first: a command and any arguments after it.

      Returns Buffer<ArrayBufferLike>[]

    • get transfers(): number

      How many transfers the part has served.

      Returns number

    • Answers one command with a reply from now on, in place of any reply given before.

      Parameters

      • command: Buffer
      • reply: Buffer

      Returns void