forked from microsoft/TSS.MSR
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Logic.java
52 lines (43 loc) · 1.92 KB
/
Logic.java
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
package tss.tpm;
import tss.*;
import java.util.*;
// -----------This is an auto-generated file: do not edit
//>>>
/** Table 4 Defines for Logic Values */
public final class Logic extends TpmEnum<Logic>
{
/** Values from enum _N are only intended to be used in case labels of a switch statement
* using the result of this.asEnum() method as the switch condition. However, their Java
* names are identical to those of the constants defined in this class further below, so
* for any other usage just prepend them with the Logic. qualifier.
*/
public enum _N {
TRUE,
FALSE,
YES,
NO,
SET,
CLEAR
}
private static ValueMap<Logic> _ValueMap = new ValueMap<Logic>();
/** These definitions provide mapping of the Java enum constants to their TPM integer values */
public static final Logic
TRUE = new Logic(1, _N.TRUE),
FALSE = new Logic(0, _N.FALSE),
YES = new Logic(1, _N.YES),
NO = new Logic(0, _N.NO),
SET = new Logic(1, _N.SET),
CLEAR = new Logic(0, _N.CLEAR);
public Logic () { super(0, _ValueMap); }
public Logic (int value) { super(value, _ValueMap); }
public static Logic fromInt (int value) { return TpmEnum.fromInt(value, _ValueMap, Logic.class); }
public static Logic fromTpm (byte[] buf) { return TpmEnum.fromTpm(buf, _ValueMap, Logic.class); }
public static Logic fromTpm (TpmBuffer buf) { return TpmEnum.fromTpm(buf, _ValueMap, Logic.class); }
public Logic._N asEnum() { return (Logic._N)NameAsEnum; }
public static Collection<Logic> values() { return _ValueMap.values(); }
private Logic (int value, _N nameAsEnum) { super(value, nameAsEnum, _ValueMap); }
private Logic (int value, _N nameAsEnum, boolean noConvFromInt) { super(value, nameAsEnum, null); }
@Override
protected int wireSize() { return 1; }
}
//<<<