Files
XRLib/Assets/Scripts/Base/AppMain.cs
2025-06-04 23:10:11 +09:00

52 lines
2.0 KiB
C#

using System.Collections.Generic;
using UnityEngine;
using UVC.Data;
using UVC.Log;
using UVC.network;
using UVC.Network;
using UVC.Tests;
namespace Base
{
public class AppMain : MonoBehaviour
{
// Start is called once before the first execution of Update after the MonoBehaviour is created
async void Start()
{
Tester.RunAllTests();
URLList.Add("baseinfo", "http://localhost:8888/baseinfo/00:00");
URLList.Add("AGV", "http://localhost:8888/AGV/00:00");
URLList.Add("STOCKER_STACK", "http://localhost:8888/STOCKER_STACK/00:00");
URLList.Add("CARRIER", "http://localhost:8888/CARRIER/00:00");
URLList.Add("EQUIPMENT", "http://localhost:8888/EQUIPMENT/00:00");
URLList.Add("PORT", "http://localhost:8888/PORT/00:00");
URLList.Add("RACK", "http://localhost:8888/RACK/00:00");
URLList.Add("TWIN_FORK", "http://localhost:8888/TWIN_FORK/00:00");
URLList.Add("HVC_PLC", "http://localhost:8888/HVC_PLC/00:00");
URLList.Add("HVC_CRANE", "http://localhost:8888/HVC_CRANE/00:00");
URLList.Add("ALARM", "http://localhost:8888/ALARM/00:00");
URLList.Add("Dashboard", "http://localhost:8888/Dashboard/00:00");
URLList.Add("SIMULATION_RANK", "http://localhost:8888/SIMULATION_RANK/00:00");
//Dictionary<string, string> headers = new Dictionary<string, string>();
//headers.Add("Content-Encoding", "gzip");
//string result = await HttpRequester.RequestPost<string>("http://localhost:8888/AGV/00:00", (string)null, headers);
//Debug.Log($"AGV Result: {result}");
//MQTTService mqttService = new MQTTService("localhost", 1883);
//mqttService.AddTopicHandler("AGV", (topic, message) =>
//{
// Debug.Log($"Received message on topic {topic}: {message}");
//});
//mqttService.Connect();
}
}
}