private static void SaveDataStructure(byte[] bytes, TmosDataStructure dataStructure, int index, byte[] structureByteContent) { byte[] structure = new byte[dataStructure.Length]; int sourceOffset = dataStructure.Address + (dataStructure.Length * index); Array.Copy(structureByteContent, 0, bytes, sourceOffset, dataStructure.Length); }
private static byte[] GetDataStructure(byte[] bytes, TmosDataStructure dataStructure, int index, int byteOffset) { byte[] structure = new byte[dataStructure.Length]; int sourceOffset = dataStructure.Address + (dataStructure.Length * index) + byteOffset; Array.Copy(bytes, sourceOffset, structure, 0, dataStructure.Length); return(structure); }
private static byte[] GetDataStructure(byte[] bytes, TmosDataStructure dataStructure, int index) { return(GetDataStructure(bytes, dataStructure, index, 0)); }