I first get the list of the AI aircrafts.
Then in the call back function I add all the object IDs
And my RECV ID section...
I get no exceptions, and sometimes I get some data, most of the time I get no data.
As a test I am using the AI traffic object sample.
I can see the truck going up and down the runway, but I never get a notification when it happens.
What could be the problems.
Sims
Code:
SimConnect_RequestDataOnSimObjectType(
..., REQUEST_1, DEFINITION_1,
200000,
SIMCONNECT_SIMOBJECT_TYPE_AIRCRAFT
);
Then in the call back function I add all the object IDs
Code:
...
case SIMCONNECT_RECV_ID_SIMOBJECT_DATA_BYTYPE:
{
SIMCONNECT_RECV_SIMOBJECT_DATA_BYTYPE *pObjData = (SIMCONNECT_RECV_SIMOBJECT_DATA_BYTYPE*)pData;
switch(pObjData->dwRequestID)
{
case REQUEST_1
SimConnect_RequestDataOnSimObject
(
..., REQUEST_2, DEFINITION_1,
ObjectId,
SIMCONNECT_PERIOD_SECOND,
SIMCONNECT_DATA_REQUEST_FLAG_CHANGED
);
And my RECV ID section...
Code:
case SIMCONNECT_RECV_ID_SIMOBJECT_DATA:
{
SIMCONNECT_RECV_SIMOBJECT_DATA *pObjData = (SIMCONNECT_RECV_SIMOBJECT_DATA*)pData;
switch(pObjData->dwRequestID)
{
case REQUEST_2
...
I get no exceptions, and sometimes I get some data, most of the time I get no data.
As a test I am using the AI traffic object sample.
I can see the truck going up and down the runway, but I never get a notification when it happens.
What could be the problems.
Sims

