Esempio n. 1
0
 public static short GetExtInput(short nCard, ref ushort Value)
 {
     lock (GetInLock)
     {
         short rtn = -1;
         if (!bExtIOInitOK)
         {
             return(rtn);
         }
         rtn = GooGol_ExtMdl.GT_GetExtIoValueGts(nCard, ref Value);
         Console.WriteLine(Value.ToString());
         return(rtn);
     }
 }
Esempio n. 2
0
 public static short SetExtOutPut(short nCard, short nPort, bool bOn)
 {
     lock (SetOutLock)
     {
         short rtn = -1;
         if (bOn)
         {
             rtn = GooGol_ExtMdl.GT_SetExtIoBitGts(nCard, nPort, 0);
         }
         else
         {
             rtn = GooGol_ExtMdl.GT_SetExtIoBitGts(nCard, nPort, 1);
         }
         return(rtn);
     }
 }
Esempio n. 3
0
        public static short InitExtIo()
        {
            short rtn = -1;

            rtn = GooGol_ExtMdl.GT_OpenExtMdlGts("");
            if (rtn != 0)
            {
                return(rtn);
            }

            if (File.Exists(ConfigFile))
            {
                rtn = GooGol_ExtMdl.GT_LoadExtConfigGts(ConfigFile);
            }
            if (rtn != 0)
            {
                return(rtn);
            }

            bExtIOInitOK = true;
            return(rtn);
        }