Beispiel #1
0
 static byte[] GetSetting(int deviceId, LJSetting lJSetting)
 {
     try
     {
         LJV7IF_TARGET_SETTING targetSetting = lJSetting.TargetSetting;
         byte[] data = new byte[lJSetting.DataLength];
         using (PinnedObject pin = new PinnedObject(data))
         {
             int rc = NativeMethods.LJV7IF_GetSetting(deviceId, lJSetting.Depth, targetSetting,
                                                      pin.Pointer, (uint)lJSetting.DataLength);
         }
         return(data);
     }
     catch (Exception)
     {
         throw;
     }
 }
Beispiel #2
0
        public LJSetting(byte depth, byte type, byte category, byte item, byte target1, byte target2, byte target3, byte target4, params byte[] data)
        {
            _targetSetting            = new LJV7IF_TARGET_SETTING();
            _depth                    = depth;
            _targetSetting.byType     = (byte)(type);
            _targetSetting.byCategory = category;
            _targetSetting.byItem     = item;
            _targetSetting.byTarget1  = target1;
            _targetSetting.byTarget2  = target2;
            _targetSetting.byTarget3  = target3;
            _targetSetting.byTarget4  = target4;
            var dataList = new System.Collections.Generic.List <byte>();

            foreach (var val in data)
            {
                dataList.Add(val);
            }
            _data = dataList.ToArray();
        }
Beispiel #3
0
 public static extern int LJV7IF_GetSetting(int lDeviceId, byte byDepth, LJV7IF_TARGET_SETTING TargetSetting, IntPtr pData, uint dwDataSize);