finish encoding: SelfEncodingBase

This commit is contained in:
free will committed 2021-03-15 17:00:05 +08:00
1 parent 0a945ada8e
commit 8bd3547a70
6 files changed
+209 -8

No files matched your search

+9 -5
View File
@@ -6,7 +6,7 @@ import component.ReadOnlyField;
import encoding.*;
/*
* @Author: Wang Feng
* @Author: Wang Fengs
* @Description: 表示一个MIN网络层包的通用结构
* todo: 需要在signature完成之后取消signatureField的注释
* @Version: 1.0.0
@@ -14,11 +14,11 @@ import encoding.*;
* @Copyright: MIN-Group;国家重大科技基础设施——未来网络北大实验室;深圳市信息论与未来网络重点实验室
*/
public class MINPacket implements IEncodingAble {
private IdentifierField identifierField; // 标识区
public IdentifierField identifierField; // 标识区
// private SignatureField signatureField; // 签名区
private ReadOnlyField readOnlyField; // 只读区
private MutableField mutableField; // 可变区
private VlInt packetType; // 包类型
public ReadOnlyField readOnlyField; // 只读区
public MutableField mutableField; // 可变区
public VlInt packetType; // 包类型
/**
* 判断 MIN 包是否是一个有效的包
@@ -90,6 +90,10 @@ public class MINPacket implements IEncodingAble {
/**
* 线速解码,将 MIN包 TLV 中的四个区域分别解析出来
* // @Description:
* // 1. 解析出四个区的TLV;
* // 2. 检查必要的TLV是否存在,不存在则抛出异常,以下为必须条件:
* // a. 必须包含标识区,且标识区至少包含一个标识
* @param block
* @return
*/