Ejemplo n.º 1
0
 public override _LTRNative.LTRERROR WriteAVREEPROM([In, Out] byte[] Data, uint BeginAddress, uint size)
 {
     SetConfigToModule();
     _LTRNative.LTRERROR res = LTR22_WriteAVREEPROM(ref module, Data, BeginAddress, size);
     GetConfigFromModule();
     return(res);
 }
Ejemplo n.º 2
0
 public _LTRNative.LTRERROR Recv(uint[] data, uint size, uint timeout)
 {
     SetConfigToModule();
     _LTRNative.LTRERROR res = LTR51_Recv(ref module, data, null, size, timeout);
     GetConfigFromModule();
     return(res);
 }
Ejemplo n.º 3
0
 /* Версия функции, предназначенная в первую очередь для LabView, так как LabView медленно работает
  * со структурами C#, то сделан вариант, где все поля доп. информации передаются отдельным массивом */
 public _LTRNative.LTRERROR ProcessData(uint[] src, double[] dest, ref int size, ProcFlags flags,
                                        out FRAME_STATUS frame_status,
                                        byte[] digBits, byte[] ch, AdcRanges[] range)
 {
     uint[] info             = new uint[size];
     _LTRNative.LTRERROR err = LTR210_ProcessData(ref hnd, src, dest, ref size, flags, out frame_status, info);
     if (err == _LTRNative.LTRERROR.OK)
     {
         for (int i = 0; i < size; i++)
         {
             DATA_INFO cur_info = new DATA_INFO(info[i]);
             if (digBits.Length > i)
             {
                 digBits[i] = (byte)(cur_info.DigBitState & 1);
             }
             if (ch.Length > i)
             {
                 ch[i] = cur_info.Ch;
             }
             if (range.Length > i)
             {
                 range[i] = cur_info.Range;
             }
         }
     }
     return(err);
 }
Ejemplo n.º 4
0
 public override _LTRNative.LTRERROR SetADC()
 {
     SetConfigToModule();
     _LTRNative.LTRERROR res = LTR212_SetADC(ref module);
     GetConfigFromModule();
     return(res);
 }
Ejemplo n.º 5
0
 public override _LTRNative.LTRERROR EvaluateFrequencies()
 {
     SetConfigToModule();
     _LTRNative.LTRERROR res = LTR51_EvaluateFrequencies(ref module);
     GetConfigFromModule();
     return(res);
 }
Ejemplo n.º 6
0
 public override _LTRNative.LTRERROR Calibrate(byte[] LChannel_Mask, int mode, int reset)
 {
     SetConfigToModule();
     _LTRNative.LTRERROR res = LTR212_Calibrate(ref module, LChannel_Mask, mode, reset);
     GetConfigFromModule();
     return(res);
 }
Ejemplo n.º 7
0
 public _LTRNative.LTRERROR WriteSerialNumber(string sn, ushort Code)
 {
     SetConfigToModule();
     _LTRNative.LTRERROR res = LTR212_WriteSerialNumber(ref module, sn.ToCharArray(), Code);
     GetConfigFromModule();
     return(res);
 }
Ejemplo n.º 8
0
 public override _LTRNative.LTRERROR StopSecondMark()
 {
     SetConfigToModule();
     _LTRNative.LTRERROR res = LTR43_StopSecondMark(ref module);
     GetConfigFromModule();
     return(res);
 }
Ejemplo n.º 9
0
 public override _LTRNative.LTRERROR MakeStartMark()
 {
     SetConfigToModule();
     _LTRNative.LTRERROR res = LTR43_MakeStartMark(ref module);
     GetConfigFromModule();
     return(res);
 }
Ejemplo n.º 10
0
 public _LTRNative.LTRERROR ReadPort(uint[] InputData)
 {
     SetConfigToModule();
     _LTRNative.LTRERROR res = LTR43_ReadPort(ref module, ref InputData[0]);
     GetConfigFromModule();
     return(res);
 }
Ejemplo n.º 11
0
 public override _LTRNative.LTRERROR StartStreamRead()
 {
     SetConfigToModule();
     _LTRNative.LTRERROR res = LTR43_StartStreamRead(ref module);
     GetConfigFromModule();
     return(res);
 }
Ejemplo n.º 12
0
 public override _LTRNative.LTRERROR WritePort(uint OutputData)
 {
     SetConfigToModule();
     _LTRNative.LTRERROR res = LTR43_WritePort(ref module, OutputData);
     GetConfigFromModule();
     return(res);
 }
Ejemplo n.º 13
0
 public override _LTRNative.LTRERROR ReopenModule()
 {
     SetConfigToModule();
     _LTRNative.LTRERROR res = LTR22_ReopenModule(ref module);
     GetConfigFromModule();
     return(res);
 }
Ejemplo n.º 14
0
 public override _LTRNative.LTRERROR TestHardwareInterface()
 {
     SetConfigToModule();
     _LTRNative.LTRERROR res = LTR22_TestHardwareInterface(ref module);
     GetConfigFromModule();
     return(res);
 }
