Skip to content

how to parse through channel names greater than 32 characters. #20

@rs7q5

Description

@rs7q5

Think this is very similar to #18 in the sense that the format is causing issues. I do not have short_names in my channel list, so have set the length for short name to 0s and that has allowed it to have the correct name and unit, however I have some names that are longer than 32s and so if I extend it I can get more length, but it then messes up other channels. Changing the max length above 32s causes issues with getting names, but I'm wondering if there is another place I need to adjust the length to get the names. the bigger issue is that I have duplicate names, so if I can at least get enough characters so there aren't duplicates that would solve my problem.

class ldChan(object):
    """Channel (meta) data

    Parses and stores the channel meta data of a channel in a ld file.
    Needs the pointer to the channel meta block in the ld file.
    The actual data is read on demand using the 'data' property.
    """

    fmt = '<' + (
        "IIII"    # prev_addr next_addr data_ptr n_data
        "H"       # some counter?
        "HHH"     # datatype datatype rec_freq
        "hhhh"    # shift mul scale dec_places
        "32s"     # name (originally set to 32s)
        "0s"      # short name (originally set to 8s)
        "12s"     # unit
        "40x"     # ? (40 bytes for ACC, 32 bytes for acti)
    )

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions