Skip to content

Latest commit

 

History

History
157 lines (100 loc) · 3.75 KB

LogicGateReceiverComponent.md

File metadata and controls

157 lines (100 loc) · 3.75 KB

Class: LogicGateReceiverComponent

Types

<ComponentProps>

See <ComponentProps>


<LogicGateReceiverComponentProps>

A portion of the configuration object to pass to the LogicGateReceiverComponent constructor.

type LogicGateReceiverComponentPropsV2 = {
  senders?: number[] | undefined;
  operationType?: LogicOperator | undefined;
  isInversedOutputSaved?: boolean | undefined;
};

type LogicGateReceiverComponentProps = LogicGateReceiverComponentPropsV2;

Since v2

  • senders (optional, default []) <Array<number>>
  • operationType (optional, default 0) <LogicOperator>
  • isInversedOutputSaved (optional, default false) <boolean>

Constructors

new LogicGateReceiverComponent(props)

Creates a versioned LogicGateReceiver component.

import { LogicGateReceiverComponent } from 'att-string-transcoder';

const componentVersion = 2;
const component = new LogicGateReceiverComponent({ version: componentVersion });

LogicGateReceiverComponent.fromBinary(reader, version)

See Component.fromBinary(reader, version)

Properties

Note that the following properties are sorted in order of appearance when decoding component binary data.

hash

See Component.hash


name

See Component.name


version

See Component.version


senders

The identifiers of the Logic*Sender components that are connected to this LogicGateReceiver.

  • Since: v2
  • <Array<number>>
import { LogicGateReceiverComponent } from 'att-string-transcoder';

const componentVersion = 2;
const component = new LogicGateReceiverComponent({ version: componentVersion });

const senders = component.senders;
// `senders` is `[]`

operationType

The type of operation to perform on the received inputs.

import { LogicGateReceiverComponent } from 'att-string-transcoder';

const componentVersion = 2;
const component = new LogicGateReceiverComponent({ version: componentVersion });

const operationType = component.operationType;
// `operationType` is `0` (AND)

isInversedOutputSaved

Whether to inverse the output of this gate.

  • Since: v2
  • <boolean>
import { LogicGateReceiverComponent } from 'att-string-transcoder';

const componentVersion = 2;
const component = new LogicGateReceiverComponent({ version: componentVersion });

const isInversedOutputSaved = component.isInversedOutputSaved;
// `isInversedOutputSaved` is `false`

Methods

toBinary(version?)

See Component.toBinary(version?)


write(writer, version?)

See Component.write(writer, version?)