Java Ctrl C-bus can?

Discussion in 'General Discussion' started by gabriel_li, Aug 3, 2007.

  1. gabriel_li

    gabriel_li

    Joined:
    Jun 27, 2007
    Messages:
    3
    Likes Received:
    0
    Location:
    Singapore
    hi all, just wondering if anyone try this before.

    Using a fully Java program(got to write the program) to crtl C-bus? nt using PG or Sever X. can be done?

    if so where can i get the c-bus coding, and where i should place the coding?
    Anyone gd in Java Programming here?

    As i am a IA student in Clipsal SG, suppose to come out a Java Program that is able to ctrl C-bus w/o using PG & Server X. i totally know nothing abt Java kind of like wondering how to start. anyone can help?
     
    gabriel_li, Aug 3, 2007
    #1
  2. gabriel_li

    paulw11

    Joined:
    Dec 4, 2006
    Messages:
    93
    Likes Received:
    0
    Location:
    Blue Mountains, NSW, Australia
    an easy one to start with huh?

    An easy one to start huh? :)

    You haven't given us much background on the purpose of this; is it intended as an exercise to learn something about CBus or is it intended that this will be a component of an actual product or custom application?

    If the first then you could probably ignore the object oriented features of Java and write simple procedural code. In this case you could start with the C-Bus public protocol available from http://www.cbus-enabled.com/

    You can use the RXTX package for Java to interface with a serial port, or you can use a java.net.Socket to communicate with a CNI over the network.

    If your goal is to produce a sophisticated solution then I would start with an object model design; consider how you want to model CBus objects such as networks, applications, group addresses and units within your application. You will also need to implement the actual C-Bus protocol as I descirbed above.

    You say that you don't have any experience with Java, I assume (or hope) that you have experience with object-oriented languages in general.

    Good luck!

    Paul
     
    paulw11, Aug 3, 2007
    #2
  3. gabriel_li

    gabriel_li

    Joined:
    Jun 27, 2007
    Messages:
    3
    Likes Received:
    0
    Location:
    Singapore
    hi Paul

    is object-oriented languages in general program the same as Java object-oriented?

    yesh i suppose to develop component of an actual product or custom application, whatever is should be know as. suppose to be able to work like Home Gate, & Server X. need things like able to control lightings, A/C, all the settings that u will be able to find in Homegate, or even like how touch screen are being program. just tt is a java version.
     
    gabriel_li, Aug 6, 2007
    #3
  4. gabriel_li

    paulw11

    Joined:
    Dec 4, 2006
    Messages:
    93
    Likes Received:
    0
    Location:
    Blue Mountains, NSW, Australia
    Hi,

    Yes, the object model in Java is similar to most object-oriented environments.
    What I meant was that the key to a good Java component is a good object model design; as with anything you are going to "build" a good set of plans is the place to start. You don't build a house by getting some wood, hammer and nails and going for it; you need a design & plans first.

    Programming in Java is the same; You need to design your solution before you sit down at the keyboard and start writing code; writing Java is simple - it is just a matter of learning the syntax. Good object oriented design is the real skill.

    Paul
     
    paulw11, Aug 6, 2007
    #4
Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.