Skip to content

TIME_OF_DAY support (again?) #174

@henri62

Description

@henri62

When using the editor (V 4.2.3) it is not possible to choose the TIME_OF_DAY type (0x000C) for an SDO while it is formally defined in the CANOpen specification (See $7.1.6.5 CiA 301).

That is a problem because in the generated EDS file the type is incorrect and needs to be manually adjusted.

I searched through the issue list and found a partial discussion about it and (#134) that says it was implemented but that seems not to be the case. I can only find some references in the *.cs files.
Also in CanOpenNode there is nothing anywhere in the C/H files that looks like it.

So what is the status about this type? Was it removed later or never merged?

I would at least expect that you can choose the TIME_OF_DAY in the editor and save it in the xdd file.
I'm aware that the underlying structure is "highly unportable" because if the bitfields. But at least we could make an array of 6 bytes and let the (C) code (in CANopenNode) decode the fields to a normal struct, containing native C-types that always work.

Currently I have to workaround it by using an OCTET_STRING in the editor and in the C/H-code do this fiddling of fields myself.

Unfortunately I have virtually no skills in C#, else I could have helped with it.

-edit-
See also the discussion in: CANopenNode/CANopenNode#148
Here it says that TIME_OF_DAY is not used in the object dictionary, but that is not true. Is can also be used there.

-edit-
About alignment of datatypes inside a PDO mapping:
It gets even funnier, there are also datatypes (some of the "void" OD locations < 0x5) that are pointed to (as filler bits) in PDO mappings to get SDOs neatly aligned to a byte or word boundary to ease the implementation. These types are also missing.
I have seen that somewhere; they used VOID4. Maybe I can find it back to show a practical example where that is done.

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