Serial interface limitations

Discussion in 'C-Bus Serial Protocols' started by sync, Oct 30, 2009.

  1. sync

    sync

    Joined:
    Oct 30, 2009
    Messages:
    11
    Likes Received:
    0
    Location:
    Australia
    In some sections of Clipsal Documentation they state that serial interface command buffer is limited to a maximum of 21 bytes (42 charcaters) and in other sections the manual says that the "SAL Data" part of the command stream is limited to (14 - 21 bytes) - depending on network bridges.

    Can anyone clear up some confusions on this matter

    1. Does the 21 byte maximum include the "\" and the "header byte" at the start and finally the "checksum" byte at the end of the command string?
    For example "\05..............CS"

    2. If the maximum number of bridges are used, then 8 bytes are required (for additional bridge addressing) so if they state that the SAL Data portion needs to be limited to 14 bytes then something doesn't seem right ?

    3. Also does this 21 btye buffer limit place any restrictions on the length of data that the Serial Interface can recieve and relay on to third party devices -- for example is the serial interface reception resposes limited to 21 bytes also?

    4. Also can anyone confirm that the CNI moudule behaves exactly the same as the PC Serial interface module (expect for access via telnet) - in other words does the CNI accept exactly the same commands and behave exactly as the Serial interface once a TCIP connection has been established?

    many thanks
    Coll
     
    sync, Oct 30, 2009
    #1
  2. sync

    Newman

    Joined:
    Aug 3, 2004
    Messages:
    2,203
    Likes Received:
    0
    Location:
    Adelaide, South Australia
    For any command sent to the Serial Interface, there cannot be more than 45 characters between the leading \ and the <cr>. So, in direct answer to your question, the 21 byte limit does not include the '\' or the 'checksum' but it does include the header byte.

    If the maximum number of bridges are used, the total number of network routing information required is 8 bytes. If there is no network bridge routing, then the network routing information consumes 1 byte. The difference is 7 bytes.

    21 bytes is the limit.

    PCI and CNI behave in exactly the same way with exactly the same constraints.
     
    Last edited by a moderator: Oct 30, 2009
    Newman, Oct 30, 2009
    #2
  3. sync

    PGOLD

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

    I have played around a little with a PCI and have found that the 21 btye limit if different and depends on if its a transmission or reception string?

    Usually the PCI will hold more bytes for reception than transmission but I don't really know why this is so?

    If this helps?

    Peter
     
    PGOLD, Nov 10, 2009
    #3
  4. sync

    ashleigh Moderator

    Joined:
    Aug 4, 2004
    Messages:
    2,392
    Likes Received:
    24
    Location:
    Adelaide, South Australia
    Reception and transmission are relative terms and can be confusing.

    To try and be clear - the PCI on its serial port can receive (from your device or application) the limit of the number of characters shown in the serial interface users guide.

    As far as the PCI sending to you (transmitting to your application) as far as I can remember there are no limits stated. You can get back quite long strings depending on the mode the PCI is in. You should assume a receive buffer of about 70 characters before the line-feed terminator, this will ensure you have space for the mode with the longest strings you will get.
     
    ashleigh, Nov 10, 2009
    #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.