//
//  NXRaptorPacket.h
//  NXSdwan
//
//  Created by 徐家骏 on 2019/10/25.
//  Copyright © 2019 徐家骏. All rights reserved.
//

#import <Foundation/Foundation.h>

NS_ASSUME_NONNULL_BEGIN

@interface NXRaptorPacket : NSObject

@property(nonatomic)        int16_t           seqid;
@property(nonatomic)        uint32_t          total_size;
@property(nonatomic)        uint16_t          symbol_size;
@property(nonatomic)        uint8_t           block_nums;
@property(nonatomic)        uint8_t           sbn;
@property(nonatomic)        uint16_t          esi;
@property(nonatomic,strong) NSData           *data;

+ (instancetype)packetWithData:(NSData *)data;
- (instancetype)initWithData:(NSData *)data;
- (NSData *)toData;
- (BOOL)isSourceSymbol;

@end

NS_ASSUME_NONNULL_END
