Announcement

Collapse
No announcement yet.

COM Sneak Preview

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

  • COM Sneak Preview

    With the help from Sonic, Fusion Control Centre is now COM enabled.

    You can start RoadRunner or FCC in any order. Once either is running you can close and restart either as well at any time, hasn't broken yet. I dont know the internals of RR, but it hasnt crashed or anything with FCC restarting. The DLL tries to always give back a value, so there shouldnt be anything wrong.

    More coming later, but here is a preview:



    Fusion Brain Version 6 Released!
    1.9in x 2.9in -- 47mm x 73mm
    30 Digital Outputs -- Directly drive a relay
    15 Analogue Inputs -- Read sensors like temperature, light, distance, acceleration, and more
    Buy now in the MP3Car.com Store

  • #2
    So what does this mean exactly? I'm relatively new here. I do know what RR is, as well as FB. But what is this COM thing? A way to communicate between the two? Was that not able before? Thanks!

    I can't wait till I build a carPC, get a FB and start playing around with it!

    Comment


    • #3
      Originally posted by rightsidenov View Post
      So what does this mean exactly? I'm relatively new here. I do know what RR is, as well as FB. But what is this COM thing? A way to communicate between the two? Was that not able before? Thanks!

      I can't wait till I build a carPC, get a FB and start playing around with it!
      Yes COM is a way of communicating between the 2 applications. We supply our own software for free unlike others, and previously all you needed to do was just embed the application like you would a GPS app into any other program like RR or CF or SD.

      Now with COM, our program will run behind the scenes if you want it to, and your frontend program of choice can do the display natively.
      Fusion Brain Version 6 Released!
      1.9in x 2.9in -- 47mm x 73mm
      30 Digital Outputs -- Directly drive a relay
      15 Analogue Inputs -- Read sensors like temperature, light, distance, acceleration, and more
      Buy now in the MP3Car.com Store

      Comment


      • #4
        Hurray! Been waiting for this a long time.

        Comment


        • #5
          Calling FB from app other than RoadRunner

          Any chance you can give me an idea of how to get started using the new COM interface from code (i.e. VB.net, not from RR)? I've tried a few different methods such as

          Code:
           
          Dim myBrain As New FusionCOM.FusionServer
          myBrain.SetDigitalOutValue(0, 1)
          myBrain.SetDigitalOutValue(1, 1)
          'etc...
          but I can't seem to make contact with the board. Is there something that needs to be done to initialize the connection and specify the board you want to communicate with?

          I appreciate that you're pretty busy so thank you for helping in advance...

          JoeBerni

          Comment


          • #6
            Originally posted by joeberni View Post
            Any chance you can give me an idea of how to get started using the new COM interface from code (i.e. VB.net, not from RR)? I've tried a few different methods such as

            Code:
             
            Dim myBrain As New FusionCOM.FusionServer
            myBrain.SetDigitalOutValue(0, 1)
            myBrain.SetDigitalOutValue(1, 1)
            'etc...
            but I can't seem to make contact with the board. Is there something that needs to be done to initialize the connection and specify the board you want to communicate with?

            I appreciate that you're pretty busy so thank you for helping in advance...

            JoeBerni

            Some things to note:

            MDX must be running, it does the actual communication. MDX will initialize everything. MDX can run in the system tray from start, so that may be what you want.

            Then make a new instance of the Server Class. And call MyServerClass.xxxx where xxxx is:

            GetAnalogueValue
            GetDigitalOutValue
            GetDigitalInValue
            GetNumericVariableValue
            GetBooleanVariableValue

            Each of those functions takes an int32 as a parameter. The int is the index of the item as laid out in the configuration file. Object 0 is the first (topmost) and Object n is the last (bottommost)

            Also MDX must have the COM enabled by setting status="enabled" in the configuration file's general section.
            Fusion Brain Version 6 Released!
            1.9in x 2.9in -- 47mm x 73mm
            30 Digital Outputs -- Directly drive a relay
            15 Analogue Inputs -- Read sensors like temperature, light, distance, acceleration, and more
            Buy now in the MP3Car.com Store

            Comment


            • #7
              Also, if you want to set things, not just get (like change a digital output), then you will need to fire the COM_CommandReceived event either by calling it directly if your language supports it, OR by calling Server_SendBackCommandEvent which takes a string "command"as a parameter.

              The string command is interpreted by MDX as specified in the configuration file in the COM section.

              If your COM section looks like this:
              Code:
                  <com status="enabled">
                    <commands>
                      <command id="myCustomCOMCommand" minimum_delta_vote_time="100">
                        <do function="trigger output" functionTargetID="Digital Output 0" vote_opinion="on" vote_priority="medium"></do>
                        <do function="trigger output" functionTargetID="Digital Output 1" vote_opinion="on" vote_priority="medium"></do>
                      </command>
                    </commands>
                  </com>
              So if you call COM_CommandReceived("myCustomCOMCommand"); then MDX will interpret it and Turn on Digital Output 0 and Digital Output 1
              Fusion Brain Version 6 Released!
              1.9in x 2.9in -- 47mm x 73mm
              30 Digital Outputs -- Directly drive a relay
              15 Analogue Inputs -- Read sensors like temperature, light, distance, acceleration, and more
              Buy now in the MP3Car.com Store

              Comment


              • #8
                Thanks Nick! Appreciate the great (and fast) response.

                Comment

                Working...
                X