CAL Reply Structure Clarification

Discussion in 'C-Bus Serial Protocols' started by pspeirs, May 23, 2016.

  1. pspeirs

    pspeirs

    Joined:
    Nov 23, 2013
    Messages:
    185
    Likes Received:
    10
    Location:
    Sydney
    Hi All,

    Another quick question in regards to the format of CAL replies when originating from a remote network. Currently I'm looking at the 4th byte (00) to determine that the message originated from the local network, however the order of the bytes for a remote message has me confused as to what I would check as a marker.

    As I understand the message structure, if my message originated from say 2 bridges, then the message structure per the documentation would be like:

    86 <Bridge Addr> <SIM Address> <Reply Network> <CAL Data>

    If the Reply Network contains the Bridge Address then what is the 2nd byte for?

    It makes sense to me that in order to identify the number of Bridge Addresses and therefore where the CAL data starts would be to have a message like:

    86 03 <Br1> <Br2> <SIM Address> <??> <CAL Data>

    I hope this explains what I'm trying to get across, basically what the message structure is from a remote network, and how I would find the CAL Data start position.


    Kind Regards,

    Paul
     
    pspeirs, May 23, 2016
    #1
  2. pspeirs

    ashleigh Moderator

    Joined:
    Aug 4, 2004
    Messages:
    2,392
    Likes Received:
    24
    Location:
    Adelaide, South Australia
    You get the reverse route, and so need to walk that the find the end of the routing bytes.

    From the serial interface users guide, section 8.2 :

    The routing information consists of Network Protocol Control Information (Network PCI), which comprises a header byte followed by a list of bridge unit addresses, and finishes with the destination address.

    The final destination address is either unit address for a Point to Point (CAL) command, or an Application Address for a Point to Point to Multipoint (SAL) command.

    The header structure is shown there also. The header byte of the network PCI is split into 3 fields, and the one you care about is the least significant 3 bits. This is a count of the number of routing bytes that follow.

    Therefore, you take that first network routing byte, mask off the least significant 3 bits. That tells you how many bytes after that byte are to be skipped.
     
    ashleigh, May 24, 2016
    #2
  3. pspeirs

    pspeirs

    Joined:
    Nov 23, 2013
    Messages:
    185
    Likes Received:
    10
    Location:
    Sydney
    Hi Ashley,

    Do you have a couple of CAL replies from remote networks you could share. I could probably get my head around it with a few samples.

    Regs,
    Paul
     
    pspeirs, May 24, 2016
    #3
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.