Example #1
0
        public List <DVRSessionItem> GetSessionList()
        {
            if (!this.IsConnected)
            {
                throw new InvalidOperationException("Not connected! Please connect to the server first");
            }

            this.SendData("session/list", null);

            DVRClientPacketArrayResponse <DVRSessionItem> responseObj = this.ReveiveData <DVRClientPacketArrayResponse <DVRSessionItem> >();

            return(responseObj.data);
        }
Example #2
0
        public void FindNode(string name_)
        {
            try
            {
                DVRClientPacketArrayResponse <DVRFindNodeResult> result = this.SendAndReceiveData <DVRClientPacketArrayResponse <DVRFindNodeResult> >(new DVRClientPacket <DAbstract>() // create VRClient Packet
                {
                    id   = "scene/node/find",
                    data = new DVRFindNodePacket // Create Find Node Packet
                    {
                        name = name_
                    }
                });;;

                if (result?.status != "error")
                {
                    Console.WriteLine($"Node info: {result.data[0].uuid}");
                    nodeList.Add(name_, result.data[0].uuid);
                }
            }
            catch (VRClientException ex)
            {
                Console.WriteLine($"Delete Node failed: {ex.Message}");
            }
        }