// Use this for initialization void Start() { mainManaer = GameObject.Find("MainManager").GetComponent <MainManager>(); aurora = GameObject.Find("Aurora").GetComponent <Aurora>(); aurora.SetActiveVerticalLooperAurora(true); }
// Use this for initialization protected virtual void Start() { mainManager = GameObject.Find("MainManager").GetComponent <MainManager>(); signalManager = GameObject.Find("SignalManager").GetComponent <SignalManager>(); prefabCreator = GameObject.Find("PrefabCreator").GetComponent <PrefabCreator>(); aurora = GameObject.Find("Aurora").GetComponent <Aurora>(); aurora.SetActiveLevelUpAurora(isLevelUpFailZone); }
public Boolean SetHue(string id, int v) { Aurora a = AuroraWrapper.GetAurorabySerial(id); if (v < a.NLJ.State.Hue.Min || v > a.NLJ.State.Hue.Max) { return(false); } a.Hue = v; return(true); }
static void Main() { var client = Aurora .CreateClient("leaf1.home") .WithAuthToken("9LXgJTxQRdDWwOsgShlxfBYP5s0retal"); RunBasicTests(client); RunStream <CameraBlockStreamer>(client).Wait(); End(); }
// Use this for initialization void Start() { mainManager = GameObject.Find("MainManager").GetComponent <MainManager>(); systemManager = GameObject.Find("SystemManager").GetComponent <SystemManager>(); screenNavigationManager = GameObject.Find("ScreenNavigationManager").GetComponent <ScreenNavigationManager>(); aurora = GameObject.Find("Aurora").GetComponent <Aurora>(); theBall = GameObject.Find("TheBall").GetComponent <Ball>(); theRacket = GameObject.Find("TheRacket").GetComponent <Racket>(); audioSource = GetComponent <AudioSource>(); }
public int SetColorTemperature(string id, int v) { Aurora a = AuroraWrapper.GetAurorabySerial(id); if (v > a.NLJ.State.ColorTemperature.Max || v < a.NLJ.State.ColorTemperature.Min) { return(0); } if (a.NLJ.State.ColorTemperature.Value != v) { a.ColorTemperature = v; } return(a.ColorTemperature); }
public int SetSaturation(string id, int v) { Aurora a = AuroraWrapper.GetAurorabySerial(id); if (v > a.NLJ.State.Saturation.Max || v < a.NLJ.State.Saturation.Min) { return(0); } if (a.NLJ.State.Saturation.Value != v) { a.Saturation = v; } return(a.Saturation); }
public int SetBrightness(string id, int v) { Aurora a = AuroraWrapper.GetAurorabySerial(id); if (v > a.NLJ.State.Brightness.Max || v < a.NLJ.State.Brightness.Min) { return(0); } if (a.NLJ.State.Brightness.Value != v) { a.Brightness = v; } return(a.Brightness); }
public AssetBase Build(Aurora.Framework.AssetBase asset) { AssetBase r = new AssetBase { CreatorID = asset.CreatorID.ToString(), Data = asset.Data, Description = asset.Description, Flags = asset.Flags, ID = asset.ID.ToString(), Name = asset.Name, Type = (sbyte) asset.Type }; return r; }
public Boolean RenameScenario(string id, string v) { Aurora a = AuroraWrapper.GetAurorabySerial(id); if (a == null || !v.Contains("@")) { return(false); } var sp = v.Split('@'); if (string.IsNullOrEmpty(sp[0]) || string.IsNullOrEmpty(sp[1])) { return(false); } return(a.RenameScenario(sp[0], sp[1])); }
public string SetSelectedScenario(string id, string v) { try { Aurora a = AuroraWrapper.GetAurorabySerial(id); if (a.Scenarios.Contains(v) && a.SelectedScenario != v) { a.SelectedScenario = v; } return(a.SelectedScenario); } catch (Exception ex) { return(ex.Message); } }
public async void Display() { var result = await ProbeForAuroras(); _aurora = new Aurora(result.IPAddress, "W3xbAQykPcUPVIKJ0Iv5QNPBU3vWPEOy"); var menu = new ContextMenuStrip(); var menuItems = await GetEffectMenuItems(); menu.Items.AddRange(menuItems.ToArray()); menu.Items.Add(new ToolStripSeparator()); menu.Items.Add(GetToggleItem()); _notify.ContextMenuStrip = menu; _notify.Visible = true; }
public async void Display() { var result = await ProbeForAuroras(); _aurora = new Aurora(result.IPAddress, "Qxs6JjRa4P2nANiZAYhClZmcslQfVl1t"); var menu = new ContextMenuStrip(); var menuItems = await GetEffectMenuItems(); menu.Items.AddRange(menuItems.ToArray()); menu.Items.Add(new ToolStripSeparator()); menu.Items.Add(GetToggleItem()); _notify.ContextMenuStrip = menu; _notify.Visible = true; }
public Boolean SetPowerState(string id, string v) { Boolean po; Aurora a = AuroraWrapper.GetAurorabySerial(id); Boolean.TryParse(v, out po); if (a == null) { return(false); } if (string.IsNullOrEmpty(v)) { return(a.PowerOn); } if (a.PowerOn != po) { a.PowerOn = po; } return(a.PowerOn); }
private async void ButtonConnect_Click(object sender, Windows.UI.Xaml.RoutedEventArgs e) { var ipAddress = TextBoxIpAddress.Text; var authToken = TextBoxAuthKey.Text; if (ipAddress == string.Empty || authToken == string.Empty) { var result = await AuroraHelper.ProbeForAuroras(); if (result != null) { var _aurora = new Aurora(result.IPAddress, "W3xbAQykPcUPVIKJ0Iv5QNPBU3vWPEOy"); var _effects = await _aurora.ListEffects(); foreach (var effect in _effects) { Console.WriteLine(effect); } return; } } var newDevice = new Aurora(ipAddress, authToken); Aurara = newDevice; var auroraInfo = await newDevice.GetInfo(); TextBoxInfoDump.Text = auroraInfo; var auroraDevice = await Json.ToObjectAsync <AuroraDevice>(auroraInfo); Console.WriteLine(auroraDevice.name); foreach (var effect in auroraDevice.effects.effectsList) { ListBoxEffects.Items?.Add(effect); } }
public void IncomingCapsRequest(UUID agentID, Aurora.Framework.Services.GridRegion region, ISimulationBase simbase, ref OSDMap capURLs) { m_agentID = agentID; m_region = region; m_userScopeIDs = simbase.ApplicationRegistry.RequestModuleInterface<IUserAccountService>().GetUserAccount(null, m_agentID).AllScopeIDs; m_gridService = simbase.ApplicationRegistry.RequestModuleInterface<IGridService>(); IConfig config = simbase.ConfigSource.Configs["MapCaps"]; if (config != null) m_allowCapsMessage = config.GetBoolean("AllowCapsMessage", m_allowCapsMessage); HttpServerHandle method = delegate(string path, Stream request, OSHttpRequest httpRequest, OSHttpResponse httpResponse) { return MapLayerRequest(request.ReadUntilEnd(), httpRequest, httpResponse); }; m_uri = "/CAPS/MapLayer/" + UUID.Random() + "/"; capURLs["MapLayer"] = MainServer.Instance.ServerURI + m_uri; capURLs["MapLayerGod"] = MainServer.Instance.ServerURI + m_uri; MainServer.Instance.AddStreamHandler(new GenericStreamHandler("POST", m_uri, method)); }
private void ScrollableRoot_RefreshStart(object sender, Aurora.Shared.Controls.RefreshStartEventArgs e) { var loader = new ResourceLoader(); UpdateIndText.Text = loader.GetString("RefreshStart"); Context.RefreshAsync(); }
public void IncomingCapsRequest(UUID agentID, Aurora.Framework.Services.GridRegion region, ISimulationBase simbase, ref OSDMap capURLs) { m_agentID = agentID; m_moneyModule = simbase.ApplicationRegistry.RequestModuleInterface<IMoneyModule>(); m_assetService = simbase.ApplicationRegistry.RequestModuleInterface<IAssetService>(); m_inventoryService = simbase.ApplicationRegistry.RequestModuleInterface<IInventoryService>(); m_libraryService = simbase.ApplicationRegistry.RequestModuleInterface<ILibraryService>(); m_inventoryData = Framework.Utilities.DataManager.RequestPlugin<IInventoryData>(); HttpServerHandle method = delegate(string path, Stream request, OSHttpRequest httpRequest, OSHttpResponse httpResponse) { return HandleWebFetchInventoryDescendents(request, m_agentID); }; string uri = "/CAPS/FetchInventoryDescendents/" + UUID.Random() + "/"; capURLs["WebFetchInventoryDescendents"] = MainServer.Instance.ServerURI + uri; capURLs["FetchInventoryDescendents"] = MainServer.Instance.ServerURI + uri; capURLs["FetchInventoryDescendents2"] = MainServer.Instance.ServerURI + uri; m_uris.Add(uri); MainServer.Instance.AddStreamHandler(new GenericStreamHandler("POST", uri, method)); method = delegate(string path, Stream request, OSHttpRequest httpRequest, OSHttpResponse httpResponse) { return HandleFetchLibDescendents(request, m_agentID); }; uri = "/CAPS/FetchLibDescendents/" + UUID.Random() + "/"; capURLs["FetchLibDescendents"] = MainServer.Instance.ServerURI + uri; capURLs["FetchLibDescendents2"] = MainServer.Instance.ServerURI + uri; m_uris.Add(uri); MainServer.Instance.AddStreamHandler(new GenericStreamHandler("POST", uri, method)); method = delegate(string path, Stream request, OSHttpRequest httpRequest, OSHttpResponse httpResponse) { return HandleFetchInventory(request, m_agentID); }; uri = "/CAPS/FetchInventory/" + UUID.Random() + "/"; capURLs["FetchInventory"] = MainServer.Instance.ServerURI + uri; capURLs["FetchInventory2"] = MainServer.Instance.ServerURI + uri; m_uris.Add(uri); MainServer.Instance.AddStreamHandler(new GenericStreamHandler("POST", uri, method)); method = delegate(string path, Stream request, OSHttpRequest httpRequest, OSHttpResponse httpResponse) { return HandleFetchLib(request, m_agentID); }; uri = "/CAPS/FetchLib/" + UUID.Random() + "/"; capURLs["FetchLib"] = MainServer.Instance.ServerURI + uri; capURLs["FetchLib2"] = MainServer.Instance.ServerURI + uri; m_uris.Add(uri); MainServer.Instance.AddStreamHandler(new GenericStreamHandler("POST", uri, method)); uri = "/CAPS/NewFileAgentInventory/" + UUID.Random() + "/"; capURLs["NewFileAgentInventory"] = MainServer.Instance.ServerURI + uri; m_uris.Add(uri); MainServer.Instance.AddStreamHandler(new GenericStreamHandler("POST", uri, NewAgentInventoryRequest)); uri = "/CAPS/NewFileAgentInventoryVariablePrice/" + UUID.Random() + "/"; capURLs["NewFileAgentInventoryVariablePrice"] = MainServer.Instance.ServerURI + uri; m_uris.Add(uri); MainServer.Instance.AddStreamHandler(new GenericStreamHandler("POST", uri, NewAgentInventoryRequestVariablePrice)); uri = "/CAPS/CreateInventoryCategory/" + UUID.Random() + "/"; capURLs["CreateInventoryCategory"] = MainServer.Instance.ServerURI + uri; m_uris.Add(uri); MainServer.Instance.AddStreamHandler(new GenericStreamHandler("POST", uri, CreateInventoryCategory)); }
public void SendPlacesQuery(Aurora.Framework.ExtendedLandData[] LandData, UUID queryID, UUID transactionID) { }
private string GetParentIDForRegion(Aurora.Framework.Services.GridRegion region) { lock (vlock) { string sceneUUID = region.RegionID.ToString(); lock (m_parents) if (m_parents.ContainsKey(sceneUUID)) return m_parents[sceneUUID]; string channelId; string sceneName = region.RegionName; // Make sure that all local channels are deleted. // So we have to search for the children, and then do an // iteration over the set of chidren identified. // This assumes that there is just one directory per // region. if (VivoxTryGetDirectory(sceneUUID + "D", out channelId)) { MainConsole.Instance.DebugFormat( "[VivoxVoice]: region {0}: uuid {1}: located directory id {2}", sceneName, sceneUUID, channelId); XmlElement children = VivoxListChildren(channelId); string count; if (XmlFind(children, "response.level0.channel-search.count", out count)) { int cnum = Convert.ToInt32(count); for (int i = 0; i < cnum; i++) { string id; if (XmlFind(children, "response.level0.channel-search.channels.channels.level4.id", i, out id)) { if (!IsOK(VivoxDeleteChannel(channelId, id))) MainConsole.Instance.WarnFormat( "[VivoxVoice] Channel delete failed {0}:{1}:{2}", i, channelId, id); } } } } else { if ( !VivoxTryCreateDirectory(sceneUUID + "D", sceneName, out channelId)) { MainConsole.Instance.WarnFormat( "[VivoxVoice] Create failed <{0}:{1}:{2}>", "*", sceneUUID, sceneName); channelId = String.Empty; } } // Create a dictionary entry unconditionally. This eliminates the // need to check for a parent in the core code. The end result is // the same, if the parent table entry is an empty string, then // region channels will be created as first-level channels. lock (m_parents) if (!m_parents.ContainsKey(sceneUUID)) m_parents.Add(sceneUUID, channelId); return channelId; } }
public UUID Store(Aurora.Framework.AssetBase asset) { AssetBase rasset = Build(asset); if ((asset.Flags & AssetFlags.Local) == AssetFlags.Local) { if (m_Cache != null) m_Cache.Cache(asset.IDString, asset); return asset.ID; } UUID newID = UUID.Zero; List<string> serverURIs = m_registry.RequestModuleInterface<IConfigurationService>().FindValueOf("AssetServerURI"); if (m_serverURL != string.Empty) serverURIs = new List<string>(new string[1] {m_serverURL}); foreach (string mServerUri in serverURIs) { string uri = mServerUri + "/"; try { string request = SynchronousRestObjectRequester.MakeRequest<AssetBase, string>("POST", uri, rasset); UUID.TryParse(request, out newID); } catch (Exception e) { MainConsole.Instance.WarnFormat("[ASSET CONNECTOR]: Unable to send asset {0} to asset server. Reason: {1}", asset.ID, e.Message); } if (newID != UUID.Zero) { // Placing this here, so that this work with old asset servers that don't send any reply back // SynchronousRestObjectRequester returns somethins that is not an empty string asset.ID = newID; if (m_Cache != null) m_Cache.Cache(asset.IDString, asset); } else return asset.ID; //OPENSIM } return newID; }
public void GetParcelChannelInfo(UUID avatarID, Aurora.Framework.Services.GridRegion region, string URL, out bool success, out UUID parcelID, out string parcelName, out int localID, out uint parcelFlags, out string ParentID) { ISyncMessagePosterService syncPoster = m_registry.RequestModuleInterface<ISyncMessagePosterService>(); OSDMap request = new OSDMap(); request["AvatarID"] = avatarID; request["Method"] = "GetParcelChannelInfo"; OSDMap response = null; syncPoster.Get(URL, request, resp => { response = resp; }); while (response == null) Thread.Sleep(5); success = response["Success"]; if (response["NoAgent"]) throw new NotSupportedException(); parcelID = response["ParcelID"]; parcelName = response["ParcelName"]; localID = response["LocalID"]; parcelFlags = response["ParcelFlags"]; ParentID = GetParentIDForRegion(region); }
static async Task <int> MainAsync(string[] args) { string address; string authToken; var parser = new FileIniDataParser(); try { IniData data = parser.ReadFile("Configuration.ini"); address = data["General"]["ipaddr"]; authToken = data["General"]["authToken"]; } catch { IniData data = new IniData(); data["General"]["ipaddr"] = "0.0.0.0"; data["General"]["authToken"] = "<INSERT KEY HERE>"; parser.WriteFile("Configuration.ini", data); Console.WriteLine("Please make sure Configuration.ini is properly configured."); return(1); } //var aurora = new Aurora("172.20.8.50", "Qxs6JjRa4P2nANiZAYhClZmcslQfVl1t"); var aurora = new Aurora(address, authToken); var shouldShowHelp = false; var dumpInfo = true; var listEffects = false; string newEffect = null; string mode = null; string details = null; string brightness = null; string hue = null; string saturation = null; string temperature = null; var options = new OptionSet { { "i|info", "Dump all accessible data from the Nanoleaf Aurora", i => dumpInfo = true }, { "h|help", "Show this message and exit", h => shouldShowHelp = true }, { "l|list", "List all effects", _l => listEffects = true }, { "e|setEffect=", "Set active effect", _e => newEffect = _e }, { "m|mode=", "Turn on/off the Aurora", _m => mode = _m }, { "d|details=", "Get effect details", _d => details = _d }, { "setBrightness=", "Set brightness of Aurora", _b => brightness = _b }, { "setHue=", "Set the hue of Aurora", _h => hue = _h }, { "setSaturation=", _s => saturation = _s }, { "setColorTemp=", _t => temperature = _t } }; List <string> extra; try { extra = options.Parse(args); } catch (OptionException ex) { Console.Write("aurora: "); Console.WriteLine(ex.Message); Console.WriteLine("Try `aurora --help` for more information."); return(1); } if (shouldShowHelp) { Console.WriteLine("Options:"); options.WriteOptionDescriptions(Console.Out); return(0); } if (dumpInfo) { var info = await aurora.GetInfo(); Console.WriteLine(info); return(0); } if (listEffects) { var effects = await aurora.ListEffects(); foreach (var e in effects) { Console.WriteLine(e); } return(0); } if (!string.IsNullOrEmpty(mode)) { switch (mode.ToLowerInvariant()) { case "on": await aurora.Enable(); break; case "off": await aurora.Disable(); break; default: Console.WriteLine("Mode not understood"); return(1); } } if (!string.IsNullOrEmpty(newEffect)) { await aurora.SetEffect(newEffect); } if (!string.IsNullOrEmpty(details)) { var effectDetails = await aurora.GetEffectDetails(details); Console.WriteLine(effectDetails); } if (!string.IsNullOrEmpty(brightness)) { int bright; if (!int.TryParse(brightness, out bright)) { Console.WriteLine("Could not parse brightness"); return(1); } await aurora.SetBrightness(bright); } if (!string.IsNullOrEmpty(hue)) { int h; if (!int.TryParse(hue, out h)) { Console.WriteLine("Could not parse hue: " + hue); return(1); } await aurora.SetHue(h); } if (!string.IsNullOrEmpty(saturation)) { int sat; if (!int.TryParse(saturation, out sat)) { Console.WriteLine("Could not parse saturation: " + saturation); return(1); } await aurora.SetSaturation(sat); } if (!string.IsNullOrEmpty(temperature)) { int temp; if (!int.TryParse(temperature, out temp)) { Console.WriteLine("Could not parse temperature: " + temperature); return(1); } await aurora.SetColorTemperature(temp); } return(0); }
public void IncomingCapsRequest(UUID agentID, Aurora.Framework.Services.GridRegion region, ISimulationBase simbase, ref OSDMap capURLs) { m_AgentID = agentID; m_assetService = simbase.ApplicationRegistry.RequestModuleInterface<IAssetService>(); m_j2kDecoder = simbase.ApplicationRegistry.RequestModuleInterface<IJ2KDecoder>(); m_getTextureURI = "/CAPS/GetTexture/" + UUID.Random() + "/"; capURLs["GetTexture"] = MainServer.Instance.ServerURI + m_getTextureURI; MainServer.Instance.AddStreamHandler(new GenericStreamHandler("GET", m_getTextureURI, ProcessGetTexture)); m_bakedTextureURI = "/CAPS/UploadBakedTexture/" + UUID.Random() + "/"; capURLs["UploadBakedTexture"] = MainServer.Instance.ServerURI + m_bakedTextureURI; MainServer.Instance.AddStreamHandler(new GenericStreamHandler("POST", m_bakedTextureURI, UploadBakedTexture)); m_getMeshURI = "/CAPS/GetMesh/" + UUID.Random() + "/"; capURLs["GetMesh"] = MainServer.Instance.ServerURI + m_getMeshURI; MainServer.Instance.AddStreamHandler(new GenericStreamHandler("GET", m_getMeshURI, ProcessGetMesh)); }
public String SetRandomScenario(string serial) { Aurora a = AuroraWrapper.GetAurorabySerial(serial); return(a.SetRandomScenario()); }
// Use this for initialization void Start() { aurora = GameObject.Find("Aurora").GetComponent <Aurora>(); aurora.SetActiveVerticalLooperAurora(false); }