forked from microsoft/TSS.MSR
-
Notifications
You must be signed in to change notification settings - Fork 0
/
GetCapabilityResponse.java
93 lines (76 loc) · 2.9 KB
/
GetCapabilityResponse.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
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
package tss.tpm;
import tss.*;
// -----------This is an auto-generated file: do not edit
//>>>
/** This command returns various information regarding the TPM and its current state. */
public class GetCapabilityResponse extends RespStructure
{
/** Flag to indicate if there are more values of this type */
public byte moreData;
/** The capability */
public TPM_CAP capabilityDataCapability() { return capabilityData.GetUnionSelector(); }
/** The capability data
* One of: TPML_ALG_PROPERTY, TPML_HANDLE, TPML_CCA, TPML_CC, TPML_PCR_SELECTION,
* TPML_TAGGED_TPM_PROPERTY, TPML_TAGGED_PCR_PROPERTY, TPML_ECC_CURVE,
* TPML_TAGGED_POLICY, TPML_ACT_DATA.
*/
public TPMU_CAPABILITIES capabilityData;
public GetCapabilityResponse() {}
/** TpmMarshaller method */
@Override
public void toTpm(TpmBuffer buf)
{
buf.writeByte(moreData);
buf.writeInt(capabilityData.GetUnionSelector());
capabilityData.toTpm(buf);
}
/** TpmMarshaller method */
@Override
public void initFromTpm(TpmBuffer buf)
{
moreData = buf.readByte();
TPM_CAP capabilityDataCapability = TPM_CAP.fromTpm(buf);
capabilityData = UnionFactory.create("TPMU_CAPABILITIES", capabilityDataCapability);
capabilityData.initFromTpm(buf);
}
/** @deprecated Use {@link #toBytes()} instead
* @return Wire (marshaled) representation of this object
*/
public byte[] toTpm () { return toBytes(); }
/** Static marshaling helper
* @param byteBuf Wire representation of the object
* @return New object constructed from its wire representation
*/
public static GetCapabilityResponse fromBytes (byte[] byteBuf)
{
return new TpmBuffer(byteBuf).createObj(GetCapabilityResponse.class);
}
/** @deprecated Use {@link #fromBytes(byte[])} instead
* @param byteBuf Wire representation of the object
* @return New object constructed from its wire representation
*/
public static GetCapabilityResponse fromTpm (byte[] byteBuf) { return fromBytes(byteBuf); }
/** Static marshaling helper
* @param buf Wire representation of the object
* @return New object constructed from its wire representation
*/
public static GetCapabilityResponse fromTpm (TpmBuffer buf)
{
return buf.createObj(GetCapabilityResponse.class);
}
@Override
public String toString()
{
TpmStructurePrinter _p = new TpmStructurePrinter("GetCapabilityResponse");
toStringInternal(_p, 1);
_p.endStruct();
return _p.toString();
}
@Override
public void toStringInternal(TpmStructurePrinter _p, int d)
{
_p.add(d, "byte", "moreData", moreData);
_p.add(d, "TPMU_CAPABILITIES", "capabilityData", capabilityData);
}
}
//<<<