Tuesday, July 6, 2010

Trouble with long text strings...

0 comments
Hi Jarrod -

Very excited about iPad control development. I ran into a snag.

Long text strings from Crestron are only displaying the tail end of
the string.

The strings are coming from WMC MyMovies via Autonomic Controls IP
Processor v2.4.

At first I thought the \xFE\x02 inserted every 100 characters was the
problem BUT I edited line 870 of their code and the problem persists.
Without the \xFE\x02 both the xPanel and iPad display the same; only
showing the tail end of the string.

With the \xFE\x02 in the strings the xPanel works BUT the iPad only
displays text after the LAST \xFE\x02.

Below are SNIPs from debugger, the suspect code and AC's response.

What are your thoughts? Probably very simple; tried word wrap, etc...

Thanks,

Brad Norman

Verohomie @ Skype

UNMODIFIED INCOMING STRING FROM MCS
==================================
16:43:59 - 07-06-2010: MCS_TX$ -> GetMovieProperties
4b3679ef-7126-4d3b-bc27-9222592e3982\x0D\x0A
16:43:59 - 07-06-2010: MCS_RX$ -> MovieProperty
Guid=4b3679ef-7126-4d3b-bc27-9222592e3982\x0D\x0AMovieProperty
Name="Star Wars I: The Phantom Menace"\x0D\x0AMovieProperty
Duration=02:13:00\x0D\x0AMovieProperty Minutes=133\x0D
\x0AMovieProperty Location=FileSystem\x0D\x0AMovieProperty
Rating="PG"\x0D\x0AMovieProperty Yea
16:43:59 - 07-06-2010: MCS_RX$ -> r="1999"\x0D\x0AMovieProperty
Genre="Action/Adventure/Fantasy/Science-Fiction"\x0D\x0AMovieProperty
Directors="Unknown"\x0D\x0AMovieProperty Actors="Unknown"\x0D
\x0AMovieProperty Synopsis="Every Saga Has A Beginning Begin your
STAR WARS DVD collection with STAR WARS: Episo
16:43:59 - 07-06-2010: MCS_RX$ -> de I THE PHANTOM MENACE. Packed with
over six hours of additional material, including exclusive
documentaries and never-before-seen deleted scenes, this 2-disc set
provides the perfect showcase for the incredible detail and
breathtaking scope of Geor
16:44:00 - 07-06-2010: MCS_RX$ -> ge Lucas's first episode in the
mythic STAR WARS saga."\x0D\x0AMovieProperty CanEject=False\x0D\x0A
16:44:00 - 07-06-2010: MCS_RX$ -> \x0D\x0A

STRING WITH \xFE\x02 INSERTED INTO STRING TO IPAD
===========================================
16:44:00 - 07-06-2010: MCS_MediaInfo7$ -> <empty>
16:44:01 - 07-06-2010: MCS_MediaInfo7$ -> \xFE\x02Every Saga Has A
Beginning Begin your STAR WARS DVD collection with STAR WARS: Episode
I THE PHANTO
16:44:01 - 07-06-2010: MCS_MediaInfo7$ -> \xFE\x02M MENACE. Packed
with over six hours of additional material, including exclusive
documentaries and n
16:44:01 - 07-06-2010: MCS_MediaInfo7$ -> \xFE\x02ever-before-seen
deleted scenes, this 2-disc set provides the perfect showcase for the
incredible de
16:44:01 - 07-06-2010: MCS_MediaInfo7$ -> \xFE\x02tail and
breathtaking scope of George Lucas's first episode in the mythic STAR
WARS saga.


UNMODIFIED INCOMING STRING FROM MCS
==================================
17:43:28 - 07-06-2010: MCS_TX$ -> GetMovieProperties
4b3679ef-7126-4d3b-bc27-9222592e3982\x0D\x0A
17:43:28 - 07-06-2010: MCS_RX$ -> MovieProperty
Guid=4b3679ef-7126-4d3b-bc27-9222592e3982\x0D\x0AMovieProperty
Name="Star Wars I: The Phantom Menace"\x0D\x0AMovieProperty
Duration=02:13:00\x0D\x0AMovieProperty Minutes=133\x0D
\x0AMovieProperty Location=FileSystem\x0D\x0AMovieProperty
Rating="PG"\x0D\x0AMovieProperty Yea
17:43:28 - 07-06-2010: MCS_RX$ -> r="1999"\x0D\x0AMovieProperty
Genre="Action/Adventure/Fantasy/Science-Fiction"\x0D\x0AMovieProperty
Directors="Unknown"\x0D\x0AMovieProperty Actors="Unknown"\x0D
\x0AMovieProperty Synopsis="Every Saga Has A Beginning Begin your
STAR WARS DVD collection with STAR WARS: Episo
17:43:28 - 07-06-2010: MCS_RX$ -> de I THE PHANTOM MENACE. Packed with
over six hours of additional material, including exclusive
documentaries and never-before-seen deleted scenes, this 2-disc set
provides the perfect showcase for the incredible detail and
breathtaking scope of Geor
17:43:29 - 07-06-2010: MCS_RX$ -> ge Lucas's first episode in the
mythic STAR WARS saga."\x0D\x0AMovieProperty CanEject=False\x0D\x0A

AFTER CHANGING LINE 870 TO REMOVE THE SUSPECT \xFE\x02
==================================================
17:43:30 - 07-06-2010: MCS_MediaInfo7$ -> <empty>
17:43:30 - 07-06-2010: MCS_MediaInfo7$ -> Every Saga Has A Beginning
Begin your STAR WARS DVD collection with STAR WARS: Episode I THE
PHANTO
17:43:30 - 07-06-2010: MCS_MediaInfo7$ -> M MENACE. Packed with over
six hours of additional material, including exclusive documentaries
and n
17:43:30 - 07-06-2010: MCS_MediaInfo7$ -> ever-before-seen deleted
scenes, this 2-disc set provides the perfect showcase for the
incredible de
17:43:30 - 07-06-2010: MCS_MediaInfo7$ -> tail and breathtaking scope
of George Lucas's first episode in the mythic STAR WARS saga.

AUTONOMIC CONTROLS RESPONSE AND CODE
=====================================

Brad,
Since Crestron panels can only receive 255 characters of text at a
time, this sequence is a concatenation command, telling the panel to
add further text to the object, rather than replace it. You should be
able to edit the S+ module to eliminate this behaviour.

case (property="Synopsis"):
{

if (len(value) > 600)
{
value=left(value,600);
value = left(value,reversefind(".",value));
}
else
{
print("Value Length = %i",len(value));
}
MediaInfo7$ = "";
while (len(value) > 0)
{
if (len(value)>100)
{
chunk = removebylength(100, value);
}
else
{
chunk = value;
value = "";
}

//commented out by BN MediaInfo7$ = "\xFE\x02" + chunk;
MediaInfo7$ = chunk;
}
}

--
You received this message because you are subscribed to the Google Groups "CommandFusion" group.
To post to this group, send email to commandfusion@googlegroups.com.
To unsubscribe from this group, send email to commandfusion+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/commandfusion?hl=en.

Comments

0 comments to "Trouble with long text strings..."

Post a Comment

 

Copyright 2008 All Rights Reserved Revolution Two Church theme by Brian Gardner Converted into Blogger Template by Bloganol dot com