Home AMX User Forum NetLinx Studio

A bit of string

I am having a little trouble with some string manipulation. I have a Harman Kardon home theatre amp and I am trying to catch the string from it and displaying which surround mode I am using.

So the HK gives me this in notification:
MPSEND$032$F0VIDEO 2/ OPT 1$00$F1DOLBY DIGITAL $00$F2$C0$00$00$00$C0$...

But only this if I look at the DATA.TEXT and display it on my TP:
MPSEND$032$F0VIDEO 2/ OPT 1

But I have to get the DOLBY part of it.. which I can?t see!

Any ideas?

Comments

  • ericmedleyericmedley Posts: 4,177
    Thorleifur wrote: »
    I am having a little trouble with some string manipulation. I have a Harman Kardon home theatre amp and I am trying to catch the string from it and displaying which surround mode I am using.

    So the HK gives me this in notification:
    MPSEND$032$F0VIDEO 2/ OPT 1$00$F1DOLBY DIGITAL $00$F2$C0$00$00$00$C0$...

    But only this if I look at the DATA.TEXT and display it on my TP:
    MPSEND$032$F0VIDEO 2/ OPT 1

    But I have to get the DOLBY part of it.. which I can?t see!

    Any ideas?
    This might be one of those cases where DATA.TEXT can bite you.

    Perhaps try using the old CREATE_BUFFER method.

    You can still use the data_event to fire the routine. But instead of looking at DATA.TEXT, look at whatever buffer you create.
  • Joe HebertJoe Hebert Posts: 2,159
    Thorleifur wrote: »
    So the HK gives me this in notification:
    MPSEND$032$F0VIDEO 2/ OPT 1$00$F1DOLBY DIGITAL $00$F2$C0$00$00$00$C0$...

    But only this if I look at the DATA.TEXT and display it on my TP:
    MPSEND$032$F0VIDEO 2/ OPT 1

    But I have to get the DOLBY part of it.. which I can?t see!

    Any ideas?
    ericmedley wrote: »
    This might be one of those cases where DATA.TEXT can bite you.
    I don?t think DATA.TEXT has anything to do with it and I believe the data is all there but the null ($00) in the string is causing the lopped off display. Netlinx is treating the string like a C null terminated string even though it shouldn?t. Netlinx and nulls don?t get along at times and you?re experiencing one of them first hand.
Sign In or Register to comment.