Ejemplo n.º 1
0
        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);
        }
Ejemplo n.º 2
0
        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);
        }
Ejemplo n.º 3
0
 private static byte[] GetDataStructure(byte[] bytes, TmosDataStructure dataStructure, int index)
 {
     return(GetDataStructure(bytes, dataStructure, index, 0));
 }