Redefined PinUsages; cleaned component JSONs
[Mograsim.git] / plugins / net.mograsim.logic.model / src / net / mograsim / logic / model / model / wires / PinUsage.java
1 package net.mograsim.logic.model.model.wires;
2
3 public enum PinUsage
4 {
5         /**
6          * The component never applies a value (other than Z) to the wire connected to the pin.
7          */
8         INPUT,
9         /**
10          * The component expects that the wire is never pulled to a value (other than Z) by another component.
11          */
12         OUTPUT,
13         /**
14          * The component is free to use the pin in any way.
15          */
16         TRISTATE;
17
18         private PinUsage opposite;
19
20         static
21         {
22                 INPUT.opposite = OUTPUT;
23                 OUTPUT.opposite = INPUT;
24                 TRISTATE.opposite = TRISTATE;
25         }
26
27         public PinUsage getOpposite()
28         {
29                 return opposite;
30         }
31 }