¿ªÔÆÌåÓý

ctrl + shift + ? for shortcuts
© 2025 Groups.io

Dumb Serial Empty String Question


Heather Baiman
 

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


 

I've used the method described in this previous thread, and it works great -
. Thanks go to erikm.

--- On Monday, April 02, 2012 at 3:37 PM, Heather Baiman 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


 

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@..., "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 &#92;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]


Jeremy Weatherford
 

Try it, you'll see that it doesn't work. &#92;x00 is not an empty string,
it's a string with length 1 containing the character &#92;x00.

On Mon, Apr 2, 2012 at 4:05 PM, highfidelityinc <steve54@...> wrote:
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 &#92;x00 character in the input buffer.

3) An ASCII Serial Decoder symbol (ASCIIDecode). ?It has an &#92;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@..., "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 &#92;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









------------------------------------



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




--
Jeremy Weatherford


 

Steve,

&#92;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@...] On Behalf Of highfidelityinc
Sent: Monday, April 02, 2012 4:05 PM
To: Crestron@...
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 &#92;x00 character in the input buffer.

3) An ASCII Serial Decoder symbol (ASCIIDecode). It has an &#92;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@..., "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 &#92;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


tres n3L
 

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,

&#92;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 &#92;x00 character in the input
buffer.

3) An ASCII Serial Decoder symbol (ASCIIDecode). It has an &#92;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 &#92;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






------------------------------------

*
****

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


 

The Mirage Module isn't locked so you can go in and root around to see what it's doing and if you want change it you can.

--- In Crestron@..., "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 &#92;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]


erikm_101
 

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,

&#92;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 &#92;x00 character in the input
buffer.

3) An ASCII Serial Decoder symbol (ASCIIDecode). It has an &#92;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 &#92;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






------------------------------------

*
****

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]


 

Perhaps "zero-length string" is the more appropriate description. (&#92;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,

&#92;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 &#92;x00 character in the input
buffer.

3) An ASCII Serial Decoder symbol (ASCIIDecode). It has an &#92;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 &#92;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






------------------------------------

*
****

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


 

If the MMS-2 is truely putting out a &#92;x00 instead of a &#92;x01&#92;x00, then that is a firmware bug in the MMS-2 IHMO. But I did not see that Heather specificially say that in her original email.

--- In Crestron@..., Lincoln King-Cliby <lincoln@...> wrote:

Perhaps "zero-length string" is the more appropriate description. (&#92;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,

&#92;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 &#92;x00 character in the input
buffer.

3) An ASCII Serial Decoder symbol (ASCIIDecode). It has an &#92;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 &#92;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






------------------------------------

*
****

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









------------------------------------



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


 

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);
}
}

--- In Crestron@..., Lincoln King-Cliby <lincoln@...> wrote:

Perhaps "zero-length string" is the more appropriate description. (&#92;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,

&#92;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 &#92;x00 character in the input
buffer.

3) An ASCII Serial Decoder symbol (ASCIIDecode). It has an &#92;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 &#92;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


Heather Baiman
 

In debugger the browse strings just show up as <empty>

I used the "substring with empty string pass" symbol as suggested by Tony and for the moment just threw a 1 and 5 in the parameter fields. It appeared to be working, but I put myself in a loop when I rebooted, since the unit starts up with empty browse lines. I'll have to add some more logic to it tomorrow.

Thanks guys.

________________________________

From: Crestron@... on behalf of highfidelityinc
Sent: Mon 4/2/2012 5:19 PM
To: Crestron@...
Subject: [Crestron] Re: Dumb Serial Empty String Question



If the MMS-2 is truely putting out a &#92;x00 instead of a &#92;x01&#92;x00, then that is a firmware bug in the MMS-2 IHMO. But I did not see that Heather specificially say that in her original email.

--- In Crestron@..., Lincoln King-Cliby <lincoln@...> wrote:

Perhaps "zero-length string" is the more appropriate description. (&#92;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,

&#92;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 &#92;x00 character in the input
buffer.

3) An ASCII Serial Decoder symbol (ASCIIDecode). It has an &#92;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 &#92;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



------------------------------------



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


 

A string is what resides in the RAM allocated to hold that string. If that RAM space has no data, it is an empty string.

--- 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,

&#92;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 &#92;x00 character in the input
buffer.

3) An ASCII Serial Decoder symbol (ASCIIDecode). It has an &#92;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 &#92;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






------------------------------------

*
****

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]


rickmcneely
 

I don't know how you would search for nothing. Am I missing something? Probably.

