Keyboard Shortcuts
Likes
- Crestron
- Messages
Search
S+ Delegates
Is it possible to add a Simpl+ function to a delegate in SIMP#?
It's currently being done using "RegisterDelegate" in simpl+ but if we use that in a scenario with a static class or a singleton class, with multiple simpl+ modules, then all the simpl+ modules get a callback... i'd rather callback only simpl+ modules that have a certain variable value or parameter. public?static?class?SomeSimplSharpModule
{
??public?delegate?DelegateForSimplSharp(ushort?somedata,?SimplSharpString?somestring);
??public?DelegateForSimplSharp?DoSimplSharpFunction?{get;?set;}
??
??private?void?SomeFunctionThatCallsSimplSharpFunction()
??{
????int?data?=?1234;
????string?str?=?"hello?world";
????if?(DoSimplSharpFunction?!=?null)
????{
??????//What?I?want?to?do?here?is?know?which?SIMPL+?modules?are?registered?to?the?delegate
??????//and?only?invoke?specific?ones.
??????DoSimplSharpFunction(Convert.ToUInt16(data),new?SimplSharpString(somestring));
????}
??}
??
??static?SomeSimplSharpModule()
??{
????SomeFunctionThatCallsSimplSharpFunction();
??}
??
??public?void?Register(delegate?SimplSharpMemberDelegate,?delegate?SimplPlusFunction)
??{
????//add?the?simpl+?function
????//maybe?something?like
????//SimplSharpMemberDelegate?+=?SimplPlusFunction;
??}
}
SYMBOL_NAME?"SimplPlusModule"
STRING_PARAMETER?somestringparameter[15];
CALLBACK?FUNCTION?SimplPlusFunction(integer?data,?string?sometring)
{
??trace("\nData:%u",data);
??trace("\nStr?:%s",sometring);
}
FUNCTION?Main()
{
??RegisterDelegate(SomeSimplSharpModule,DoSimplSharpFunction,SimplPlusFunction);
??//what?i?want?to?do?here?register?this?delegate?with?a?certain?parameter.
??//maybe?something?like?SomeSimplSharpModule.Register(somestringparameter,DoSimplSharpFunction,SimplPlusFunction)
}
|
Re: Vitec EZ TV IPTV Control
Yup we had to use S# to do the?HTTPS REST.
I didn't know about REST at the time so i just made a generic module that used HTTPS/TCP client with proper headers. Call Vitec they'll help you out and point you in the right direction. Also use Postman to see and form your post/get requests correctly. And see the responses. https://www.postman.com/product/rest-client/ All communication is done with the server and not the endpoints. You can control the endpoints' channel using the server. So if you have multiple processors they'll all be talking to the server. |
Any word on beta testing for the VTPro-e alternative "Onmi" showed in Masters?
#crestron
Would be really interested in beta testing the app, has there been any official word on it?
Thanks. *Omni typo. sorry. |
Re: Audio-Technica ATDM-0604 Mixer IP Control
Do you have the manufacturers commands?? Probably easier to go with an sio for only 3 controls.? On Wed, Jun 16, 2021, 3:53 PM Rick Arnold <rick.arnold@...> wrote: I am very much out of my element here with this one.? I do not know how to write S+ code so I wondering if anyone has ever controlled one of these before.? I am not looking for much other than volume up/down/mute on an output channel. |
Re: Vitec EZ TV IPTV Control
You'll need to do this in S#. You'll want to know how to make HTTPS requests, handle JSON data, and deal with authorization. I had to sign an NDI to get their API so I can't share?my code, but their API works well for me. If you have any specific questions, I may be?able to help address those. -Dustin |
Vitec EZ TV IPTV Control
Has anyone worked with Vitec's EZ TV products?? I reached out to their engineers, but I'm still trying to get my head around how to interface with their Web API.? I would appreciate any information on how to manage the Crestron side of the communication, or an actual program I could look over.
Thanks |
Re: Modules exhibit weird behavior after recompile
¿ªÔÆÌåÓýWhoops sorry, yes, here goes.? ? On one of the instances, the original configuration gave feedback as to the state of 3rd party lighting controls.? After the re-compile, the controls still worked but the feedback would experience random changes (feedback would react as expected when the lighting circuits were first changed but then after a few seconds, the feedback would change to an off indication (the lighting wasn¡¯t off, just the feedback, digital signals). ? On the second instance, the original configuration gave feedback on the tank levels from an RV.? With this scenario, after the re-compile, the feedback would read correctly for a while and then read random values for a few seconds and then change back (analog signals). ? But, if I went back and installed the older version of the program, everything would work exactly as expected on both systems.? ? I hope this makes sense. ? Thanks, DAVE ? From: [email protected] <[email protected]> On Behalf Of Thorsten K?hler
Sent: Wednesday, June 16, 2021 1:29 AM To: [email protected] Subject: Re: [crestron] Modules exhibit weird behavior after recompile ? Hi, it would help if you could describe the ¡°unpredictable behaviour¡± a bit more in detail. ? ? Cheers, Thorsten ? Von: [email protected] <[email protected]> Im Auftrag von F David A Coker ? Hey Crew, I have a weird scenario that I have been experiencing on a couple of my jobs.? I have an existing program on a CP3N that works just fine.? I recompile it with the latest databases etc. and now it exhibits unpredictable behavior.? This has happened twice in the last week.? Does anyone have any suggestions?? By the way, the program has not changed at all, just a recompile with the latest files.? Oh and the module was a S+ module on both scenarios. |
Re: 2 CP3N on different VLANS with control subnet ports connected to
¿ªÔÆÌåÓýPlenty of sources on Google Shopping: ? Note that that¡¯s definitely not the only option to add USB to a Crestron processor ¨C any USB-Ethernet adaptor with the proper chipset should work ? -- Lincoln King-Cliby, CTS, DMC-E-4K/T/D ? From: [email protected] [mailto:[email protected]]
On Behalf Of joseignacio@...
Sent: Wednesday, June 16, 2021 7:50 AM To: [email protected] Subject: Re: [crestron] 2 CP3N on different VLANS with control subnet ports connected to ? hi |
Re: Trouble with Newtonsoft
toggle quoted message
Show quoted text
Hi Jay, |
Re: CP4 versiports "locking up"
¿ªÔÆÌåÓýHi, ? got feedback from TB. They looked into the logs and found some entries where heatbeat was lost to the io controller forcing a restart. However, the reason is unclear. They are running my program on a lab processor, but I think chances are low that the issue will occour because it happens rarely. However, they suggested to upgrade fw to the latest ¨C indeed the fw i?m running on this device was pretty old and there are some mentions of fixes with regards to the IOP in some of the release notes. ? Cheers, Thorsten ? Von: thorsten.koehler@... <thorsten.koehler@...> ? Hi, ? thanks for all the responses. I?ve opened a ticket with TB, ticket numer ? To those who also have the same issue: Could you please open a ticket as well if not done already? I?d prefer to have that fixed rather than swapping out the control processor ? ? Thanks, Thorsten ? Von: [email protected] <[email protected]> Im Auftrag von Oliver Pemberton ? I'm glad it's not just me. I have seen IR just stop working on a CP4 until a reboot. In fact 2 out of 3 jobs where we replaced a 3 series with a 4 series we've ended up putting the 3 series back in to maintain reliability. ? OP |
Re: Modules exhibit weird behavior after recompile
¿ªÔÆÌåÓýHi, it would help if you could describe the ¡°unpredictable behaviour¡± a bit more in detail. ? ? Cheers, Thorsten ? Von: [email protected] <[email protected]> Im Auftrag von F David A Coker ? Hey Crew, I have a weird scenario that I have been experiencing on a couple of my jobs.? I have an existing program on a CP3N that works just fine.? I recompile it with the latest databases etc. and now it exhibits unpredictable behavior.? This has happened twice in the last week.? Does anyone have any suggestions?? By the way, the program has not changed at all, just a recompile with the latest files.? Oh and the module was a S+ module on both scenarios. |
Trouble with Newtonsoft
Having a problem using newtonsoft to parse some very simple json.? The json is as follows:
JSON = {"acState": {"timestamp": {"time": "2021-06-16T02:43:50.929326Z", "secondsAgo": 0}, "on": true, "mode": "fan", "fanLevel": "low", "light": "on"}} In my S# I have the following class ??? public class acState ??? { ??? ??? public bool on { get; set; } ??? ??? public string fanLevel{ get; set; } ??? ??? public string light{ get; set; } ??? ??? //mode and the timestamp are omitted because I don't care about their values ??? } I'm parsing with the following. ??? ??? ??? ??? acState Data = JsonConvert.DeserializeObject<acState>(JSON); However when I do some CrestronConsole.PrintLine statements to view the elements of the class the bool on is set to false and the other elements are empty.? No error is being thrown. I know it has to be something basic that I'm just having trouble seeing.? Any ideas would be greatly appreciated. Thanks in advance for the help Jay |