コード例 #1
0
 class NotifyAppParam(TlvModel):
     """
     Used to serialize application parameters for PubSub notify interest.
     """
     publisher_prefix = NameField()
     nonce = UintField(128)
     publisher_fwd_hint = NameField()
コード例 #2
0
ファイル: pubsub.py プロジェクト: yoursunny/ndn-python-repo
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)
コード例 #3
0
ファイル: repo_commands.py プロジェクト: zjkmxy/NDN-Repo
class RepoCommandResponse(TlvModel):
    name = NameField()
    start_block_id = UintField(RepoTypeNumber.START_BLOCK_ID)
    end_block_id = UintField(RepoTypeNumber.END_BLOCK_ID)
    process_id = UintField(RepoTypeNumber.PROCESS_ID)
    status_code = UintField(RepoTypeNumber.STATUS_CODE)
    insert_num = UintField(RepoTypeNumber.INSERT_NUM)
    delete_num = UintField(RepoTypeNumber.DELETE_NUM)
コード例 #4
0
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)
コード例 #5
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))
コード例 #6
0
class DeviceItem(TlvModel):
    device_id = BytesField(1)
    device_info = BytesField(2)
    aes_key = BytesField(3)
    device_identity_name = NameField()
コード例 #7
0
class CheckPrefix(TlvModel):
    name = NameField()
コード例 #8
0
class RegisterPrefix(TlvModel):
    name = NameField()
コード例 #9
0
class ForwardingHint(TlvModel):
    name = NameField()
コード例 #10
0
class CatalogResponseParameter(TlvModel):
    data_name = NameField()
    repo_name = NameField()
    status = 200
コード例 #11
0
class CatalogCommandParameter(TlvModel):
    data_name = NameField()
    repo_name = NameField()
コード例 #12
0
class CatalogDataListParameter(TlvModel):
    name = NameField()
    insert_data_names = RepeatedField(NameField())
    delete_data_names = RepeatedField(NameField())
コード例 #13
0
class CatalogCommandParameter(TlvModel):
    name = NameField()
コード例 #14
0
class RepeatedNames(TlvModel):
    names = RepeatedField(NameField())
コード例 #15
0
class ServiceItem(TlvModel):
    service_id = UintField(1)
    exp_time = UintField(2)
    service_name = NameField()
コード例 #16
0
class CatalogResponseParameter(TlvModel):
    data_name = NameField()
    name = NameField()
コード例 #17
0
 class Model(TlvModel):
     name = NameField()
     int_val = UintField(0x03)
     str_val = BytesField(0x02)
     bool_val = BoolField(0x01)
コード例 #18
0
ファイル: tlv_model_test.py プロジェクト: zjkmxy/python-ndn
 class Model(TlvModel):
     name = NameField()
     int_val = UintField(0x03)
     str_val = BytesField(0x02)
     bool_val = BoolField(0x01)
     array = ModelField(0x05, WordArray)
コード例 #19
0
ファイル: repo_commands.py プロジェクト: zjkmxy/NDN-Repo
class RepoCommandParameter(TlvModel):
    name = NameField()
    start_block_id = UintField(RepoTypeNumber.START_BLOCK_ID)
    end_block_id = UintField(RepoTypeNumber.END_BLOCK_ID)
    process_id = UintField(RepoTypeNumber.PROCESS_ID)
コード例 #20
0
class AccessItem(TlvModel):
    prefix = NameField()
    type = UintField(2)
    encryption_key = BytesField(3)
    decryption_key = BytesField(4)
コード例 #21
0
ファイル: repo_commands.py プロジェクト: zjkmxy/NDN-Repo
class PrefixesInStorage(TlvModel):
    prefixes = RepeatedField(NameField())
コード例 #22
0
class CatalogRequestParameter(TlvModel):
    data_name = NameField()