tres n3L
imho, there is no such thing as an "empty" string. all data has bytes.
toggle quoted message
Show quoted text
From: Crestron@... [mailto:Crestron@...] On Behalf Of Lincoln King-Cliby Sent: Monday, April 02, 2012 4:32 PM To: 'Crestron@...' Subject: RE: [Crestron] Re: Dumb Serial Empty String Question Steve, \x00 is not the same as an empty string -- it's a string with one byte with all bits set to 0. (it's a case of "something" being "nothing" or "nothing" being "something" :) ) As much as it strikes me as dirty-esque I think the best bet is a S+ module that looks at the length of the string (e.g. IF(LEN(input$) = 0) ) Lincoln -- Lincoln King-Cliby, CTS Sr. Systems Architect ControlWorks Consulting, LLC V: 440.449.1100 x1107 F: 440.449.1106 I: Crestron Authorized Independent Programmer -----Original Message-----
From: Crestron@... <mailto:Crestron%40yahoogroups.com> [mailto:Crestron@... <mailto:Crestron%40yahoogroups.com> ] On Behalf Of highfidelityinc Sent: Monday, April 02, 2012 4:05 PM To: Crestron@... <mailto:Crestron%40yahoogroups.com> Subject: [Crestron] Re: Dumb Serial Empty String Question Let me preface this by saying I have not tried this. But I think the following work work. 1) An Serial to Analog symbol (OP103) with a parameter of 0200h. That would convert every serial character to a sequence of analog equivalents. You would then look for an analog zero on the output. 2) SIMPL+ solution. You would look for the \x00 character in the input buffer. 3) An ASCII Serial Decoder symbol (ASCIIDecode). It has an \x00 output. But it would require an SMV to hit the dial input in order to get a pulse on this output. Per help, you need a SRAM symbol too. This would be the most iffy solution as it is meant to interface to an ASCII Keypad symbol. But it might work. Steve --- In Crestron@... <mailto:Crestron%40yahoogroups.com> , "Heather Baiman" <heather@...> wrote: ------------------------------------ * **** Check out the Files area for useful modules, documents, and drivers. A contact list of Crestron dealers and programmers can be found in the Database area. * ****Yahoo! Groups Links |