M2M communications and Internet of Things as enablers of smart city