The following SIMPL+ solution should work if the MMS-2 is putting out a zero length string.
STRING_INPUT InStr$[255];
DIGITAL_OUTPUT NullString;
CHANGE InStr$
{
if (!len(InStr$))
{
pulse(10, NullString);
}
}
toggle quoted message
Show quoted text
--- In Crestron@..., Lincoln King-Cliby <lincoln@...> wrote:
Perhaps "zero-length string" is the more appropriate description. (\x00 would still be a 1-length string)
--
Lincoln King-Cliby, CTS
Sr. Systems Architect | Crestron Certified Programmer (Silver)
ControlWorks Consulting, LLC
V: 440.449.1100 x1107 | F: 440.449.1106 | I:
Crestron Authorized Independent Programmer
-----Original Message-----
From: Crestron@... [mailto:Crestron@...] On Behalf Of erikm_101
Sent: Monday, April 02, 2012 4:55 PM
To: Crestron@...
Subject: [Crestron] Re: Dumb Serial Empty String Question
is not lack of data, also data? ergo data with no bytes?
--- In Crestron@..., "tres n3L" <tres@> wrote:
imho, there is no such thing as an "empty" string. all data has bytes.
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:
I feel like I should and or do know this yet can't get this right.
I'm looking to detect an empty string from a MMS-2 via a SIO. Double
quotes doesn't work, neither does \x00.
In particular, I am looking for when the first browse line of text
coming from an MMS-2 is blank/empty. I want to enact other code when I
detect this.
When using their Rhapsody interface, if you employ a layout on a large
touchpanel that is able to show the transports, current song meta data
and the browse list full time (instead of subpaging it to death) after
making a final selection on the Rhapsody source, the MMS clears the
strings on the browse list. In my opinion, it looks like it did
something wrong as opposed to just keeping you on the browse page you
were actually browsing. I can make it repopulate by pressing the 'back'
button when I see the empty string come in.
How do I detect the emptiness?
Heather Baiman
heather@
Electronic Environments
247 W. 37th
New York, NY 10018
Phone (212)997-1110
Fax (212)997-0474
[Non-text portions of this message have been removed]
------------------------------------
*
****
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
[Non-text portions of this message have been removed]
------------------------------------
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