Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

  • ztype

  • phylabel

  • logicallabel

  • cbattr (at least bitrate should be present for IO_TYPE_CAN or IO_TYPE_VCAN typestype)

Parameters not supported by the CAN interface shall be omitted from the device model file.

...

Code Block
"ioMemberList": [ 
	{
		"ztype": "IO_TYPE_CAN",
		"phylabel": "can0",
		"logicallabel": "can0",
		"assigngrp" : "",
		"phyaddrs" : {
			"ifname" : "can0"
		},
		"cbattr" : {
			"bitrate": "125000",
		}
	},
	{
		"ztype": "IO_TYPE_LCAN",
		"phylabel": "can0.1",
		"logicallabel": "app1CANcan0.1",
		"assigngrp" : "app1CANcan0.1",
		"phyaddrs" : {
			"ifname" : "can0"
		},
	},
	{
		"ztype": "IO_TYPE_LCAN",
		"phylabel": "can0.2",
		"logicallabel": "app2CANcan0.2",
		"assigngrp" : "app2CANcan0.2",
		"phyaddrs" : {
			"ifname" : "can0"
		},
	},
	{
		"ztype": "IO_TYPE_LCAN",
		"phylabel": "can0.3",
		"logicallabel": "app3CANcan0.3",
		"assigngrp" : "app3CANcan0.3",
		"phyaddrs" : {
			"ifname" : "can0"
		},
	}
]

So logically the device is presented with 4 CAN interfaces, the physical (real) controller plus 3 logical interfaces, where each one can be passed-through to each Edge Application. However, all of them point to the same physical can0. In the device model, the interface can0 is the one that describes the physical CAN interface and contains the proper parameters to set up the controller. The logical interfaces app1CAN, app2CAN and app3CANcan0.1, can0.2 and can0.3 point to can0 and can be passed-through the the applications.

...

Code Block
"ioMemberList": [ 
	{
		"ztype": "IO_TYPE_VCAN",
		"phylabel": "vcan0",
		"logicallabel": "vcan0",
		"assigngrp" : "",
		"phyaddrs" : {
			"ifname" : "vcan0"
		},
		"cbattr" : {
			"bitrate": "125000",
		}
	},
	{
		"ztype": "IO_TYPE_LCAN",
		"phylabel": "vcan0.1",
		"logicallabel": "app1VCANvcan0.1",
		"assigngrp" : "app1VCANvcan0.1",
		"phyaddrs" : {
			"ifname" : "vcan0"
		},
	},
	{
		"ztype": "IO_TYPE_LCAN",
		"phylabel": "vcan0.2",
		"logicallabel": "app2VCANvcan0.2",
		"assigngrp" : "app2VCANvcan0.2",
		"phyaddrs" : {
			"ifname" : "vcan0"
		},
	},
	{
		"ztype": "IO_TYPE_LCAN",
		"phylabel": "vcan0.3",
		"logicallabel": "app3VCANvcan0.3",
		"assigngrp" : "app3VCANvcan0.3",
		"phyaddrs" : {
			"ifname" : "vcan0"
		},
	},
	{
		"ztype": "IO_TYPE_CAN",
		"phylabel": "can0",
		"logicallabel": "can0",
		"assigngrp" : "",
		"phyaddrs" : {
			"ifname" : "can0"
		},
		"cbattr" : {
			"bitrate": "125000",
		}
	},
	{
		"ztype": "IO_TYPE_LCAN",
		"phylabel": "can0.1",
		"logicallabel": "app1CANcan0.1",
		"assigngrp" : "app1CANcan0.1",
		"phyaddrs" : {
			"ifname" : "can0"
	    },
	}
]

Notice that only one interface should have the type IO_TYPE_VCAN, which is the one that creates the virtual interface on the system. The other interfaces that point to vcan0 should be created as logical CAN interfaces. A single logical CAN interface can also be created for can0, even though it’s going to be accessed by only one application. Thus, a total of six CAN interfaces will be presented to the user: can0 (physical) and app1CANcan0.1 (which can be passed-through to EdgeApp 1); vcan0, which defines the virtual CAN interface; app1VCAN, app2VCAN and app3VCAN vcan0.1, vcan0.2 and vcan0.3, which can be passed-through to EdgeApp 1, EdgeApp 2 and EdgeApp 3, respectively.

...