On 11/02/2015 08:41 PM, Aleksander Morgado wrote: > On Mon, Nov 2, 2015 at 12:14 PM, Oliver Hartkopp <socket...@hartkopp.net> > wrote: >> >> What about defining some overlay data structure to map ARINC-429 frames into >> CAN frames? >> >> E.g. we could write the ARINC 32 bit data completely into data[0..3] and >> additionally copy the 8 bit label information (or should it better be 10 bit >> including the Source/Destination Identifiers?) additionally into the can_id. > > Note that the only bits which are always treated as non-data are the 8 > label bits (well, and the parity bit #31). The 2 SDI bits (#8, #9) may > be used as data bits when a high resolution is needed, like Lat/Long > encoded in binary words 310 and 311. I wouldn't make any assumption on > what's on those 2 bits; i.e. they're not always "source/destination". >
You definitely know these details better than me. That's why I'm asking. Would hosting the 32 bit in the struct can_frame.data and just the 8 bit label in struct can_frame.can_id offer the functionality you need? Besides the arinc429_frame struct struct arinc429_frame { __u8 label; /* 8 bit label */ __u8 data[3]; /* Up-to 23 bits are valid. */ }; everything else roughly looks like copy&paste from PF_CAN with renaming. So when we can fit the arinc frames into CAN frames and re-use the existing CAN infrastructure - we are almost done. Regards, Oliver -- To unsubscribe from this list: send the line "unsubscribe netdev" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html