-
Notifications
You must be signed in to change notification settings - Fork 5
/
const.go
308 lines (270 loc) · 11.3 KB
/
const.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
package simconnect
type GroupPriority int
//Divers
const (
MAX_PATH = 260
SIMCONNECT_UNUSED = 0xFFFFFFFF // special value to indicate unused event, ID
SIMCONNECT_OBJECT_ID_USER = 0 // proxy value for User vehicle ObjectID
SIMCONNECT_CAMERA_IGNORE_FIELD = 3.402823466e38 //Used to tell the Camera API to NOT modify the value in this part of the argument.
SIMCONNECT_CLIENTDATA_MAX_SIZE = 8192 // maximum value for SimConnect_CreateClientData dwSize parameter
// Notification Group priority values
SIMCONNECT_GROUP_PRIORITY_HIGHEST GroupPriority = 1 // highest priority
SIMCONNECT_GROUP_PRIORITY_HIGHEST_MASKABLE GroupPriority = 10000000 // highest priority that allows events to be masked
SIMCONNECT_GROUP_PRIORITY_STANDARD GroupPriority = 1900000000 // standard priority
SIMCONNECT_GROUP_PRIORITY_DEFAULT GroupPriority = 2000000000 // default priority
SIMCONNECT_GROUP_PRIORITY_LOWEST GroupPriority = 4000000000 // priorities lower than this will be ignored
//Weather observations Metar strings
MAX_METAR_LENGTH = 2000
// Maximum thermal size is 100 km.
MAX_THERMAL_SIZE = 100000
MAX_THERMAL_RATE = 1000
// SIMCONNECT_DATA_INITPOSITION.Airspeed
INITPOSITION_AIRSPEED_CRUISE = -1 // aircraft's cruise airspeed
INITPOSITION_AIRSPEED_KEEP = -2 // keep current airspeed
// AddToClientDataDefinition dwSizeOrType parameter type values
SIMCONNECT_CLIENTDATATYPE_INT8 = -1 // 8-bit integer number
SIMCONNECT_CLIENTDATATYPE_INT16 = -2 // 16-bit integer number
SIMCONNECT_CLIENTDATATYPE_INT32 = -3 // 32-bit integer number
SIMCONNECT_CLIENTDATATYPE_INT64 = -4 // 64-bit integer number
SIMCONNECT_CLIENTDATATYPE_FLOAT32 = -5 // 32-bit floating-point number (float)
SIMCONNECT_CLIENTDATATYPE_FLOAT64 = -6 // 64-bit floating-point number (double)
// AddToClientDataDefinition dwOffset parameter special values
SIMCONNECT_CLIENTDATAOFFSET_AUTO = -1 // automatically compute offset of the ClientData variable
// Open ConfigIndex parameter special value
SIMCONNECT_OPEN_CONFIGINDEX_LOCAL = -1 // ignore SimConnect.cfg settings, and force local connection
)
const (
SIMCONNECT_RECV_ID_NULL = iota
SIMCONNECT_RECV_ID_EXCEPTION
SIMCONNECT_RECV_ID_OPEN
SIMCONNECT_RECV_ID_QUIT
SIMCONNECT_RECV_ID_EVENT
SIMCONNECT_RECV_ID_EVENT_OBJECT_ADDREMOVE
SIMCONNECT_RECV_ID_EVENT_FILENAME
SIMCONNECT_RECV_ID_EVENT_FRAME
SIMCONNECT_RECV_ID_SIMOBJECT_DATA
SIMCONNECT_RECV_ID_SIMOBJECT_DATA_BYTYPE
SIMCONNECT_RECV_ID_WEATHER_OBSERVATION
SIMCONNECT_RECV_ID_CLOUD_STATE
SIMCONNECT_RECV_ID_ASSIGNED_OBJECT_ID
SIMCONNECT_RECV_ID_RESERVED_KEY
SIMCONNECT_RECV_ID_CUSTOM_ACTION
SIMCONNECT_RECV_ID_SYSTEM_STATE
SIMCONNECT_RECV_ID_CLIENT_DATA
SIMCONNECT_RECV_ID_EVENT_WEATHER_MODE
SIMCONNECT_RECV_ID_AIRPORT_LIST
SIMCONNECT_RECV_ID_VOR_LIST
SIMCONNECT_RECV_ID_NDB_LIST
SIMCONNECT_RECV_ID_WAYPOINT_LIST
SIMCONNECT_RECV_ID_EVENT_MULTIPLAYER_SERVER_STARTED
SIMCONNECT_RECV_ID_EVENT_MULTIPLAYER_CLIENT_STARTED
SIMCONNECT_RECV_ID_EVENT_MULTIPLAYER_SESSION_ENDED
SIMCONNECT_RECV_ID_EVENT_RACE_END
SIMCONNECT_RECV_ID_EVENT_RACE_LAP
)
const (
SIMCONNECT_DATATYPE_INVALID = iota
SIMCONNECT_DATATYPE_INT32
SIMCONNECT_DATATYPE_INT64
SIMCONNECT_DATATYPE_FLOAT32
SIMCONNECT_DATATYPE_FLOAT64
SIMCONNECT_DATATYPE_STRING8
SIMCONNECT_DATATYPE_STRING32
SIMCONNECT_DATATYPE_STRING64
SIMCONNECT_DATATYPE_STRING128
SIMCONNECT_DATATYPE_STRING256
SIMCONNECT_DATATYPE_STRING260
SIMCONNECT_DATATYPE_STRINGV
SIMCONNECT_DATATYPE_INITPOSITION
SIMCONNECT_DATATYPE_MARKERSTATE
SIMCONNECT_DATATYPE_WAYPOINT
SIMCONNECT_DATATYPE_LATLONALT
SIMCONNECT_DATATYPE_XYZ
SIMCONNECT_DATATYPE_MAX = iota
)
const (
SIMCONNECT_EXCEPTION_NONE = iota
SIMCONNECT_EXCEPTION_ERROR = iota
SIMCONNECT_EXCEPTION_SIZE_MISMATCH
SIMCONNECT_EXCEPTION_UNRECOGNIZED_ID
SIMCONNECT_EXCEPTION_UNOPENED
SIMCONNECT_EXCEPTION_VERSION_MISMATCH
SIMCONNECT_EXCEPTION_TOO_MANY_GROUPS
SIMCONNECT_EXCEPTION_NAME_UNRECOGNIZED
SIMCONNECT_EXCEPTION_TOO_MANY_EVENT_NAMES
SIMCONNECT_EXCEPTION_EVENT_ID_DUPLICATE
SIMCONNECT_EXCEPTION_TOO_MANY_MAPS
SIMCONNECT_EXCEPTION_TOO_MANY_OBJECTS
SIMCONNECT_EXCEPTION_TOO_MANY_REQUESTS
SIMCONNECT_EXCEPTION_WEATHER_INVALID_PORT
SIMCONNECT_EXCEPTION_WEATHER_INVALID_METAR
SIMCONNECT_EXCEPTION_WEATHER_UNABLE_TO_GET_OBSERVATION
SIMCONNECT_EXCEPTION_WEATHER_UNABLE_TO_CREATE_STATION
SIMCONNECT_EXCEPTION_WEATHER_UNABLE_TO_REMOVE_STATION
SIMCONNECT_EXCEPTION_INVALID_DATA_TYPE
SIMCONNECT_EXCEPTION_INVALID_DATA_SIZE
SIMCONNECT_EXCEPTION_DATA_ERROR
SIMCONNECT_EXCEPTION_INVALID_ARRAY
SIMCONNECT_EXCEPTION_CREATE_OBJECT_FAILED
SIMCONNECT_EXCEPTION_LOAD_FLIGHTPLAN_FAILED
SIMCONNECT_EXCEPTION_OPERATION_INVALID_FOR_OBJECT_TYPE
SIMCONNECT_EXCEPTION_ILLEGAL_OPERATION
SIMCONNECT_EXCEPTION_ALREADY_SUBSCRIBED
SIMCONNECT_EXCEPTION_INVALID_ENUM
SIMCONNECT_EXCEPTION_DEFINITION_ERROR
SIMCONNECT_EXCEPTION_DUPLICATE_ID
SIMCONNECT_EXCEPTION_DATUM_ID
SIMCONNECT_EXCEPTION_OUT_OF_BOUNDS
SIMCONNECT_EXCEPTION_ALREADY_CREATED
SIMCONNECT_EXCEPTION_OBJECT_OUTSIDE_REALITY_BUBBLE
SIMCONNECT_EXCEPTION_OBJECT_CONTAINER
SIMCONNECT_EXCEPTION_OBJECT_AI
SIMCONNECT_EXCEPTION_OBJECT_ATC
SIMCONNECT_EXCEPTION_OBJECT_SCHEDULE
)
const (
SIMCONNECT_SIMOBJECT_TYPE_USER = iota
SIMCONNECT_SIMOBJECT_TYPE_ALL
SIMCONNECT_SIMOBJECT_TYPE_AIRCRAFT
SIMCONNECT_SIMOBJECT_TYPE_HELICOPTER
SIMCONNECT_SIMOBJECT_TYPE_BOAT
SIMCONNECT_SIMOBJECT_TYPE_GROUND
)
type SimConnectStat int
const (
SIMCONNECT_STATE_OFF SimConnectStat = iota
SIMCONNECT_STATE_ON
)
const (
SIMCONNECT_PERIOD_NEVER = iota
SIMCONNECT_PERIOD_ONCE
SIMCONNECT_PERIOD_VISUAL_FRAME
SIMCONNECT_PERIOD_SIM_FRAME
SIMCONNECT_PERIOD_SECOND
)
const (
SIMCONNECT_MISSION_FAILED = iota
SIMCONNECT_MISSION_CRASHED
SIMCONNECT_MISSION_SUCCEEDED
)
const (
SIMCONNECT_CLIENT_DATA_PERIOD_NEVER = iota
SIMCONNECT_CLIENT_DATA_PERIOD_ONCE
SIMCONNECT_CLIENT_DATA_PERIOD_VISUAL_FRAME
SIMCONNECT_CLIENT_DATA_PERIOD_ON_SET
SIMCONNECT_CLIENT_DATA_PERIOD_SECOND
)
type PrintColor uint32
type ScrollColor uint32
const (
SIMCONNECT_TEXT_TYPE_SCROLL_BLACK ScrollColor = iota
SIMCONNECT_TEXT_TYPE_SCROLL_WHITE
SIMCONNECT_TEXT_TYPE_SCROLL_RED
SIMCONNECT_TEXT_TYPE_SCROLL_GREEN
SIMCONNECT_TEXT_TYPE_SCROLL_BLUE
SIMCONNECT_TEXT_TYPE_SCROLL_YELLOW
SIMCONNECT_TEXT_TYPE_SCROLL_MAGENTA
SIMCONNECT_TEXT_TYPE_SCROLL_CYAN
SIMCONNECT_TEXT_TYPE_PRINT_BLACK PrintColor = 0x0100
SIMCONNECT_TEXT_TYPE_PRINT_WHITE PrintColor = SIMCONNECT_TEXT_TYPE_PRINT_BLACK + 0x1
SIMCONNECT_TEXT_TYPE_PRINT_RED PrintColor = SIMCONNECT_TEXT_TYPE_PRINT_WHITE + 0x1
SIMCONNECT_TEXT_TYPE_PRINT_GREEN PrintColor = SIMCONNECT_TEXT_TYPE_PRINT_RED + 0x1
SIMCONNECT_TEXT_TYPE_PRINT_BLUE PrintColor = SIMCONNECT_TEXT_TYPE_PRINT_GREEN + 0x1
SIMCONNECT_TEXT_TYPE_PRINT_YELLOW PrintColor = SIMCONNECT_TEXT_TYPE_PRINT_BLUE + 0x1
SIMCONNECT_TEXT_TYPE_PRINT_MAGENTA PrintColor = SIMCONNECT_TEXT_TYPE_PRINT_YELLOW + 0x1
SIMCONNECT_TEXT_TYPE_PRINT_CYAN PrintColor = SIMCONNECT_TEXT_TYPE_PRINT_MAGENTA + 0x1
SIMCONNECT_TEXT_TYPE_MENU = 0x0200
)
const (
SIMCONNECT_TEXT_RESULT_MENU_SELECT_1 = iota
SIMCONNECT_TEXT_RESULT_MENU_SELECT_2
SIMCONNECT_TEXT_RESULT_MENU_SELECT_3
SIMCONNECT_TEXT_RESULT_MENU_SELECT_4
SIMCONNECT_TEXT_RESULT_MENU_SELECT_5
SIMCONNECT_TEXT_RESULT_MENU_SELECT_6
SIMCONNECT_TEXT_RESULT_MENU_SELECT_7
SIMCONNECT_TEXT_RESULT_MENU_SELECT_8
SIMCONNECT_TEXT_RESULT_MENU_SELECT_9
SIMCONNECT_TEXT_RESULT_MENU_SELECT_10
SIMCONNECT_TEXT_RESULT_DISPLAYED = 0x00010000
SIMCONNECT_TEXT_RESULT_QUEUED = SIMCONNECT_TEXT_RESULT_DISPLAYED + 0x1
SIMCONNECT_TEXT_RESULT_REMOVED = SIMCONNECT_TEXT_RESULT_QUEUED + 0x1
SIMCONNECT_TEXT_RESULT_REPLACED = SIMCONNECT_TEXT_RESULT_REMOVED + 0x1
SIMCONNECT_TEXT_RESULT_TIMEOUT = SIMCONNECT_TEXT_RESULT_REPLACED + 0x1
)
const (
SIMCONNECT_WEATHER_MODE_THEME = iota
SIMCONNECT_WEATHER_MODE_RWW
SIMCONNECT_WEATHER_MODE_CUSTOM
SIMCONNECT_WEATHER_MODE_GLOBAL
)
const (
SIMCONNECT_FACILITY_LIST_TYPE_AIRPORT = iota
SIMCONNECT_FACILITY_LIST_TYPE_WAYPOINT
SIMCONNECT_FACILITY_LIST_TYPE_NDB
SIMCONNECT_FACILITY_LIST_TYPE_VOR
SIMCONNECT_FACILITY_LIST_TYPE_COUNT // invalid
)
// SIMCONNECT_VOR_FLAGS flags for SIMCONNECT_RECV_ID_VOR_LIST
const (
SIMCONNECT_RECV_ID_VOR_LIST_HAS_NAV_SIGNAL = 0x00000001 // Has Nav signal
SIMCONNECT_RECV_ID_VOR_LIST_HAS_LOCALIZER = 0x00000002 // Has localizer
SIMCONNECT_RECV_ID_VOR_LIST_HAS_GLIDE_SLOPE = 0x00000004 // Has Nav signal
SIMCONNECT_RECV_ID_VOR_LIST_HAS_DME = 0x00000008 // Station has DME
)
// SIMCONNECT_WAYPOINT_FLAGS bits for the Waypoint Flags field: may be combined
const (
SIMCONNECT_WAYPOINT_NONE = 0x00
SIMCONNECT_WAYPOINT_SPEED_REQUESTED = 0x04 // requested speed at waypoint is valid
SIMCONNECT_WAYPOINT_THROTTLE_REQUESTED = 0x08 // request a specific throttle percentage
SIMCONNECT_WAYPOINT_COMPUTE_VERTICAL_SPEED = 0x10 // compute vertical to speed to reach waypoint altitude when crossing the waypoint
SIMCONNECT_WAYPOINT_ALTITUDE_IS_AGL = 0x20 // AltitudeIsAGL
SIMCONNECT_WAYPOINT_ON_GROUND = 0x00100000 // place this waypoint on the ground
SIMCONNECT_WAYPOINT_REVERSE = 0x00200000 // Back up to this waypoint. Only valid on first waypoint
SIMCONNECT_WAYPOINT_WRAP_TO_FIRST = 0x00400000 // Wrap around back to first waypoint. Only valid on last waypoint.
)
type EventFlag int
// SIMCONNECT_EVENT_FLAG
const (
SIMCONNECT_EVENT_FLAG_DEFAULT EventFlag = iota
SIMCONNECT_EVENT_FLAG_FAST_REPEAT_TIMER // set event repeat timer to simulate fast repeat
SIMCONNECT_EVENT_FLAG_SLOW_REPEAT_TIMER // set event repeat timer to simulate slow repeat
SIMCONNECT_EVENT_FLAG_GROUPID_IS_PRIORITY EventFlag = 0x00000010 // interpret GroupID parameter as priority value
)
// SIMCONNECT_DATA_REQUEST_FLAG
const (
SIMCONNECT_DATA_REQUEST_FLAG_DEFAULT = iota
SIMCONNECT_DATA_REQUEST_FLAG_CHANGED // send requested data when value(s) change
SIMCONNECT_DATA_REQUEST_FLAG_TAGGED // send requested data in tagged format
)
// SIMCONNECT_DATA_SET_FLAG
const (
SIMCONNECT_DATA_SET_FLAG_DEFAULT = iota
SIMCONNECT_DATA_SET_FLAG_TAGGED // data is in tagged format
)
// SIMCONNECT_CREATE_CLIENT_DATA_FLAG
const (
SIMCONNECT_CREATE_CLIENT_DATA_FLAG_DEFAULT = iota
SIMCONNECT_CREATE_CLIENT_DATA_FLAG_READ_ONLY // permit only ClientData creator to write into ClientData
)
// SIMCONNECT_CLIENT_DATA_REQUEST_FLAG
const (
SIMCONNECT_CLIENT_DATA_REQUEST_FLAG_DEFAULT = iota
SIMCONNECT_CLIENT_DATA_REQUEST_FLAG_CHANGED // send requested ClientData when value(s) change
SIMCONNECT_CLIENT_DATA_REQUEST_FLAG_TAGGED // send requested ClientData in tagged format
)
// SIMCONNECT_CLIENT_DATA_SET_FLAG
const (
SIMCONNECT_CLIENT_DATA_SET_FLAG_DEFAULT = iota
SIMCONNECT_CLIENT_DATA_SET_FLAG_TAGGED // data is in tagged format
)
// SIMCONNECT_VIEW_SYSTEM_EVENT_DATA dwData contains these flags for the "View" System Event
const (
SIMCONNECT_VIEW_SYSTEM_EVENT_DATA_COCKPIT_2D = 0x00000001 // 2D Panels in cockpit view
SIMCONNECT_VIEW_SYSTEM_EVENT_DATA_COCKPIT_VIRTUAL = 0x00000002 // Virtual (3D) panels in cockpit view
SIMCONNECT_VIEW_SYSTEM_EVENT_DATA_ORTHOGONAL = 0x00000004 // Orthogonal (Map) view
)
// SIMCONNECT_SOUND_SYSTEM_EVENT_DATA dwData contains these flags for the "Sound" System Event
const (
SIMCONNECT_SOUND_SYSTEM_EVENT_DATA_MASTER = 0x00000001 // Sound Master
)