-
Notifications
You must be signed in to change notification settings - Fork 13
Command Formats
JonnyKong edited this page Nov 21, 2019
·
3 revisions
NDN-Repo interacts with clients using command interests. NDN-Repo's command interests follow the Repo protocol spec, and it's serialized using python-ndn's TLVModel. Fields are encoded in order:
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)
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)
The status code in RepoCommandResponse has the following definition:
- 100: The command is OK
- 200: All the data have been inserted/deleted
- 300: The insertion/deletion command is in progress
- 401: The insertion/deletion command is invalidated
- 403: Malformed Command
- 404: No such insertion/deletion is in progress