A string is a string unless it is a string. A C style string is terminated with a &#92;x00. If there is nothing before the &#92;x00 then it is considered to be a zero-length string. Inserting a &#92;x00 in the middle of a C string would be exactly the same as changing the length.

Some strings (like windows OLE strings or 'The OTHER control system' strings) are actually a structure containing a character array and a length, or some variation. In strings like that, the length of the string is determined by the length property, and not by some marker byte like &#92;x00.

But usually, devices don't send either type of string. The control system just stores whatever is received in some type of string. Could be either of the above or some variation. Usually the controlled system delimits lines with some type of ETX and/or STX. Usually just the ETX and usually that is a carriage-return or carriage-return/line-feed. In that case, a line containing only the ETX would be considered empty.


Chip
 

If memory serves, every location designated as a string starts with a length byte that is typically "hidden" from us - so a "string with no length" still takes up a single byte of memory - the byte required to represent the lack of length. :)

- Chip

--- In Crestron@..., "lincster2010" <lincster2010@...> wrote:

A string is what resides in the RAM allocated to hold that string. If that RAM space has no data, it is an empty string.

--- 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,

&#92;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 &#92;x00 character in the input
buffer.

3) An ASCII Serial Decoder symbol (ASCIIDecode). It has an &#92;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 &#92;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]


Jeremy Weatherford
 

Crestron doesn't use (or at least doesn't expose) C-style strings,
though, otherwise it would be awkward to deal with device protocols
containing &#92;x00. It's perfectly possible to have an empty string, and
easy to work with them in SIMPL+ (string = "" or len(string) = 0),
it's just a little trickier to deal with in SIMPL-land since it
doesn't "match" anything in an SIO.

On Tue, Apr 3, 2012 at 9:44 AM, rickmcneely <rickmcneely@...> wrote:


I don't know how you would search for nothing. ?Am I missing something? ?Probably.

A string is a string unless it is a string. ?A C style string is terminated with a &#92;x00. ?If there is nothing before the &#92;x00 then it is considered to be a zero-length string. ?Inserting a &#92;x00 in the middle of a C string would be exactly the same as changing the length.

Some strings (like windows OLE strings or 'The OTHER control system' strings) are actually a structure containing a character array and a length, or some variation. ?In strings like that, the length of the string is determined by the length property, and not by some marker byte like &#92;x00.

But usually, devices don't send either type of string. ?The control system just stores whatever is received in some type of string. ?Could be either of the above or some variation. ?Usually the controlled system delimits lines with some type of ETX and/or STX. ?Usually just the ETX and usually that is a carriage-return or carriage-return/line-feed. ?In that case, a line containing only the ETX would be considered empty.




------------------------------------



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




--
Jeremy Weatherford


Jeremy Weatherford
 

The other differentiation that's important to make is that while you
can't "send" an empty string over a 232 or TCP* connection (unless you
have a delimiter defined and consider that to be "empty"), empty
strings can and do exist in memory.

[*]You** can send an empty TCP packet, but it functions identically to
an ACK/Keepalive and doesn't send any info up to the application
layer, as no data was transmitted -- TCP is byte-oriented.

[**]Meaning the TCP/IP stack, not from SIMPL or SIMPL+.

On Tue, Apr 3, 2012 at 9:59 AM, Jeremy Weatherford <jweather@...> wrote:
Crestron doesn't use (or at least doesn't expose) C-style strings,
though, otherwise it would be awkward to deal with device protocols
containing &#92;x00. ?It's perfectly possible to have an empty string, and
easy to work with them in SIMPL+ (string = "" or len(string) = 0),
it's just a little trickier to deal with in SIMPL-land since it
doesn't "match" anything in an SIO.

On Tue, Apr 3, 2012 at 9:44 AM, rickmcneely <rickmcneely@...> wrote:


I don't know how you would search for nothing. ?Am I missing something? ?Probably.

A string is a string unless it is a string. ?A C style string is terminated with a &#92;x00. ?If there is nothing before the &#92;x00 then it is considered to be a zero-length string. ?Inserting a &#92;x00 in the middle of a C string would be exactly the same as changing the length.

Some strings (like windows OLE strings or 'The OTHER control system' strings) are actually a structure containing a character array and a length, or some variation. ?In strings like that, the length of the string is determined by the length property, and not by some marker byte like &#92;x00.

But usually, devices don't send either type of string. ?The control system just stores whatever is received in some type of string. ?Could be either of the above or some variation. ?Usually the controlled system delimits lines with some type of ETX and/or STX. ?Usually just the ETX and usually that is a carriage-return or carriage-return/line-feed. ?In that case, a line containing only the ETX would be considered empty.




------------------------------------



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




--
Jeremy Weatherford


--
Jeremy Weatherford