protected override void Awake() { base.Awake(); //Convert the filtered entities list to a string with , between lines from the csv and send it to the vrlink dll List <string> filteredEntities = ReadFilteredEntities(); string filteredEntitiesListString; if (filteredEntities == null) { filteredEntitiesListString = ""; } else { filteredEntitiesListString = String.Join(",", filteredEntities.ToArray()); } ExerciseConnectionPtr = NetSimAgent.Instance.CreateExerciseConnection(port, exerciseId, siteId, applicationNumber, filteredEntitiesListString); fireCallback = new NetSimAgent.FireCallback(fireInteraction); NetSimAgent.Instance.SetFireCallback(ExerciseConnectionPtr, fireCallback); detonationCallback = new NetSimAgent.DetonationCallback(detonationInteraction); NetSimAgent.Instance.SetDetonationCallback(ExerciseConnectionPtr, detonationCallback); createEntityCallback = new NetSimAgent.CreateEntityCallback(createEntityInteraction); NetSimAgent.Instance.SetCreateEntityCallback(ExerciseConnectionPtr, createEntityCallback); acknowledgeCallback = new NetSimAgent.AcknowledgeCallback(acknowledgeInteraction); NetSimAgent.Instance.SetAcknowledgeCallback(ExerciseConnectionPtr, acknowledgeCallback); removeEntityCallback = new NetSimAgent.RemoveEntityCallback(removeEntityInteraction); NetSimAgent.Instance.SetRemoveEntityCallback(ExerciseConnectionPtr, removeEntityCallback); FireInteractionSubscribers = new List <Action <FireInteraction> >(); DetonationInteractionSubscribers = new List <Action <DetonationInteraction> >(); CreateEntityInteractionSubscribers = new List <Action <CreateEntityInteraction> >(); AcknowledgeInteractionSubscribers = new List <Action <AcknowledgeInteraction> >(); RemoveEntityInteractionSubscribers = new List <Action <RemoveEntityInteraction> >(); }
public void SetRemoveEntityCallback(System.IntPtr exConnPtr, NetSimAgent.RemoveEntityCallback removeEntityCallback) { CppExerciseConnection.SetRemoveEntityCallback(exConnPtr, removeEntityCallback); }
public extern static void SetRemoveEntityCallback(IntPtr exConnPtr, NetSimAgent.RemoveEntityCallback removeEntityCallback);