AirControl  1.3.0
Open Source, Modular, and Extensible Flight Simulator For Deep Learning Research
IOSchema.cs
1 using System.Collections;
2 using System;
3 using System.Collections.Generic;
4 using Commons;
5 namespace Communicator
6 {
7  #region ControlInput
8  public class ControlSchema
12  {
13 
14  public string MsgType { get; set; } = "ControlInput";
15  //Version of the sceme, IT will be same as the release version
16  public string Version {get;set;} = CommonFunctions.GET_VERSION();
17  //Control type can be one out of "Comminocator","Other". Other methods means Keyboard or Joystick
18  public string InputControlType {get;set;} = "Other";
19  //Airplane Properties
20  //Control Pitch
21  public float Pitch {get; set;}=0f;
22  //Control Roll
23  public float Roll {get; set;} = 0f;
24  //Control Yaw
25  public float Yaw {get; set;}=0f;
26  //Control Throttle
27  public float Throttle {get; set;}=0f;
28  //Control Sticky Throttle
29  public float StickyThrottle {get; set;}=0f;
30  //Control Brake
31  public float Brake {get; set;}=0f;
32  //Control Flaps
33  public int Flaps {get; set;}=0;
34 
35  }
41  public class StaticControlSchema
42  {
49  public static string MsgType { get; set; } = "ControlInput";
50  //Version of the sceme, IT will be same as the release version
51  public static string Version {get;set;} = CommonFunctions.GET_VERSION();
52  //Control type can be one out of "Comminocator","Other". Other methods means Keyboard or Joystick
53  public static string InputControlType {get;set;} = "Other";
54  //Control Pitch
55  public static float Pitch {get; set;}=0f;
56  //Control Roll
57  public static float Roll {get; set;} = 0f;
58  //Control Yaw
59  public static float Yaw {get; set;}=0f;
60  //Control Throttle
61  public static float Throttle {get; set;}=0f;
62  //Control Sticky Throttle
63  public static float StickyThrottle {get; set;}=0f;
64  //Control Brake
65  public static float Brake {get; set;}=0f;
66  //Control Flaps
67  public static int Flaps {get; set;}=0;
68 
69  }
70  #endregion
71 
72  #region Output
73  public static class StaticOutputSchema
79  {
80  public static string MsgType { get; set; } = "Output";
81  //Version of the sceme, IT will be same as the release version
82  public static string Version {get;set;} = CommonFunctions.GET_VERSION();
83  public static float AGL;
84  public static float MSL;
85  public static float CurrentRPM;
86  public static float MaxRPM;
87  public static float MaxPower;
88  public static float CurrentPower;
89  public static float CurrentFuel;
90  public static float CurrentSpeed;
91  public static float BankAngle;
92  public static float PitchAngle;
93  public static bool IfCollision;
94  public static string CollisionObject = "";
95  public static float Latitude;
96  public static float Longitude;
97  public static byte [] ScreenCapture;
98  public static float [] LidarPointCloud;
99  public static int Counter;
100  public static double Reward;
101  public static bool IsGrounded;
102  public static bool IsFlying;
103  public static bool IsTaxiing;
104  public static float PosXAbs;
105  public static float PosYAbs;
106  public static float PosZAbs;
107  public static float PosXRel;
108  public static float PosYRel;
109  public static float PosZRel;
110  public static float RotXAbs;
111  public static float RotYAbs;
112  public static float RotZAbs;
113  public static float RotXRel;
114  public static float RotYRel;
115  public static float RotZRel;
116  public static float AngularXVelocity;
117  public static float AngularYVelocity;
118  public static float AngularZVelocity;
119  public static float LinearXVelocity;
120  public static float LinearYVelocity;
121  public static float LinearZVelocity;
122  public static float AngularXAcceleration;
123  public static float AngularYAcceleration;
124  public static float AngularZAcceleration;
125  public static float LinearXAcceleration;
126  public static float LinearYAcceleration;
127  public static float LinearZAcceleration;
128 
129 
130  public static string log = "";
131 
132  }
136  public class OutputSchema
137  {
138  public string MsgType { get; set; } = "Output";
139  //Version of the sceme, IT will be same as the release version
140  public string Version {get;set;} = CommonFunctions.GET_VERSION();
141  public float AGL;
142  public float MSL;
143  public float CurrentRPM;
144  public float MaxRPM;
145  public float MaxPower;
146  public float CurrentPower;
147  public float CurrentFuel;
148  public float CurrentSpeed;
149  public float BankAngle;
150  public bool IfCollision;
151  public string CollisionObject = "";
152  public float Latitude;
153  public float Longitude;
154  public float PitchAngle;
155  public byte [] ScreenCapture;
156  public float [] LidarPointCloud;
157  public int Counter;
158  public string log = "";
159  public double Reward;
160  public bool IsGrounded;
161  public bool IsFlying;
162  public bool IsTaxiing;
163  public float PosXAbs;
164  public float PosYAbs;
165  public float PosZAbs;
166  public float PosXRel;
167  public float PosYRel;
168  public float PosZRel;
169  public float RotXAbs;
170  public float RotYAbs;
171  public float RotZAbs;
172  public float RotXRel;
173  public float RotYRel;
174  public float RotZRel;
175  public float AngularXVelocity;
176  public float AngularYVelocity;
177  public float AngularZVelocity;
178  public float LinearXVelocity;
179  public float LinearYVelocity;
180  public float LinearZVelocity;
181  public float AngularXAcceleration;
182  public float AngularYAcceleration;
183  public float AngularZAcceleration;
184  public float LinearXAcceleration;
185  public float LinearYAcceleration;
186  public float LinearZAcceleration;
187  }
188  #endregion
189 
190  #region
191  public class Logger
195  {
196  public string Log { get; set; } = "";
197  }
203  public static class StaticLogger
204  {
205  public static string Log { get; set; } = "";
206  }
207  #endregion
208 
209  #region TOD
210  public class TODSchema
211  {
212  public string MsgType { get; set; } = "TOD";
213  //Version of the sceme, IT will be same as the release version
214  public string Version {get;set;} = CommonFunctions.GET_VERSION();
215  //set active
216  public bool IsActive{get; set;} = false;
217  // sun location
218  public float SunLatitude { get; set; } = -826.39f;
219  public float SunLongitude { get; set; } = -1605.4f;
220  public int Hour { get; set; } = 10;
221  public int Minute { get; set; } = 5;
222  }
228  public static class StaticTODSchema
229  {
230  public static string MsgType { get; set; } = "TOD";
231  //Version of the sceme, IT will be same as the release version
232  public static string Version {get;set;} = CommonFunctions.GET_VERSION();
233  //set active
234  public static bool IsActive{get; set;} = false;
235  // sun location
236  public static float SunLatitude { get; set; } = -826.39f;
237  public static float SunLongitude { get; set; } = -1605.4f;
238  public static int Hour { get; set; } = 10;
239  public static int Minute { get; set; } = 5;
240 
241  }
242  #endregion
243 
244  #region Camera
245  public class CameraSchema
249  {
250  public string MsgType { get; set; } = "Camera";
251  //Version of the sceme, IT will be same as the release version
252  public string Version {get;set;} = CommonFunctions.GET_VERSION();
253  //Control type can be one out of "Comminocator","Other". Other methods means Keyboard or Joystick
254  public bool IsActive {get;set;} = false;
255  // Which camera is active
256  public int ActiveCamera { get; set; } = 0;
257  public bool IsCapture {get; set;} = false;
258  public int CaptureCamera {get; set;} = 0;
259  public int CaptureType {get; set;} = 0;
260  public int CaptureWidth {get; set;} = 256;
261  public int CaptureHeight {get; set;} = 256;
262 
263  }
269  public static class StaticCameraSchema
270  {
271  public static string MsgType { get; set; } = "Camera";
272  //Version of the sceme, IT will be same as the release version
273  public static string Version {get;set;} = CommonFunctions.GET_VERSION();
274  //Control type can be one out of "Comminocator","Other". Other methods means Keyboard or Joystick
275  public static bool IsActive {get;set;} = false;
276  // Which camera is active
277  public static int ActiveCamera { get; set; } = 0;
278  public static bool IsCapture {get; set;} = false;
279  public static int CaptureCamera {get; set;} = 0;
280  public static int CaptureType {get; set;} = 0;
281  public static int CaptureWidth {get; set;} = 256;
282  public static int CaptureHeight {get; set;} = 256;
283 
284  }
285  #endregion
286 
287  #region Level
288  public class LevelSchema
292  {
293  public string MsgType { get; set; } = "Level";
294  //Version of the sceme, IT will be same as the release version
295  public string Version {get;set;} = CommonFunctions.GET_VERSION();
296  //Control type can be one out of "Comminocator","Other". Other methods means Keyboard or Joystick
297  public string InputControlType {get;set;} = "Other";
298  // if transaction schema is active or not this is to reduce computation load in the update loops
299  public bool IsActive {get; set;} = false;
300  //reload the level if this is set true
301  public bool LevelReload {get; set;} = false;
302 
303  }
309  public static class StaticLevelSchema
310  {
311  public static string MsgType { get; set; } = "Level";
312  //Version of the sceme, IT will be same as the release version
313  public static string Version {get;set;} = CommonFunctions.GET_VERSION();
314  //Control type can be one out of "Comminocator","Other". Other methods means Keyboard or Joystick
315  public static string InputControlType {get;set;} = "Other";
316  // // if transaction schema is active or not this is to reduce computation load in the update loops
317  public static bool IsActive {get; set;} = false;
318  //reload the level if this is set true
319  public static bool LevelReload {get; set;} = false;
320 
321  }
322  #endregion
323 
324  #region WeatherSchema
325  public class WeatherSchema
329  {
330  public string MsgType { get; set; } = "Weather";
331  //Version of the sceme, IT will be same as the release version
332  public string Version {get;set;} = CommonFunctions.GET_VERSION();
333  //Control type can be one out of "Comminocator","Other". Other methods means Keyboard or Joystick
334  public string InputControlType {get;set;} = "Other";
335  // if transaction schema is active or not this is to reduce computation load in the update loops
336  public bool IsClouds {get; set;} = false;
337  //reload the level if this is set true
338  public bool IsFog {get; set;} = false;
339 
340  }
346  public static class StaticWeatherSchema
347  {
348  public static string MsgType { get; set; } = "Weather";
349  //Version of the sceme, IT will be same as the release version
350  public static string Version {get;set;} = CommonFunctions.GET_VERSION();
351  //Control type can be one out of "Comminocator","Other". Other methods means Keyboard or Joystick
352  public static string InputControlType {get;set;} = "Other";
353  // // if transaction schema is active or not this is to reduce computation load in the update loops
354  public static bool IsClouds {get; set;} = false;
355  //reload the level if this is set true
356  public static bool IsFog {get; set;} = false;
357 
358  }
359  #endregion
360 
361  #region UISchema
362  public class UISchema
366  {
367  public string MsgType { get; set; } = "UI";
368  //Version of the sceme, IT will be same as the release version
369  public string Version {get;set;} = CommonFunctions.GET_VERSION();
370  //Control type can be one out of "Comminocator","Other". Other methods means Keyboard or Joystick
371  public bool IsActive {get; set;} = false;
372  // if transaction schema is active or not this is to reduce computation load in the update loops
373  public bool ShowUIElements {get; set;} = false;
374 
375  }
381  public static class StaticUISchema
382  {
383  public static string MsgType { get; set; } = "UI";
384  //Version of the sceme, IT will be same as the release version
385  public static string Version {get;set;} = CommonFunctions.GET_VERSION();
386  //Control type can be one out of "Comminocator","Other". Other methods means Keyboard or Joystick
387  public static bool IsActive {get; set;} = false;
388  // // if transaction schema is active or not this is to reduce computation load in the update loops
389  public static bool ShowUIElements {get; set;} = true;
390  }
391  #endregion
392 
393  #region UISchema
394  public class ClientInfo
398  {
399  public bool IsActive {get; set;} = false;
400  // if transaction schema is active or not this is to reduce computation load in the update loops
401  public string ClientIP {get; set;} = "None";
402  public string ClientPort {get; set;} = "None";
403 
404  }
410  public static class StaticClientInfo
411  {
412  public static bool IsActive {get; set;} = false;
413  // if transaction schema is active or not this is to reduce computation load in the update loops
414  public static string ClientIP {get; set;} = "None";
415  public static string ClientPort {get; set;} = "None";
416  }
417  #endregion
418 
419  #region UIAudioSchema
420  public class AudioSchema
424  {
425  public string MsgType { get; set; } = "Audio";
426  //Version of the sceme, IT will be same as the release version
427  public string Version {get;set;} = CommonFunctions.GET_VERSION();
428  //Control type can be one out of "Comminocator","Other". Other methods means Keyboard or Joystick
429  public bool IsActive {get; set;} = false;
430  //reload the level if this is set true
431  public bool EnableAudio {get; set;} = true;
432 
433  }
439  public static class StaticAudioSchema
440  {
441  public static string MsgType { get; set; } = "Audio";
442  //Version of the sceme, IT will be same as the release version
443  public static string Version {get;set;} = CommonFunctions.GET_VERSION();
444  //Control type can be one out of "Comminocator","Other". Other methods means Keyboard or Joystick
445  public static bool IsActive {get; set;}
446  //reload the level if this is set true
447  public static bool EnableAudio {get; set;}
448 
449  }
450  #endregion
451 
452 
453  #region Lidar
454  public class LidarSchema
458  {
459  public string MsgType { get; set; } = "Lidar";
460  //Version of the sceme, IT will be same as the release version
461  public string Version {get;set;} = CommonFunctions.GET_VERSION();
462  //Control type can be one out of "Comminocator","Other". Other methods means Keyboard or Joystick
463  public string InputControlType {get;set;} = "Other";
464  // if transaction schema is active or not this is to reduce computation load in the update loops
465  public float Range {get; set;} = 100000f;
466  //reload the level if this is set true
467  public int Density {get; set;} = 360;
468  public bool IsActive {get; set;} = false;
469 
470  }
476  public static class StaticLidarSchema
477  {
478  public static string MsgType { get; set; } = "Lidar";
479  //Version of the sceme, IT will be same as the release version
480  public static string Version {get;set;} = CommonFunctions.GET_VERSION();
481  //Control type can be one out of "Comminocator","Other". Other methods means Keyboard or Joystick
482  public static string InputControlType {get;set;} = "Other";
483  // // if transaction schema is active or not this is to reduce computation load in the update loops
484  public static float Range {get; set;} = 100000f;
485  //reload the level if this is set true
486  public static int Density {get; set;} = 360;
487  public static bool IsActive {get; set;} = false;
488 
489  }
490  #endregion
491 
492  #region UIControls
493  public class UIControlsSchema
497  {
498  public string MsgType { get; set; } = "UIControls";
499  //Version of the sceme, IT will be same as the release version
500  public string Version {get;set;} = CommonFunctions.GET_VERSION();
501  //Control type can be one out of "Comminocator","Other". Other methods means Keyboard or Joystick
502  public bool ifExit {get;set;} = false;
503  // if transaction schema is active or not this is to reduce computation load in the update loops
504  }
509  {
510  public static string MsgType { get; set; } = "UIControls";
511  //Version of the sceme, IT will be same as the release version
512  public static string Version {get;set;} = CommonFunctions.GET_VERSION();
513  //Control type can be one out of "Comminocator","Other". Other methods means Keyboard or Joystick
514  public static bool ifExit {get;set;} = false;
515  // if transaction schema is active or not this is to reduce computation load in the update loops
516  }
517 
518  #endregion
519 
520  #region Fuel
521  public class FuelSchema
525  {
526  public string MsgType { get; set; } = "Fuel";
527  //Version of the sceme, IT will be same as the release version
528  public string Version {get;set;} = CommonFunctions.GET_VERSION();
529  //Control type can be one out of "Comminocator","Other". Other methods means Keyboard or Joystick
530  public string InputControlType {get;set;} = "Other";
531  // if transaction schema is active or not this is to reduce computation load in the update loops
532 
533 
534  }
535  #endregion
536 
537  #region Preset
538  public class PresetSchema
542  {
543  public string MsgType { get; set; } = "StartUp";
544  //Version of the sceme, IT will be same as the release version
545  public string Version {get;set;} = CommonFunctions.GET_VERSION();
546  // //set Airplane masss
547  public float AirplaneMass {get; set;} = 1000f;
548  //set Airplane fuel
549  public float Fuel {get; set;} = 61f;
550  //set Airplane fuel burnrate
551  public float FuelBurnRate {get; set;} = 6.1f;
552  //set Airplane start Location
553  public float StartLocation_x {get; set;} = 6.1f;
554  public float StartLocation_y {get; set;} = 6.1f;
555  public float StartLocation_z {get; set;} = 6.1f;
556  //set Airplane start Rotation
557  public float StartRotation_x {get; set;} = 6.1f;
558  public float StartRotation_y {get; set;} = 6.1f;
559  public float StartRotation_z {get; set;} = 6.1f;
560  }
566  public static class StaticStartUpSchema
567  {
568  public static string MsgType { get; set; } = "StartUp";
569  //Version of the sceme, IT will be same as the release version
570  public static string Version {get;set;} = CommonFunctions.GET_VERSION();
571  // //set Airplane masss
572  public static float AirplaneMass {get; set;} = 1000f;
573  //set Airplane fuel
574  public static float Fuel {get; set;} = 61f;
575  //set Airplane fuel burnrate
576  public static float FuelBurnRate {get; set;} = 6.1f;
577  //set Airplane start Location
578  public static float StartLocation_x {get; set;} = 6.1f;
579  public static float StartLocation_y {get; set;} = 6.1f;
580  public static float StartLocation_z {get; set;} = 6.1f;
581  //set Airplane start Rotation
582  public static float StartRotation_x {get; set;} = 6.1f;
583  public static float StartRotation_y {get; set;} = 6.1f;
584  public static float StartRotation_z {get; set;} = 6.1f;
585  }
586  #endregion
587 
588 
589 }
Communicator.OutputSchema
Output control class for serialization deserialization
Definition: IOSchema.cs:136
Communicator.TODSchema
Definition: IOSchema.cs:210
ClientInfo
It displays the IP and Port of the client
Definition: ClientInfo.cs:10
Communicator.StaticUIControlsSchema
UI control class for serialization deserialization
Definition: IOSchema.cs:508
Communicator.FuelSchema
Fuel class for serialization deserialization
Definition: IOSchema.cs:524
Communicator.StaticControlSchema.MsgType
static string MsgType
Just [PrimaryKey] is added to the Id Attribute as we only want the updated value and dont want to acc...
Definition: IOSchema.cs:49
Communicator.StaticControlSchema
Input control class, acts a dictionary. This class can be accessed anywhere in the code as dict....
Definition: IOSchema.cs:41
Communicator.Logger
Logger class for serialization deserialization
Definition: IOSchema.cs:194
Communicator
Definition: InputHandle.cs:10
Commons
Definition: AirplaneProperties.cs:14