Example #1
0
class ProjectConfig(TlvModel):
    project_id = BytesField(0x80)
    description = BytesField(0x90)
    inherit_from = BytesField(0x91)
    sync_interval = UintField(0x92)
    ref_configs = RepeatedField(ModelField(0x93, RefConfig))
    labels = RepeatedField(ModelField(0x94, LabelConfig))
Example #2
0
 class Model(TlvModel):
     name = NameField()
     int_val = UintField(0x03)
     bytes_val = BytesField(0x02)
     bool_val = BoolField(0x01)
     array = ModelField(0x05, WordArray)
     flag_val = UintField(0x06, val_base_type=FlagVal)
     enum_arr = RepeatedField(UintField(0x07, val_base_type=EnumVal))
     str_val = BytesField(0x08, is_string=True)
     str_arr = RepeatedField(BytesField(0x09, is_string=True))
Example #3
0
class NotifyAppParam(TlvModel):
    """
    Used to serialize application parameters for PubSub notify interest.
    """
    publisher_prefix = NameField()
    notify_nonce = BytesField(128)
    publisher_fwd_hint = ModelField(211, ForwardingHint)
class RepoCommandResponse(TlvModel):
    name = NameField()
    start_block_id = UintField(RepoTypeNumber.START_BLOCK_ID)
    end_block_id = UintField(RepoTypeNumber.END_BLOCK_ID)
    process_id = BytesField(RepoTypeNumber.PROCESS_ID)
    status_code = UintField(RepoTypeNumber.STATUS_CODE)
    insert_num = UintField(RepoTypeNumber.INSERT_NUM)
    delete_num = UintField(RepoTypeNumber.DELETE_NUM)
class RepoCommandParameter(TlvModel):
    name = NameField()
    forwarding_hint = ModelField(RepoTypeNumber.FORWARDING_HINT,
                                 ForwardingHint)
    start_block_id = UintField(RepoTypeNumber.START_BLOCK_ID)
    end_block_id = UintField(RepoTypeNumber.END_BLOCK_ID)
    process_id = BytesField(RepoTypeNumber.PROCESS_ID)
    register_prefix = ModelField(RepoTypeNumber.REGISTER_PREFIX,
                                 RegisterPrefix)
    check_prefix = ModelField(RepoTypeNumber.CHECK_PREFIX, CheckPrefix)
Example #6
0
class Comment(TlvModel):
    comment_id = BytesField(0x87)
    filename = BytesField(0xa8)
    line_nbr = UintField(0xa9)
    author = BytesField(0xaa)
    written_on = BytesField(0xab)
    message = BytesField(0xac)
    rev_id = BytesField(0xad)
    unsolved = BoolField(0xae)
Example #7
0
class AccessItem(TlvModel):
    prefix = BytesField(1)
    type = UintField(2)
    encryption_key = BytesField(3)
    decryption_key = BytesField(4)
Example #8
0
class ServiceItem(TlvModel):
    service_id = UintField(1)
    service_name = BytesField(2)
    exp_time = UintField(3)
Example #9
0
class KeyRevocation(TlvModel):
    key_id = BytesField(0x83)
    revoke_time = BytesField(0xa4)
Example #10
0
class PolicyAddRequest(TlvModel):
    data_name = BytesField(TLV_POLICY_DATA_STR)
    key_name = BytesField(TLV_POLICY_KEY_STR)
Example #11
0
class CertRequest(TlvModel):
    identifier = BytesField(TypeNumber.GENERIC_NAME_COMPONENT)
    ecdh_n2 = BytesField(TLV_AC_ECDH_PUB_N2)
    anchor_digest = BytesField(TLV_SEC_BOOT_ANCHOR_DIGEST)
    ecdh_n1 = BytesField(TLV_AC_ECDH_PUB_N1)
    capabilities = BytesField(TLV_SSP_DEVICE_CAPABILITIES)
Example #12
0
class SignOnRequest(TlvModel):
    identifier = BytesField(TypeNumber.GENERIC_NAME_COMPONENT)
    capabilities = BytesField(TLV_SEC_BOOT_CAPABILITIES)
    ecdh_n1 = BytesField(TLV_AC_ECDH_PUB_N1)
Example #13
0
class Catalog(TlvModel):
    entries = RepeatedField(BytesField(0xaf))
Example #14
0
class ChangeMeta(TlvModel):
    change_id = BytesField(0x85)
    status = UintField(0xa6)
    patch_set = UintField(0x86)
    subject = BytesField(0xa7)
Example #15
0
class Vote(TlvModel):
    label = BytesField(0x98)
    value = UintField(0xa0, fixed_len=1)
Example #16
0
class HeadRef(TlvModel):
    head = BytesField(0x84)
    change_id = BytesField(0x85)
    change_id_meta_commit = BytesField(0xa5)
Example #17
0
class GroupConfig(TlvModel):
    group_id = BytesField(0x82)
    full_name = BytesField(0xa2)
    owner = BytesField(0xa3)
    members = RepeatedField(BytesField(0xa4))
Example #18
0
class OperationRule(TlvModel):
    operation = UintField(0x9c)
    access = UintField(0x9d)
    user_id = BytesField(0x81)
    group_id = BytesField(0x82)
Example #19
0
class DeviceItem(TlvModel):
    device_id = BytesField(1)
    device_info = BytesField(2)
    device_cert_name = BytesField(3)
Example #20
0
class LabelConfig(TlvModel):
    label = BytesField(0x98)
    function = UintField(0x99)
    default_value = UintField(0x9a)
    values = RepeatedField(ModelField(0x9b, LabelValue))
Example #21
0
class SharedSecretsItem(TlvModel):
    device_identifier = BytesField(1)
    public_key = BytesField(2)
    symmetric_key = BytesField(3)
Example #22
0
class DatainfoTlvModel(TlvModel):
    data_name = BytesField(0x02)  # string
    hash = BytesField(0x02)  # string
    desired_copies = UintField(0x03)  # int
Example #23
0
class SignOnResponse(TlvModel):
    anchor = BytesField(TypeNumber.DATA)
    ecdh_n2 = BytesField(TLV_AC_ECDH_PUB_N2)
    salt = BytesField(TLV_AC_SALT)
Example #24
0
class LabelValue(TlvModel):
    value = UintField(0xa0, fixed_len=1)
    description = BytesField(0xa1)
Example #25
0
class CertResponse(TlvModel):
    id_cert = BytesField(TypeNumber.DATA)
    iv = BytesField(TLV_AC_AES_IV)
    cipher = BytesField(TLV_AC_ENCRYPTED_PAYLOAD)
Example #26
0
class DeviceItem(TlvModel):
    device_id = BytesField(1)
    device_info = BytesField(2)
    aes_key = BytesField(3)
    device_identity_name = NameField()
Example #27
0
class CipherBlock(TlvModel):
    iv = BytesField(TLV_AC_AES_IV)
    keyid = UintField(TLV_AC_KEYID)
    cipher = BytesField(TLV_AC_ENCRYPTED_PAYLOAD)
Example #28
0
class StateVectorComponentModel(TlvModel):
    node_id = BytesField(StateVectorModelTypes.KEY.value)
    seq_num = UintField(StateVectorModelTypes.VALUE.value)
Example #29
0
class ServiceMetaItem(TlvModel):
    service_id = UintField(1)
    encryption_key = BytesField(3)
Example #30
0
class AccountConfig(TlvModel):
    user_id = BytesField(0x81)
    full_name = BytesField(0xa2)
    email = BytesField(0xa3)