示例#1
0
 public void SetGoalReachedCallback(Action <int, GalileoStatus> goalCB)
 {
     onGoalReachedCB = (goalid, statusJson, length) => {
         byte[] result = new byte[length];
         Marshal.Copy(statusJson, result, 0, (int)length);
         var statusStr = Encoding.ASCII.GetString(result, 0, (int)length);
         goalCB?.Invoke(goalid, JsonConvert.DeserializeObject <GalileoStatus>(statusStr));
     };
     GalileoFunctions.SetGoalReachedCallback(instance, onGoalReachedCB);
 }
 internal static extern GALILEO_RETURN_CODE SetGoalReachedCallback(IntPtr sdk, GoalReachedDelegate statusUpdate);