/* Get the channel id based on remote device ID. 
The is effectively a very simple hashing function to generate unique channel IDs from device IDs */
static uint get_chan_num(uint16_t dev)
/* Get the channel id based on remote device ID. 
The is effectively a very simple hashing function to generate unique channel IDs from device IDs */
static uint get_chan_num(uint16_t dev)
{
	uint16_t self = (uint16_t)bsim_args_get_global_device_nbr();
	uint channel_id;
	if (self < dev) {
		channel_id = (dev << 16) | self;
	} else {
		channel_id = (self << 16) | dev;
	}
	return channel_id;
}