Keyboard Shortcuts
Likes
- Crestron
- Messages
Search
Re: XML in vs2008
#simplsharp
¿ªÔÆÌåÓýHere is part of the code I wrote for reading xml data from a file for a module I have that tracks the angle and elevation of the sun, compares that with data for each window, and automates the operation of shades based on whether the sun is shining through a window or not. Hope this helps ??????? private bool Read_XML_Data(string xml_data_file, string
path) On 11/8/2022 12:54 PM, Bruce Levy via
groups.io wrote:
|
Re: XML in vs2008
#simplsharp
¿ªÔÆÌåÓýI was able to use XDocument on 3 series using Crestron.SimplSharp.CrestronXmlLinq; XDocument xdoc = XDocument.Parse(xmlString);
|
XML in vs2008
#simplsharp
I'm working with a device that returns an XML payload upon query.? I have this device working perfectly on 4 series BUT now I need to make this backwards compatible with 3 series (using vs2008 and CF 3.5) because of the processor shortage. I can't figure out what the best method is to manage and then deserialize the XML properly. What I'm doing on 4 series is deserializing using another class I created which doesn't exist in the CF 3.5 sandbox. Example Code on 4 Series: using (StreamReader sr = new StreamReader(s)) //"s" is my response stream from a webrequest
? ? ? ? ? ? ? ? ? ? ? ? ? ? {
? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? var xmlData = sr.ReadToEnd();? ? ? ? ? ? ? ? ? ? ? ? ? ??
? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? using (var ms = new MemoryStream(Encoding.UTF8.GetBytes(xmlData)))
? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? {
? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? XmlSerializer serializer = new XmlSerializer(typeof(ExampleDataModel), new XmlRootAttribute("data"));
? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ExampleDataModel?data = (ExampleDataModel) serializer.Deserialize(ms);
? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? }
? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? // do other stuff with my data ? ? ? ? ? ? ? ? ? ? ? ? ? ? }
Example of the XML return from my device <?xml version="1.0" encoding="UTF-8" ?>
<data serial="0x4a">
? ? <ts>1667580367</ts>
? ? <r t="P" n="Name2" did="2">
? ? ? ? <v>9215522798</v>
? ? ? ? <i>0</i>
? ? </r>
? ? <r t="P" n="Name3" did="3">
? ? ? ? <v>6551567803</v>
? ? ? ? <i>0</i>
? ? </r>
? ? <r t="P" n="Name15" did="15">
? ? ? ? <v>-6025876766</v>
? ? ? ? <i>6</i>
? ? </r>
? ? <r t="P" n="Name4" did="4">
? ? ? ? <v>-6372792531</v>
? ? ? ? <i>6</i>
? ? </r>
? ? <r t="P" n="Name5" did="5">
? ? ? ? <v>81964060</v>
? ? ? ? <i>-5</i>
? ? </r>
? ? <r t="P" n="Name6" did="6">
? ? ? ? <v>-664628793</v>
? ? ? ? <i>-9</i>
? ? </r>
? ? <r t="P" n="Name7" did="7">
? ? ? ? <v>-598632391</v>
? ? ? ? <i>-10</i>
? ? </r>
? ? <r t="P" n="Name9" did="9">
? ? ? ? <v>-7313215090</v>
? ? ? ? <i>-87</i>
? ? </r>
? ? <r t="P" n="Name10" did="10">
? ? ? ? <v>-2644948853</v>
? ? ? ? <i>-90</i>
? ? </r>
? ? <r t="P" n="Name11" did="11">
? ? ? ? <v>-1432490</v>
? ? ? ? <i>-3</i>
? ? </r>
? ? <r t="P" n="Name12" did="12">
? ? ? ? <v>-6767026506</v>
? ? ? ? <i>-444</i>
? ? </r>
? ? <r t="P" n="Name13" did="13">
? ? ? ? <v>-4801078066</v>
? ? ? ? <i>-228</i>
? ? </r>
? ? <r t="P" n="Name8" did="8">
? ? ? ? <v>-2331104692</v>
? ? ? ? <i>-104</i>
? ? </r>
? ? <r t="P" n="Name0" did="0">
? ? ? ? <v>40365273148</v>
? ? ? ? <i>747</i>
? ? </r>
? ? <r t="P" n="Name1" did="1">
? ? ? ? <v>36484275778</v>
? ? ? ? <i>569</i>
? ? </r>
</data>
Any help is greatly appreciated as I'm currently stuck. |
Re: AVpro Edge MXnet
I've been having some trouble with their SIMPL modules as well. Routing works well but we ran into problems with the CBox locking up when there's large amount of traffic over the serial communications modules. I also found out that you can't use the MXNet modules with the latest certified drivers due to library version conflicts. I have tickets for both issues open but I haven't heard back from them in a while. AVPro Edge did say they? reached out to Janus to update the libraries, though.
|
Re: looking for programmer/source code - Ottawa Westin hotel confederation rooms
Master He
That's me, funny. 14 years later.
On Tuesday, November 8, 2022 at 06:41:09 a.m. PST, mark kaye <markkaye@...> wrote:
C:\Documents and Settings\Anthony\Desktop\My Documents 2008\Projects 2008\Westin Hotel\Westin Project 2008\MC2E programmer name was Cheng |
Hi all, Fairly new to Crestron here. I'm trying to put together a splus module for a DSP device (DSP-AEC-1010-DA by TiGHT/Septon) which will communicate through RS232/485 (or UDP, same format regardless) Three questions:
Thank you, Rasmus |
Re: How to store files on VC4?
I use GetApplicationRootDirectory to create my path URL. That way it doesn't matter where the code runs, the path is always correct. From the help file... ? ? ? ? // Summary:
? ? ? ? //? ? ?Returns the application's 'root' directory. This is where NVRAM and HTML folders
? ? ? ? //? ? ?can be found. No trailing directory separator at the end.
? ? ? ? //
? ? ? ? // Returns:
? ? ? ? //? ? ?The path of this applications 'root' as a string. For appliances, this would
? ? ? ? //? ? ?be ""; for servers, this would be the "{HOME}/RunningPrograms/RoomName".
?
string FileName = "NameOfFile";
string FilePath = Path.Combine(Directory.GetApplicationRootDirectory(), $@"User");
if (!Directory.Exists(FilePath))
{
? ? Directory.CreateDirectory(FilePath);
}
string FileURL = Path.Combine(FilePath, FileName);
ErrorLog.Notice($"File URL = {FileURL}");
if (File.Exists(FileURL))
{
? ? // Do stuff if the file is found
}
I hope this helps. |
Re: Rear Projectors
I'd look at the Sony Home theater units.?
They look great, are easy to control, have HUGE adjustments for mounting w/o keystone, etc. etc... "Runco (don¡¯t they make the rotisserie chicken thing that was every other infomercial in the 1990s?)?" And yes Lincoln, but that was RONCO (i.e. Ron Popeil, also the inventor of the pocket fisherman...My Favorite...)...It's almost the same!..HaHA...:) |
Re: Rear Projectors
I agree ... I don't think that I've ever seen a modern projector without the 4 different position options.
As far as quality projectors go, you can't go wrong with the JVC DLA-NZx or DLA-RSxxxx series. For a similar price as the Runco VX-2i, you'd be wise to consider the NZ8 or RS3100. If you are willing to go a bit more, then there aren't many projectors that can come close to the performance of the DLA-NZ9/RS4100 for anywhere near its price. It's very likely that modern projectors will really show off any imperfections in older screens. Good luck, Brian |
Re: AVpro Edge MXnet
Hi Scott,
Please reach out directly to me. I oversee the team who manages the drivers and interact with Janus. chein@... Cody |