Skip to content

String type for serdepa #5

@raidoz

Description

@raidoz

Occasionally we need to send ASCII strings in packets, currently serdepa lacks the appropriate data type and an array of uint8 needs to be constructed manually. Can we add a string type?

class StringPacket(SerdepaPacket):
    _fields_ = [
        ("header", nx_uint8),
        ("length", Length(nx_uint8, "text")),
        ("text", String)
    ]

Or perhaps a char type, so it would support List(char) instead? As long as it works as a regular string in comparisons: p.text == "something".

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions