Hello, I am trying to understand how the definitions should be made in order to have one or more DATA_REQUEST and associate with the DATA_NAMES.
What I want is to have two:
static enum DATA_RREQUEST_ID {
REQUEST_MCP_7SEG,
REQUEST_MCP_LED,}
Associated with
static enum DATA_NAMES {
DATA_ALTITUDE_READ,
DATA_COURSE_READ,
DATA_HEADING_READ,
...
...
DATA_SPEED_READ,
}
staic enum DATA_NAMES2 {
DATA_MAXBANK,
....
STAT_SPEED_READ,
}
and then in the switch case
switch (pData-> dwID)
case SIMCONNECT_RECV_ID_SIMOBJECT_DATA:
switch (pObjData-> dwRequestID)
case REQUEST_MCP_7SEG:
...
case REQUEST_MCP_LED
...
Is it possible that my approach is not correct?
In example WeatherStation.cpp there are two DATA_REQUEST
but it doesn't define DATA_NAMES.
I can't find information about the correct way.
I hope someone with more knowledge than mine can help me.
Thank you.
What I want is to have two:
static enum DATA_RREQUEST_ID {
REQUEST_MCP_7SEG,
REQUEST_MCP_LED,}
Associated with
static enum DATA_NAMES {
DATA_ALTITUDE_READ,
DATA_COURSE_READ,
DATA_HEADING_READ,
...
...
DATA_SPEED_READ,
}
staic enum DATA_NAMES2 {
DATA_MAXBANK,
....
STAT_SPEED_READ,
}
and then in the switch case
switch (pData-> dwID)
case SIMCONNECT_RECV_ID_SIMOBJECT_DATA:
switch (pObjData-> dwRequestID)
case REQUEST_MCP_7SEG:
...
case REQUEST_MCP_LED
...
Is it possible that my approach is not correct?
In example WeatherStation.cpp there are two DATA_REQUEST
but it doesn't define DATA_NAMES.
I can't find information about the correct way.
I hope someone with more knowledge than mine can help me.
Thank you.
