Using GD Node
Callback builtins
The GD Node callbacks have access to the following builtins:
Callback: Callback classConfiguration: Configuration class - used to get Configuration filesContainer: Container classFleetRobot: FleetRobot classgd: Node shared object - used to get param and interact with oports# Get the value of a param param_value = gd.params('param_name') # Set the value of an oport gd.oport('port_name').send(msg)
Lock: UserLock class - used to interact with locks# Acquire a lock Lock(Robot.RobotName, persistent=True).acquire()
logger: LogAdapter instance - logger that should be used in callbacksMessage: Message classNodeInst: NodeInst classPackage: Package classPortName: Name of the port that triggered the callback# Log the name of the port that triggered the callback logger.info("The callback was triggered by port: %s", PortName)
Ports: Ports classprint: Debug log functionRobot: Robot class instancerun: Function to run another callback (from the callback itself)Scene: Active scene instance, None if active_scene is not specifiedscopes: A ScopesTree instanceSM: UserSM classStateMachine: StateMachine classVar: UserVar class - used to set, get and delete node scoped variables
If you are using the enterprise version of MOV.AI the following are also available:
Alerts: Alerts classAnnotation: Annotation classGraphicAsset: GraphicAsset classGraphicScene: GraphicScene classLayout: Layout classmetrics: Metrics class instance - used to send metricsTask: Task classTaskEntry: TaskEntry classTaskTemplate: TaskTemplate class