Exemplo n.º 1
0
 static public void SetMemFullOp(int deviceId, LJV7IF_FULL_MEM_OP data)
 {
     try
     {
         byte category = 0;
         byte item     = 2;
         var  setting  = new LJSetting((byte)SettingDepth.Running, (byte)SettingType.Common, category, item,
                                       (byte)0, (byte)0, (byte)0, (byte)0, (byte)data);
         SetSetting(deviceId, setting);
     }
     catch (Exception)
     {
         throw;
     }
 }
Exemplo n.º 2
0
 static public void SetMemAllocation(int deviceId, LJV7IF_MEM_ALLOCATION data)
 {
     try
     {
         byte category = 0;
         byte item     = 1;
         var  setting  = new LJSetting((byte)SettingDepth.Running, (byte)SettingType.Common, category, item,
                                       (byte)0, (byte)0, (byte)0, (byte)0, (byte)data);
         SetSetting(deviceId, setting);
     }
     catch (Exception)
     {
         throw;
     }
 }
Exemplo n.º 3
0
 static public void SetOpMode(int deviceId, LJV7IF_OP_MODE data)
 {
     try
     {
         byte category = 0;
         byte item     = 0;
         var  setting  = new LJSetting((byte)SettingDepth.Running, (byte)SettingType.Common, category, item,
                                       (byte)0, (byte)0, (byte)0, (byte)0, (byte)data);
         SetSetting(deviceId, setting);
     }
     catch (Exception)
     {
         throw;
     }
 }
Exemplo n.º 4
0
 static public void SetBatchMode(int deviceId, LJV7IF_BATCH_MODE data)
 {
     try
     {
         byte category    = 0;
         byte item        = 3;
         var  settingType = SettingType.Program00;
         var  setting     = new LJSetting((byte)SettingDepth.Running, (byte)settingType, category, item,
                                          (byte)0, (byte)0, (byte)0, (byte)0, (byte)data);
         SetSetting(deviceId, setting);
     }
     catch (Exception)
     {
         throw;
     }
 }
Exemplo n.º 5
0
 static public void SetTriggerFreq(int deviceId, LJV7IF_FREQUENCY data)
 {
     try
     {
         byte category    = 0;
         byte item        = 2;
         var  settingType = SettingType.Program00;
         var  setting     = new LJSetting((byte)SettingDepth.Running, (byte)settingType, category, item,
                                          (byte)0, (byte)0, (byte)0, (byte)0, (byte)data);
         SetSetting(deviceId, setting);
     }
     catch (Exception)
     {
         throw;
     }
 }
Exemplo n.º 6
0
 static public LJV7IF_OP_MODE GetOpMode(int deviceId)
 {
     try
     {
         byte   category = 0;
         byte   item     = 0;
         byte[] data     = new byte[1];
         var    setting  = new LJSetting((byte)SettingDepth.Running, (byte)SettingType.Common, category, item,
                                         (byte)0, (byte)0, (byte)0, (byte)0, data);
         data = GetSetting(deviceId, setting);
         return((LJV7IF_OP_MODE)(data[0]));
     }
     catch (Exception)
     {
         throw;
     }
 }
Exemplo n.º 7
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;
     }
 }
Exemplo n.º 8
0
 static public LJV7IF_FREQUENCY GetTriggerFreq(int deviceId)
 {
     try
     {
         byte   category    = 0;
         byte   item        = 2;
         var    settingType = SettingType.Program00;
         byte[] data        = new byte[1];
         var    setting     = new LJSetting((byte)SettingDepth.Running, (byte)settingType, category, item,
                                            (byte)0, (byte)0, (byte)0, (byte)0, data);
         data = GetSetting(deviceId, setting);
         return((LJV7IF_FREQUENCY)data[0]);
     }
     catch (Exception)
     {
         throw;
     }
 }