Page 2 of 2 FirstFirst 12
Results 11 to 16 of 16

Thread: sendMessage from a .Net App

  1. #11
    Variable Bitrate warnockm's Avatar
    Join Date
    Jun 2004
    Location
    Virginia
    Posts
    433
    I guess i think of a value being: a message(request) sent and that value received. a message received, to me, would be a button pressed, like my custom orb buttons. Am i looking at it wrong?
    Progress - VIA EPIA SP8000 | 120 Opus Power Supply & Case | 1GB Ram | 120GB 2.5" Hard Drive | Bluetooth 2.0 | GPRS/3G | Wifi | Road Runner/LSX 2.0 (waiting for a day skin for 3.0) | iGuidance 4.0 | Lilliput 7"

  2. #12
    RoadRunner Mastermind
    Auto Apps:loading...
    guino's Avatar
    Join Date
    Nov 2004
    Location
    Toronto, Canada
    Posts
    9,817
    No no, you're looking at it right.. and you can use sendmsg to trigger commands on your app.. but you could do that slightly different from the SDK.. for instance, instead of using "SENDMSG" you could use setvar.. and a single variable with your "command".. something like:

    "SETVAR;ORBCMD;<COMMAND>" from RR ... then in your c# app you could have a loop/check every so often (i.e. 2-5 times per second for faster response) where you'd do this (VB6/Pseudo Code):

    Code:
    IF SDK.GetInfo("=$ORBCMD$") <> "" then
       ORBCMD = SDK.GetInfo("=$ORBCMD$")
       SDK.Execute("SETVAR;ORBCMD;")
    
       Select Case ORBCMD
            case "PLAY"
                   ...
            case "AUDIO"
                   ...
       End Select
    End If
    Also, nothing prevents you from using both interfaces at once (for whatever reason).
    Ride Runner RR's Myspace

    "Being happy is not about having what you want, it's about wanting what you have."
    "The best things in life are always free - but that doesn't mean money can't buy you good things."

  3. #13
    Variable Bitrate warnockm's Avatar
    Join Date
    Jun 2004
    Location
    Virginia
    Posts
    433
    THAT helps a lot. I wasn't sure if there was an event that triggered on a message received, or if it was something i had to check for. I'll press on...
    Progress - VIA EPIA SP8000 | 120 Opus Power Supply & Case | 1GB Ram | 120GB 2.5" Hard Drive | Bluetooth 2.0 | GPRS/3G | Wifi | Road Runner/LSX 2.0 (waiting for a day skin for 3.0) | iGuidance 4.0 | Lilliput 7"

  4. #14
    Variable Bitrate warnockm's Avatar
    Join Date
    Jun 2004
    Location
    Virginia
    Posts
    433
    Quote Originally Posted by guino View Post
    Code:
    public void TestSDKDOTNET()
    {
            System.Type SDKType = System.Type.GetTypeFromProgID("RoadRunned.SDK");
            object SDK = System.Activator.CreateInstance(SDKType);
            RRSCR = SDK.InvokeMember("GetInfo", System.Reflection.BindingFlags.InvokeMethod, null, o, new object[] {"TRACKNAME"});
            SDK.InvokeMember("Execute", System.Reflection.BindingFlags.InvokeMethod, null, o, new object[] {"EXIT"});
    }
    I'm not sure how this works... InvokeMember is a method of System.Type (i.e., SDKType), not Object. Type.InvokeMember returns an Object. is that what RRSCR is? if so, what is the object "o" in InvokeMember?
    Progress - VIA EPIA SP8000 | 120 Opus Power Supply & Case | 1GB Ram | 120GB 2.5" Hard Drive | Bluetooth 2.0 | GPRS/3G | Wifi | Road Runner/LSX 2.0 (waiting for a day skin for 3.0) | iGuidance 4.0 | Lilliput 7"

  5. #15
    RoadRunner Mastermind
    Auto Apps:loading...
    guino's Avatar
    Join Date
    Nov 2004
    Location
    Toronto, Canada
    Posts
    9,817
    Yes sorry, you're right, when I 'translated' the code I got that wrong.. this is the updated code:

    Code:
    public void TestSDKDOTNET()
    {
            System.Type SDKType = System.Type.GetTypeFromProgID("RoadRunned.SDK");
            object SDK = System.Activator.CreateInstance(SDKType);
            RRSCR = SDKType.InvokeMember("GetInfo", System.Reflection.BindingFlags.InvokeMethod, null, SDK, new object[] {"TRACKNAME"});
            SDKType.InvokeMember("Execute", System.Reflection.BindingFlags.InvokeMethod, null, SDK, new object[] {"EXIT"});
    }
    Please note the SDK object passed as a parameter to InvokeMember.
    Ride Runner RR's Myspace

    "Being happy is not about having what you want, it's about wanting what you have."
    "The best things in life are always free - but that doesn't mean money can't buy you good things."

  6. #16
    Variable Bitrate warnockm's Avatar
    Join Date
    Jun 2004
    Location
    Virginia
    Posts
    433
    works. thanks!
    Progress - VIA EPIA SP8000 | 120 Opus Power Supply & Case | 1GB Ram | 120GB 2.5" Hard Drive | Bluetooth 2.0 | GPRS/3G | Wifi | Road Runner/LSX 2.0 (waiting for a day skin for 3.0) | iGuidance 4.0 | Lilliput 7"

Page 2 of 2 FirstFirst 12

Similar Threads

  1. Alpine City Cruise
    By Hell-Stopper in forum RR Skins
    Replies: 170
    Last Post: 02-22-2007, 10:05 PM
  2. problems with ext app
    By xengo in forum Media Engine
    Replies: 0
    Last Post: 04-04-2005, 10:01 AM
  3. Switcher - A little button app to Alt-Tab between two programs.
    By LESLIEx317537 in forum Other Cool Stuff
    Replies: 30
    Last Post: 12-23-2004, 06:47 PM
  4. [HOWTO] Make a custom external app button
    By netsuo in forum NeoCar Media Center
    Replies: 0
    Last Post: 11-15-2004, 05:42 AM
  5. [OT - almost] Looking for best way to save App data - is XML OK
    By kingtut in forum Software & Software Development
    Replies: 8
    Last Post: 07-12-2004, 11:39 AM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •