I have a system that processes messages from various sources and I put a MIME type on each incoming message which is used for dispatching further down the line.
One type of mess开发者_高级运维ages coming in is data frames from a Controller Area Network (CAN). Now, this data usually isn't transmitted via HTTP or email etc., so Wikipedia or the standardizing organizations don't give a MIME type, at least not in an obvious place. Google couldn't help me, either.
For now, I'm just going with some made-up "application/vnd.*" MIME type, as I already do with some internal protocols. This is kinda OK, but it's not really correct, and if anybody knows of an existing MIME type, I would prefer to use it.
CAN is only defined for OSI-Layers 1 (Physical Layer) and 2 (Data Link Layer).
MIME (Multipurpose Internet Mail Extensions) is somewhere around Layer 6 (Presentation Layer) and will only describe informations from the layer above number 7 (Application Layer) or maybe it's own layer.
So it would not make any sense to have a MIME type for CAN as a bus technology, because you are interested in "what is transfered" and not in "how it is transfered". If there would be a MIME type for CAN, you would also need one for Ethernet, WiFi... smoke signals :-)
Of course you can define and encode a MIME types for your information you transfer over CAN. But then these are related to your data transfered and not to CAN itself. It would also be possible to run IP and HTTP protocols over CAN, but this is no common usecase.
精彩评论