Ejemplo n.º 15
0
 public _LTRNative.LTRERROR ProcessDataTest(uint[] src, double[] dest, int size, bool volt, uint[] bad_num)
 {
     SetConfigToModule();
     _LTRNative.LTRERROR res = LTR212_ProcessDataTest(ref module, src, dest, ref size, volt, ref bad_num[0]);
     GetConfigFromModule();
     return(res);
 }
Ejemplo n.º 16
0
 public override _LTRNative.LTRERROR WriteEEPROM(int Address, byte val)
 {
     SetConfigToModule();
     _LTRNative.LTRERROR res = LTR43_WriteEEPROM(ref module, Address, val);
     GetConfigFromModule();
     return(res);
 }
Ejemplo n.º 17
0
 public override _LTRNative.LTRERROR CreateLChannel2(uint PhysChannel, uint Scale, uint BridgeType)
 {
     SetConfigToModule();
     _LTRNative.LTRERROR res = LTR212_CreateLChannel2(PhysChannel, Scale, BridgeType);
     GetConfigFromModule();
     return(res);
 }
Ejemplo n.º 18
0
 public override _LTRNative.LTRERROR RS485_TestReceiveByte(int OutBytesQnt, int InBytesQnt)
 {
     SetConfigToModule();
     _LTRNative.LTRERROR res = LTR43_RS485_TestReceiveByte(ref module, OutBytesQnt, InBytesQnt);
     GetConfigFromModule();
     return(res);
 }
Ejemplo n.º 19
0
 public override _LTRNative.LTRERROR TestEEPROM()
 {
     SetConfigToModule();
     _LTRNative.LTRERROR res = LTR212_TestEEPROM(ref module);
     GetConfigFromModule();
     return(res);
 }
Ejemplo n.º 20
0
 public override _LTRNative.LTRERROR RS485_TestStopReceive()
 {
     SetConfigToModule();
     _LTRNative.LTRERROR res = LTR43_RS485_TestStopReceive(ref module);
     GetConfigFromModule();
     return(res);
 }
Ejemplo n.º 21
0
 public override _LTRNative.LTRERROR TestInterfaceStart(int PackDelay)
 {
     SetConfigToModule();
     _LTRNative.LTRERROR res = LTR212_TestInterfaceStart(ref module, PackDelay);
     GetConfigFromModule();
     return(res);
 }
Ejemplo n.º 22
0
 public _LTRNative.LTRERROR ProcessData(uint[] src, uint[] dest, int size)
 {
     SetConfigToModule();
     _LTRNative.LTRERROR res = LTR43_ProcessData(ref module, src, dest, ref size);
     GetConfigFromModule();
     return(res);
 }
Ejemplo n.º 23
0
 public override _LTRNative.LTRERROR ReadEEPROM(int Address, byte[] val)
 {
     SetConfigToModule();
     _LTRNative.LTRERROR res = LTR51_ReadEEPROM(ref module, Address, val);
     GetConfigFromModule();
     return(res);
 }
Ejemplo n.º 24
0
 public override _LTRNative.LTRERROR GetFrame(uint[] buf)
 {
     SetConfigToModule();
     _LTRNative.LTRERROR res = LTR11_GetFrame(ref module, buf);
     GetConfigFromModule();
     return(res);
 }
Ejemplo n.º 25
0
 public override _LTRNative.LTRERROR Config()
 {
     SetConfigToModule();
     _LTRNative.LTRERROR res = LTR51_Config(ref module);
     GetConfigFromModule();
     return(res);
 }
Ejemplo n.º 26
0
 public override _LTRNative.LTRERROR Stop()
 {
     SetConfigToModule();
     _LTRNative.LTRERROR res = LTR11_Stop(ref module);
     GetConfigFromModule();
     return(res);
 }
Ejemplo n.º 27
0
 public _LTRNative.LTRERROR ProcessData(uint[] src, uint[] dest, double[] Frequency, int size)
 {
     SetConfigToModule();
     _LTRNative.LTRERROR res = LTR51_ProcessData(ref module, src, dest, Frequency, ref size);
     GetConfigFromModule();
     return(res);
 }
Ejemplo n.º 28
0
 public _LTRNative.LTRERROR CalcFS(double[] fsBase, double[] fs)
 {
     SetConfigToModule();
     _LTRNative.LTRERROR res = LTR212_CalcFS(ref module, ref fsBase[0], ref fs[0]);
     GetConfigFromModule();
     return(res);
 }
Ejemplo n.º 29
0
 public override _LTRNative.LTRERROR ProcessDataTherm(uint[] src, double[] dest, double[] therm,
                                                      ref int size, out int tcnt, CorrectionMode correction_mode, ProcFlags flags)
 {
     _LTRNative.LTRERROR res = base.ProcessDataTherm(src, dest, therm, ref size, out tcnt,
                                                     correction_mode, flags);
     return(res);
 }
Ejemplo n.º 30
0
 public override _LTRNative.LTRERROR GetModuleDescription()
 {
     SetConfigToModule();
     _LTRNative.LTRERROR res = LTR22_GetModuleDescription(ref module);
     GetConfigFromModule();
     return(res);
 }