public structWeatherStation()
 {
     PexPreConstructorParameterless();
     _StationICAO = Vortex.Connector.IConnectorFactory.CreateSTRING();
     StationICAO.AttributeName   = "<#Station name (ICAO)#>";
     _StationStatus              = Vortex.Connector.IConnectorFactory.CreateINT();
     StationStatus.AttributeName = "<#Station status#>";
     _DewPoint = Vortex.Connector.IConnectorFactory.CreateREAL();
     DewPoint.AttributeName  = "<#Dew Point#>";
     DewPoint.AttributeUnits = "°C";
     _Pressure = Vortex.Connector.IConnectorFactory.CreateREAL();
     Pressure.AttributeName  = "<#Pressure#>";
     Pressure.AttributeUnits = "Torr";
     _Temp = Vortex.Connector.IConnectorFactory.CreateREAL();
     Temp.AttributeName         = "<#Temperature#>";
     Temp.AttributeUnits        = "°C";
     _Visibility                = Vortex.Connector.IConnectorFactory.CreateREAL();
     Visibility.AttributeName   = "<#Visibility#>";
     Visibility.AttributeUnits  = "km";
     _WindHeading               = Vortex.Connector.IConnectorFactory.CreateUINT();
     WindHeading.AttributeName  = "<#Wind heading#>";
     WindHeading.AttributeUnits = "Azimuth";
     _WindSpeed = Vortex.Connector.IConnectorFactory.CreateREAL();
     WindSpeed.AttributeName  = "<#Wind speed#>";
     WindSpeed.AttributeUnits = "m/s";
     AttributeName            = "";
     PexConstructorParameterless();
 }
示例#2
0
 public structWeatherStation(Vortex.Connector.IVortexObject parent, string readableTail, string symbolTail)
 {
     this.@SymbolTail = symbolTail;
     this.@Connector  = parent.GetConnector();
     this.@ValueTags  = new System.Collections.Generic.List <Vortex.Connector.IValueTag>();
     this.@Parent     = parent;
     _humanReadable   = Vortex.Connector.IConnector.CreateSymbol(parent.HumanReadable, readableTail);
     this.Kids        = new System.Collections.Generic.List <Vortex.Connector.IVortexElement>();
     this.@Children   = new System.Collections.Generic.List <Vortex.Connector.IVortexObject>();
     PexPreConstructor(parent, readableTail, symbolTail);
     Symbol       = Vortex.Connector.IConnector.CreateSymbol(parent.Symbol, symbolTail);
     _StationICAO = @Connector.Online.Adapter.CreateSTRING(this, "<#Station name (ICAO)#>", "StationICAO");
     StationICAO.AttributeName   = "<#Station name (ICAO)#>";
     _StationStatus              = @Connector.Online.Adapter.CreateINT(this, "<#Station status#>", "StationStatus");
     StationStatus.AttributeName = "<#Station status#>";
     _DewPoint = @Connector.Online.Adapter.CreateREAL(this, "<#Dew Point#>", "DewPoint");
     DewPoint.AttributeName  = "<#Dew Point#>";
     DewPoint.AttributeUnits = "°C";
     _Pressure = @Connector.Online.Adapter.CreateREAL(this, "<#Pressure#>", "Pressure");
     Pressure.AttributeName  = "<#Pressure#>";
     Pressure.AttributeUnits = "Torr";
     _Temp = @Connector.Online.Adapter.CreateREAL(this, "<#Temperature#>", "Temp");
     Temp.AttributeName         = "<#Temperature#>";
     Temp.AttributeUnits        = "°C";
     _Visibility                = @Connector.Online.Adapter.CreateREAL(this, "<#Visibility#>", "Visibility");
     Visibility.AttributeName   = "<#Visibility#>";
     Visibility.AttributeUnits  = "km";
     _WindHeading               = @Connector.Online.Adapter.CreateUINT(this, "<#Wind heading#>", "WindHeading");
     WindHeading.AttributeName  = "<#Wind heading#>";
     WindHeading.AttributeUnits = "Azimuth";
     _WindSpeed = @Connector.Online.Adapter.CreateREAL(this, "<#Wind speed#>", "WindSpeed");
     WindSpeed.AttributeName  = "<#Wind speed#>";
     WindSpeed.AttributeUnits = "m/s";
     AttributeName            = "";
     parent.AddChild(this);
     parent.AddKid(this);
     PexConstructor(parent, readableTail, symbolTail);
 }