Webots Reference Manual - chapter 3 - section 17

Webots Reference Manual


3.17 Device

Abstract node, derived from Solid.

Device {
}

3.17.1 Description

This abstract node (not instanciable) represents a robot device (actuator and/or sensor).

3.17.2 Device Functions



NAME

   wb_device_get_name - convert WbDeviceTag to its corresponding device name

SYNOPSIS [C++] [Java] [Python] [Matlab]

  #include <webots/device.h>

  const char *wb_device_get_name(WbDeviceTag tag);

DESCRIPTION

wb_device_get_name() convert the WbDeviceTag given as parameter (tag) to its corresponding name.

This function returns NULL if the WbDeviceTag does not match a valid device.



NAME

   wb_device_get_type - convert WbDeviceTag to its corresponding WbNodeType

SYNOPSIS [C++] [Java] [Python] [Matlab]

  #include <webots/device.h>

  WbNodeType wb_device_get_type(WbDeviceTag tag);

DESCRIPTION

wb_device_get_type() convert the WbDeviceTag given as parameter (tag) to its corresponding WbNodeType (cf. the Supervisor API)

This function returns NULL if the WbDeviceTag does not match a valid device.

release 7.0.2
Copyright © 2012 Cyberbotics Ltd. All right reserved.