See <ComponentProps>
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;
senders
(optional, default[]
)<Array<number>>
operationType
(optional, default0
)<LogicOperator>
isInversedOutputSaved
(optional, defaultfalse
)<boolean>
Creates a versioned LogicGateReceiver
component.
props
<ComponentProps & LogicGateReceiverComponentProps>
Configuration of the component to create.- Returns:
<LogicGateReceiverComponent>
import { LogicGateReceiverComponent } from 'att-string-transcoder';
const componentVersion = 2;
const component = new LogicGateReceiverComponent({ version: componentVersion });
See Component.fromBinary(reader, version)
Note that the following properties are sorted in order of appearance when decoding component binary data.
See Component.hash
See Component.name
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 `[]`
The type of operation to perform on the received inputs.
- Since:
v2
<LogicOperator>
import { LogicGateReceiverComponent } from 'att-string-transcoder';
const componentVersion = 2;
const component = new LogicGateReceiverComponent({ version: componentVersion });
const operationType = component.operationType;
// `operationType` is `0` (AND)
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`
See Component.toBinary(version?)