Exemplo n.º 1
0
 public static void CallBegin(int cursor, UniFunction function)
 {
     if (Environment.Is64BitProcess)
     {
         OlapNativeImports64.CallBegin(cursor, function);
     }
     else
     {
         OlapNativeImports32.CallBegin(cursor, function);
     }
 }
Exemplo n.º 2
0
        private byte[] createOBCFrame()
        {
            fobc.pl.soft_id      = 0x55;                                  //1
            fobc.pl.reboot_count = 0x01;                                  //2

            fobc.pl.rec_cmd_count = recCNT;                               //2
            fobc.pl.down_count    = downCNT;                              //2

            fobc.pl.last_reset_time = 0;                                  //4
            fobc.pl.work_mode       = 0x10;                               //1

            fobc.pl.utc_time = UniFunction.xDateSeconds(DateTime.UtcNow); //4
            fobc.pl.temp_hk  = -27;                                       //2

            fobc.pl.on_off_status = 0xAA55AA55;                           //4
            fobc.pl.batt_TEMP1    = 27;                                   //2



            byte[] bval = UniSerialize.StructToByte((PlatForm)fobc.pl);

            bval.CopyTo(typk.frame, 0);

            typk.epdu.length = (ushort)bval.Length;

            byte[] bval2 = UniSerialize.StructToByte((TianYuanPackage)typk);

            //string str = Encoding.ASCII.GetString(bval);
            //string str = "";
            //foreach(byte b in bval)
            //{
            //    str += "0x" + b.ToString("X2") + "\t";
            //}
            //str += "\n";
            //Trace.WriteLine("", "");
            //Trace.WriteLine("", str);
            //Trace.WriteLine("", "");
            return(bval2);
        }
Exemplo n.º 3
0
 public static extern void CallBegin(int cursor, UniFunction function);