void mySimconnect_OnRecvAssignedObjectId(SimConnect sender, SIMCONNECT_RECV_ASSIGNED_OBJECT_ID data) { if (ObjectIdArrived != null) { ObjectIdArrived(data.dwRequestID, data.dwObjectID); } }
void simconnect_OnRecvAssignedObjectId(SimConnect sender, SIMCONNECT_RECV_ASSIGNED_OBJECT_ID data) { switch ((DATA_REQUESTS)data.dwRequestID) { case DATA_REQUESTS.REQUEST_DOUGLAS: DouglasID = (uint)(DATA_REQUESTS)data.dwObjectID; displayText("Received Douglas ID"); break; case DATA_REQUESTS.REQUEST_Extra300S: Extra300SID = (uint)(DATA_REQUESTS)data.dwObjectID; displayText("Received Extra 300S ID"); break; case DATA_REQUESTS.REQUEST_TRUCK: TruckID = (uint)(DATA_REQUESTS)data.dwObjectID; displayText("Received Truck ID"); break; default: displayText("Unknown Request ID received: " + (DATA_REQUESTS)data.dwRequestID); break; } }
void simconnect_OnRecvAssignedObjectId(SimConnect sender, SIMCONNECT_RECV_ASSIGNED_OBJECT_ID data) { switch ((DATA_REQUESTS)data.dwRequestID) { case DATA_REQUESTS.REQUEST_MOONEY: MooneyBravoID = (uint)(DATA_REQUESTS)data.dwObjectID; displayText("Received Mooney Bravo ID"); break; case DATA_REQUESTS.REQUEST_MAULE: MauleID = (uint)(DATA_REQUESTS)data.dwObjectID; displayText("Received Maule M7 ID"); break; case DATA_REQUESTS.REQUEST_TRUCK: TruckID = (uint)(DATA_REQUESTS)data.dwObjectID; displayText("Received Truck ID"); break; default: displayText("Unknown Request ID received: " + (DATA_REQUESTS)data.dwRequestID); break; } }
void sc_OnRecvAssignedObjectId(SimConnect sender, SIMCONNECT_RECV_ASSIGNED_OBJECT_ID data) { if (data.dwRequestID >= (uint)Requests.AICreateBase && data.dwRequestID < (uint)Requests.AICreateBase + maximumRequests) { ObjectsInSimulation[data.dwRequestID - (uint)Requests.AICreateBase].ObjectID = data.dwObjectID; log.Info("OnRecvAssignedObjectId (Requests.CreateAI): " + data.dwObjectID); OnPropertyChanged("CreatedSimObjectsCount"); OnPropertyChanged("ObjectsCreated"); } }
private static void Sim_OnRecvAssignedObjectId( SimConnect sender, SIMCONNECT_RECV_ASSIGNED_OBJECT_ID data) { TaskCompletionSource <int> task; objectIdTasks.TryGetValue((int)data.dwRequestID, out task); if (task != null) { task.TrySetResult((int)data.dwObjectID); } }
void simconnect_OnRecvAssignedObjectId(SimConnect sender, SIMCONNECT_RECV_ASSIGNED_OBJECT_ID data) { if (data.dwRequestID >= (int)SIMCONNECT_EVENTS.EVENTID_SETAIAC) { // Remember simconnect object id var aicounter = data.dwRequestID - (uint)SIMCONNECT_EVENTS.EVENTID_SETAIAC; var planeObjectId = data.dwObjectID; var callsign = AICounterToCallsignMap[aicounter]; CallsignToAIPlaneMap[callsign].SimConnectObjectId = data.dwObjectID; // Set AI plane in slew mode and subscribe to 1 second pos.reps simconnect.AIReleaseControl(planeObjectId, SIMCONNECT_EVENTS.EVENTID_AIRELEASEATC); simconnect.TransmitClientEvent(planeObjectId, SIMCONNECT_EVENTS.EVENTID_SLEW_ON, 1, null, SIMCONNECT_EVENT_FLAG.DEFAULT); simconnect.TransmitClientEvent(planeObjectId, SIMCONNECT_EVENTS.EVENTID_STROBES_ON, 0, null, SIMCONNECT_EVENT_FLAG.DEFAULT); simconnect.TransmitClientEvent(planeObjectId, SIMCONNECT_EVENTS.EVENTID_TOGGLE_BEACON_LIGHTS, 0, null, SIMCONNECT_EVENT_FLAG.DEFAULT); simconnect.TransmitClientEvent(planeObjectId, SIMCONNECT_EVENTS.EVENTID_TOGGLE_TAXI_LIGHTS, 0, null, SIMCONNECT_EVENT_FLAG.DEFAULT); simconnect.TransmitClientEvent(planeObjectId, SIMCONNECT_EVENTS.EVENTID_TOGGLE_WING_LIGHTS, 0, null, SIMCONNECT_EVENT_FLAG.DEFAULT); simconnect.RequestDataOnSimObject((SIMCONNECT_EVENTS)((uint)SIMCONNECT_EVENTS.EVENTID_POSITIONREPORT_FOR_AIUPDATE + aicounter), DEFINITIONS.AIPositionUpdateStruct, planeObjectId, SIMCONNECT_PERIOD.SECOND, SIMCONNECT_DATA_REQUEST_FLAG.DEFAULT, 0, 1, 0); AICounterToCallsignMap.Remove(aicounter); } }
void mySimconnect_OnRecvAssignedObjectId(SimConnect sender, SIMCONNECT_RECV_ASSIGNED_OBJECT_ID data) { if (ObjectIdArrived != null) { ObjectIdArrived(data.dwRequestID, data.dwObjectID); } }
void simconnect_OnRecvAssignedObjectId(SimConnect sender, SIMCONNECT_RECV_ASSIGNED_OBJECT_ID data) { switch ((DATA_REQUESTS)data.dwRequestID) { case DATA_REQUESTS.REQUEST_DOUGLAS: DouglasID = (uint) (DATA_REQUESTS)data.dwObjectID; displayText("Received Douglas ID"); break; case DATA_REQUESTS.REQUEST_Extra300S: Extra300SID = (uint) (DATA_REQUESTS)data.dwObjectID; displayText("Received Extra 300S ID"); break; case DATA_REQUESTS.REQUEST_TRUCK: TruckID = (uint) (DATA_REQUESTS)data.dwObjectID; displayText("Received Truck ID"); break; default: displayText("Unknown Request ID received: " + (DATA_REQUESTS)data.dwRequestID); break; } }
private void simconnect_OnRecvAssignedObjectId(SimConnect sender, SIMCONNECT_RECV_ASSIGNED_OBJECT_ID data) { MessageBox.Show("OnRecvAssignedObjectId: " + data.dwObjectID); }