Support setting explicit CAN frame format when writing messages.

Fixed #230.