C-gate ?

Discussion in 'C-Gate Developers' started by PGOLD, Nov 17, 2009.

  1. PGOLD

    PGOLD

    Joined:
    Nov 10, 2009
    Messages:
    22
    Likes Received:
    0
    Location:
    QLD Australia
    Hi

    I want to use c-gate to monitor ($38) lighting-application data only, I can open up a telenet connection to c-gate Ok but need help to setup c-gate to only monitor the application i want on the cbus network. The manual is not that easy to understand, from what I can gather I need to set up an event monitor and to change the telnet port number?

    Also when c-gate telnet port is first opened is there anyway to just open the present network automatically without needing to know the project name and load/start up the project - is there a default way of doing this when a telnet connection is made?
     
    PGOLD, Nov 17, 2009
    #1
    1. Advertisements

  2. PGOLD

    daniel C-Busser Moderator

    Joined:
    Jul 26, 2004
    Messages:
    761
    Likes Received:
    14
    Location:
    Adelaide
    Hi PGOLD,

    One way to see the C-Gate application events is to telnet to the Status Change Port (things you type are in bold):

    C:\> telnet localhost 20025

    You will then see messages in the form:

    lighting on //WTEST/254/56/2 #sourceunit=1 OID=0ef19080-b567-102c-84b6-d95fdaad71b2
    lighting off //WTEST/254/56/2 #sourceunit=1 OID=0ef19080-b567-102c-84b6-d95fdaad71b2

    These are roughly equivalent to the messages that appear in the Toolkit application log for a network.

    For your purposes, you can simply ignore the messages that don't begin with "lighting".

    Alternatively, you can use the 'events' command to turn on these messages in your command session instead:

    C:\> telnet localhost 20023

    project load wtest
    200 OK.
    project use wtest
    200 OK.
    events e0s1c0
    200 OK.
    #s# lighting off //WTEST/254/56/1 #sourceunit=0 OID=0ef16970-b567-102c-84b5-d95fdaad71b2
    #s# lighting off //WTEST/254/56/2 #sourceunit=0 OID=0ef19080-b567-102c-84b6-d95fdaad71b2

    (the 's1' part turns on the status change event messages)

    There isn't a way to automate network opening when you connect to a session I'm afraid, but if you are doing this programmatically it's fairly straightforward to script the command sequence.
     
    daniel, Nov 17, 2009
    #2
    1. Advertisements

  3. PGOLD

    petra

    Joined:
    Nov 16, 2009
    Messages:
    18
    Likes Received:
    0
    Location:
    NZ
    Hi Daniel

    I am also interested in doing something similar, does cgate have a port that shows and accepts cbus data strings as they would appear looking through the pci module its connected to?
     
    petra, Nov 17, 2009
    #3
  4. PGOLD

    PGOLD

    Joined:
    Nov 10, 2009
    Messages:
    22
    Likes Received:
    0
    Location:
    QLD Australia
    Thank you Daniel

    Yes it works!
     
    PGOLD, Nov 17, 2009
    #4
  5. PGOLD

    daniel C-Busser Moderator

    Joined:
    Jul 26, 2004
    Messages:
    761
    Likes Received:
    14
    Location:
    Adelaide
    No it doesn't. Out of interest, what would you use that for?
     
    daniel, Nov 18, 2009
    #5
  6. PGOLD

    Duncan

    Joined:
    Jul 23, 2004
    Messages:
    925
    Likes Received:
    0
    Location:
    Salinas de Garci Mendoza, Bolivia

    edit: misunderstood question
     
    Last edited by a moderator: Nov 18, 2009
    Duncan, Nov 18, 2009
    #6
  7. PGOLD

    petra

    Joined:
    Nov 16, 2009
    Messages:
    18
    Likes Received:
    0
    Location:
    NZ
    daniel

    while cgate runs at a higher abstraction level it doesn't seem to support all the uses and functionality of a pci interface so in cases where it doesn't you would unnecessarily need another pci?
     
    petra, Nov 18, 2009
    #7
  8. PGOLD

    ashleigh Moderator

    Joined:
    Aug 4, 2004
    Messages:
    2,346
    Likes Received:
    3
    Location:
    Adelaide, South Australia
    Cgate understands cbus at a level where you don't need to mess about with the low level gory bits of the PCI.

    something important to understand about the PCI: You CAN ONLY EVER HAVE ONE PIECE OF CLIENT software connected to it. Cgate provides a high level multiplexing interface which removes this limitation - but you don't talk PCI-speak to cgate, you talk cgate-speak.

    Now, why does this limit come about?

    For the same reason that such limits apply to all other similar bus systems - you NEED to run transactions into the bus (a transaction being a stream of commands, with answers coming back, all separated in time from each other). The trouble you have is maintaining the relationship-in-time between commands in a transaction.

    Suppose for example that I wanted to send and receive a bunch of information... I might send out a query (please PCI, run an MMI for me and return to me the groups states). This is fine, I get the answer to the command I sent.

    Now, assume 2 clients running into the same PCI. One sends a command (get MMI), the other wants to just monitor lighting event changes as they happen). Over time.... which client should get which traffic? How does the PCI KNOW which client wants what?

    Unless the PCI is made vastly more complex (and bear in mind it only has a single serial port or USB port anyhow).... then untangling the transaction-oriented mess is impossible. In fact it goes even further and lower level than that, but the above is a sufficient reason for why it can't be done.

    Cgate on the other hand builds a complete internal object model of the network, its devices, and so on. Cgate KNOWS whats going on. You can do things like query cgate for a group state and it won't even bother sending anything on the bus at all - it does not need to, because it knows.

    Cgate acts like a big complex multiplexer/demultiplexer, with an object model thrown in for good measure, and it will allow multiple clients to work connected to cbus through a single PCI, it also allows multiple connections into a large site - for example in commercial buildings you might have 2 CNIs and 2 PCIs connected to the physical site network(s) - and all controlled by a single cgate which sees this as one large composite network.

    This is the power of cgate, which a PCI can't ever have or do, and never will.
     
    ashleigh, Nov 18, 2009
    #8
  9. PGOLD

    daniel C-Busser Moderator

    Joined:
    Jul 26, 2004
    Messages:
    761
    Likes Received:
    14
    Location:
    Adelaide
    Hi petra,

    If you can describe a little more what "functionality" you are looking for there's a good chance we can help you achieve this through C-Gate.
     
    Last edited by a moderator: Nov 19, 2009
    daniel, Nov 19, 2009
    #9
  10. PGOLD

    petra

    Joined:
    Nov 16, 2009
    Messages:
    18
    Likes Received:
    0
    Location:
    NZ
    thks asleigh

    Yes, but only for ojects that its supports, which doesn't represent all cbus definitions and applications therefore it is limited.
    can't see why not? - you could possibly define a string object with properties that allow construction of ~PCI commands in cases where the high level abstraction of objects are not supported?
    Which is why I suggested it could do away for the need of additional PCI's
    ?
     
    petra, Nov 19, 2009
    #10
  11. PGOLD

    ashleigh Moderator

    Joined:
    Aug 4, 2004
    Messages:
    2,346
    Likes Received:
    3
    Location:
    Adelaide, South Australia
    I don't understand how you can say this... cgate speaks and understands everything that is defined for and can happen on c-bus. One of the design teams goals (necessities) is that as c-bus protocols get extended, c-gate muct be brough along to match. If you can do it on the bus, you can do it through c-gate.

    Well in theory that might be possible. However, that is not how cgate works, and it is unlikely to be modified now to allow this. After all, cgate has been on sale in in use for over 10 years.... it fills its needs just fine.
     
    ashleigh, Nov 19, 2009
    #11
  12. PGOLD

    Newman

    Joined:
    Aug 3, 2004
    Messages:
    2,203
    Likes Received:
    0
    Location:
    Adelaide, South Australia
    One other thing to consider is that if you could send any serial data string through C-Gate to the PCI you may inadvertently change the mode of operation of the PCI. C-Gate would still assume that the PCI was in the mode it had set the PCI to, but the messages coming from the PCI wouldn't match and may be misinterpreted. The whole 'stack of cards' could come crashing down.

    This is yet another reason why C-Gate is the gate-keeper when multiple devices are sharing a single PCI.
     
    Newman, Nov 19, 2009
    #12
  13. PGOLD

    daniel C-Busser Moderator

    Joined:
    Jul 26, 2004
    Messages:
    761
    Likes Received:
    14
    Location:
    Adelaide
    I've added the idea of filtering events by criteria such as specific applications to the to do list (#18181)
     
    daniel, Nov 23, 2009
    #13
  14. PGOLD

    PGOLD

    Joined:
    Nov 10, 2009
    Messages:
    22
    Likes Received:
    0
    Location:
    QLD Australia
    Thanks Daniel

    The addition of Event Filtering for user defined applications would be very useful if available in Cgate - does the to do list number #18181 mean that there are 18,180 items on the list?
     
    PGOLD, Nov 24, 2009
    #14
  15. PGOLD

    Darren Senior Member

    Joined:
    Jul 29, 2004
    Messages:
    2,361
    Likes Received:
    0
    Location:
    Adelaide, South Australia
    No. The list contains all issues and feature requests for all CIS software since the system was implemented years ago. The list didn't start at 1 for some odd reason.

    The list of things still to be done for C-Gate is a small sub-set of the total list, so don't be alarmed by the size of the above number.
     
    Darren, Nov 25, 2009
    #15
    1. Advertisements

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.