• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 /*
2  * Copyright (c) 2020-2021 Huawei Device Co., Ltd.
3  *
4  * HDF is dual licensed: you can use it either under the terms of
5  * the GPL, or the BSD license, at your option.
6  * See the LICENSE file in the root of this repository for complete details.
7  */
8 
9 #ifndef HC_GEN_OPCODE_H
10 #define HC_GEN_OPCODE_H
11 
12 #include <cstdint>
13 
14 namespace OHOS {
15 namespace Hardware {
16 constexpr uint32_t HCB_MAGIC_NUM = 0xA00AA00A;
17 
18 enum OpCodeType {
19     HCS_NODE_OP = 0x01,
20     HCS_TERM_OP = 0x02,
21     HCS_NODEREF_OP = 0x03,
22     HCS_ARRAY_OP = 0x04,
23     HCS_BYTE_OP = 0x10,
24     HCS_WORD_OP = 0x11,
25     HCS_DWORD_OP = 0x12,
26     HCS_QWORD_OP = 0x13,
27     HCS_STRING_OP = 0x14,
28 };
29 
30 struct HcbHeader {
31     uint32_t magicNumber;
32     uint32_t versionMajor;
33     uint32_t versionMinor;
34     uint32_t checkSum;
35     int32_t totalSize;
36 };
37 } // namespace Hardware
38 } // namespace OHOS
39 
40 #endif // HC_GEN_OPCODE_H