RobotRaconteurCompanion.Util.LocalIdentifiersManager

Utility class for assigning and locking identifiers by name. Users do not normally need to use this class directly.

LocalIdentifiersManager

class RobotRaconteurCompanion.Util.LocalIdentifiersManager.LocalIdentifiersManager(node, client_object=None)

Utility class to manage device identifiers and locks

See the Robot Raconteur camera driver for an example of using this class.

Users do not normally need to use this class directly.

Parameters:
  • node (RobotRaconteur.RobotRaconteurNode) – (optional) The Robot Raconteur node to use for parsing. Defaults to RobotRaconteurNode.s

  • client_object (RobotRaconteur.ClientObject) – (optional) The client object to use for finding types. Defaults to None

GetIdentifierForNameAndLock(category, name)

Get a device identifier for a given name and lock the identifier file for exclusive access. The category should be “device” for most devices.

Parameters:
  • category (str) – The category of the identifier

  • name (str) – The name of the identifier

Returns:

The identifier and lock

Return type:

(RobotRaconteur.Identifier, LocalIdentifiersManagerFD)