1 /* 2 * Copyright (C) 2021 Huawei Device Co., Ltd. 3 * Licensed under the Apache License, Version 2.0 (the "License"); 4 * you may not use this file except in compliance with the License. 5 * You may obtain a copy of the License at 6 * 7 * http://www.apache.org/licenses/LICENSE-2.0 8 * 9 * Unless required by applicable law or agreed to in writing, software 10 * distributed under the License is distributed on an "AS IS" BASIS, 11 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 * See the License for the specific language governing permissions and 13 * limitations under the License. 14 */ 15 #ifndef NSTACKX_DFILE_RETRANSMISSION_H 16 #define NSTACKX_DFILE_RETRANSMISSION_H 17 18 #include "nstackx_dfile_transfer.h" 19 20 #define SEND_RETRY_DIVISOR 1 21 #define ALL_RETRY_DIVISOR 2 22 23 #define NSTACKX_RETRY_MAX_COUNT_BIT 0 24 25 #define FRAME_INSERT_TAIL 0 26 #define FRAME_INSERT_HEAD 1 27 #define FRAME_NOT_INSERT 2 28 29 #define RETRANS_FILE_MIN_RETRY_COUNT 1000 30 #define TRANSFER_ALL_RETRY_COUNT_ELAPSE_TIME 3000 31 #define TRANSFER_ALL_RETRY_COUNT_MIN_NUM 5000 32 #define TRANSFER_ALL_RETRY_COUNT_MAX_NUM 10000 33 34 void SendFileDataAck(DFileTrans *dFileTrans, DFileReceiveState *nextState); 35 36 #endif /* NSTACKX_DFILE_RETRANSMISSION_H */ 37