This article presents a design of model of the medium access control (MAC) of a sub-layer of a Controller Area Network (CAN) protocol (CAN is the most widely used in-vehicle network). The model is created via hierarchical Coloured Petri Nets. For better clarity and comprehension, the wide created model is divided into submodules.
An application CPN Tools, developed by the CPN group at the University of Aarhus (Denmark), is used as a modelling tool. This model expresses the whole CAN's fault confinement mechanisms and the other functions of MAC sub-layer such as data encapsulation, frame coding (stuffing/de-stuffing), medium access management and acknowledgement. Functionality of the originally created model was tested by a series of ad hoc simulations in the model environment. The assets of the model mentioned before are discussed at the end of the article.