Announcement

Collapse
No announcement yet.

Plugin starter code and/or documentation

Collapse
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • Plugin starter code and/or documentation

    I have been searching the forum for hours and I am beginning to suspect that the temperature control I bought is not supported in RR.
    See: http://www.mp3car.com/road-runner/14...ml#post1437063

    If it isn't then I'll have to write my own plugin. How do I get started? I read the sticky on how to write/update plugins but there is not much help there. All it really says is you just need to put the dll in the plugins directory and register it.

    Is anyone willing to send me (or provide a link to) some starter code (I code in C#).
    Reading a temperature sensor and displaying it in a label in RR should be really easy but I have to get past the basics of RR plugin development first.

    Thanks in advance.
    My Work Thread:
    http://www.mp3car.com/vbulletin/showthread.php?t=72552
    Source switcher for Lill
    http://www.mp3car.com/vbulletin/show...d=1#post841007

  • #2
    its part of the rr installer.... there is a c# example

    RRExtension Plugin Examples
    -Thanks
    Mitch
    www.rush2112.net

    "Did you test it in carwings??"

    Sun, Come shine my way
    May healing waters bury all my pain
    Wind, Carry me home
    The fabric of reality is tearing apart
    The piece of me that died
    Will return To live again

    Comment


    • #3
      Sweet. I'll see if I can figure it out.
      Thanks.
      My Work Thread:
      http://www.mp3car.com/vbulletin/showthread.php?t=72552
      Source switcher for Lill
      http://www.mp3car.com/vbulletin/show...d=1#post841007

      Comment


      • #4
        ...not able to figure it out. I grabbed the sample c# code, added a label return, changed the 3 GUIDs. Changed nothing else. I took the compiled dll and put it in a directory off the riderunner\plugins\ directory. When I load RR it does not see the dll (looking at the debug.txt). I tried to register it but it errors out saying it has no entry point. What else should I have done before testing it?
        My Work Thread:
        http://www.mp3car.com/vbulletin/showthread.php?t=72552
        Source switcher for Lill
        http://www.mp3car.com/vbulletin/show...d=1#post841007

        Comment


        • #5
          right its not going to work that way...

          you have to regasm it

          for debuging sakes, you can set visual studios path to where u want the plugin, and vs will regasm it for you for , debugging sakes

          ie
          plugins/mycoolplugin


          .net dlls are regasmed not regsvred
          and u have to create tlb

          regasm /tlb mycoolplugin.dll
          -Thanks
          Mitch
          www.rush2112.net

          "Did you test it in carwings??"

          Sun, Come shine my way
          May healing waters bury all my pain
          Wind, Carry me home
          The fabric of reality is tearing apart
          The piece of me that died
          Will return To live again

          Comment


          • #6
            Thank you. It took me another hour but I got it to compile and RR is recognizing that the plugin is there and "using" it. I am not able to read the label in a skin though. I wonder if I am doing anything wrong.

            I added "case "MyTest"" to the following code.
            public string ReturnLabel(string LBL, string FMT)
            {
            string s = "";

            switch (LBL.ToLower())
            {
            case "boo":
            s = "I'm Scared";
            break;
            case "MyTest":
            s = "Weeeee";
            break;
            }

            return s;
            }

            Now if I just put "MyTest" in the code section of a label on a skin it should return "Weeeee" right?

            ---------- Post added at 01:32 PM ---------- Previous post was at 01:26 PM ----------

            I got it working. I made MyTest lower case and did same in skin and it works.
            Thanks again.
            My Work Thread:
            http://www.mp3car.com/vbulletin/showthread.php?t=72552
            Source switcher for Lill
            http://www.mp3car.com/vbulletin/show...d=1#post841007

            Comment


            • #8
              Originally posted by EricE View Post
              Thank you. It took me another hour but I got it to compile and RR is recognizing that the plugin is there and "using" it. I am not able to read the label in a skin though. I wonder if I am doing anything wrong.

              I added "case "MyTest"" to the following code.
              public string ReturnLabel(string LBL, string FMT)
              {
              string s = "";

              switch (LBL.ToLower()) {
              case "boo":
              s = "I'm Scared";
              break;
              case "MyTest":
              s = "Weeeee";
              break;
              }

              return s;
              }

              Now if I just put "MyTest" in the code section of a label on a skin it should return "Weeeee" right?

              ---------- Post added at 01:32 PM ---------- Previous post was at 01:26 PM ----------

              I got it working. I made MyTest lower case and did same in skin and it works.
              Thanks again.


              i highlighted your issues, just so others can see and learn
              -Thanks
              Mitch
              www.rush2112.net

              "Did you test it in carwings??"

              Sun, Come shine my way
              May healing waters bury all my pain
              Wind, Carry me home
              The fabric of reality is tearing apart
              The piece of me that died
              Will return To live again

              Comment


              • #9
                Originally posted by EricE View Post
                Thank you. It took me another hour but I got it to compile and RR is recognizing that the plugin is there and "using" it. I am not able to read the label in a skin though.
                I got it working. I made MyTest lower case and did same in skin and it works.
                Thanks again.
                Where did you find the skin? The "MyExtension" example includes code to build the DLLs but there are no skin files for it that I could find...

                Comment


                • #10
                  plugins dont have skins...

                  they can, but dont have to...

                  so if you make labels and indicators and such and such, you need to make your own DEMO skin

                  RR is NOT CF, where everyone uses the same skin!
                  -Thanks
                  Mitch
                  www.rush2112.net

                  "Did you test it in carwings??"

                  Sun, Come shine my way
                  May healing waters bury all my pain
                  Wind, Carry me home
                  The fabric of reality is tearing apart
                  The piece of me that died
                  Will return To live again

                  Comment


                  • #11
                    Originally posted by mitchjs View Post
                    plugins dont have skins...

                    they can, but dont have to...

                    so if you make labels and indicators and such and such, you need to make your own DEMO skin
                    Right. I was assuming that the plugin examples came with their own demo skins, but I guess they don't. It wasn't initially clear to me that I was expected to modify one of the existing skin files to see the example plugins actually do something.

                    Comment


                    • #12
                      or create your own look, no need to start with existing skin
                      just depends you what your trying to achive in a plugin
                      some are generic, like my USB-IO plugin, but i made some sample skins based on carwings_dyanmic to demo the plugin commands and what not
                      -Thanks
                      Mitch
                      www.rush2112.net

                      "Did you test it in carwings??"

                      Sun, Come shine my way
                      May healing waters bury all my pain
                      Wind, Carry me home
                      The fabric of reality is tearing apart
                      The piece of me that died
                      Will return To live again

                      Comment


                      • #13
                        Hi,

                        I know this is post is delayed but I didn't want to start a new thread because my question is related to this thread's topic...

                        I am trying to get the "MyExtension" example to work and was able to register the .dll file so the Carwings skin shows MyExtension in the Plugin Manager list with the other plugins, but there's no added functionality to the skin. I am not sure if I need to create a button on one of the skin's screens to execute a a command in the MyExtension plugin, but if so I couldn't find a command in the "Skin Commands" list that worked for me.

                        Am I doing something wrong? Is there a certain skin command to execute a plugin command?

                        Thanks

                        Comment


                        • #14
                          I have done some plugins tests with C# and VB.NET and you need absolutly compile your project with the framework 2.0 and 3.5 , not the 4.0 and more that RR don't accept !

                          Comment


                          • #15
                            Thanks for replying, I am using the VB.NET "MyExtension" visual studio solution directly from the RR example folder and the .dll it came with didn't add functionality to the skin. When I compiled myself, the "Target framework (all configurations):" was set to ".NET Framework 2.0" - this setting was in Project>MyExtension Properties...>Compile>Advanced compile options... is there another location where I need to change options? I made sure the "Register for COM interop" was checked as well as the "Make Assembly COM-Visible" option in the Assembly tab>assembly information.

                            I don't see any code in the MyExtension plugin to add a button, and according to the post above, "if you make labels and indicators and such and such, you need to make your own DEMO skin." This makes me think that I need to add a label to get the ReturnLabel function be called, I just don't know how to tie the skin's label to the plugin's function. Is there a skin command like "MyExtension;ReturnLabel;mylabel" or something?

                            Basically, I don't understand how to get buttons, labels, etc. to interact with the plugin.

                            Thanks

                            Comment

                            Working...
                            X