ProtoCore v1.0.16
Deterministic, zero-heap network stack for embedded targets
Loading...
Searching...
No Matches
robotics.h File Reference

OPC UA for Robotics (OPC 40010-1) MotionDevice information model (PROTOCORE_ENABLE_ROBOTICS). More...

#include "protocore_config.h"

Go to the source code of this file.

Classes

struct  RoboticsAxis
 One axis' live monitoring values (OPC 40010-1 AxisType, common subset). More...
 
struct  RoboticsController
 The Controller identity + software (OPC 40010-1 ControllerType + SoftwareType). More...
 
struct  RoboticsSafetyState
 The SafetyState (OPC 40010-1 SafetyStateType, common subset). More...
 
struct  RoboticsMotionDevice
 One MotionDevice: identity + live motion state (OPC 40010-1 MotionDeviceType, common subset). More...
 
struct  RoboticsMotionDeviceSystem
 The whole MotionDeviceSystem the server exposes. Own it in your sketch and refresh its fields each loop from your robot I/O; the robotics resolvers read straight out of it (no copy). String fields may be null (served as an empty String). More...
 
struct  RoboticsNs
 Dispatch table. Addressed by offset, so the layout is asserted below. More...
 

Macros

#define ROBOTICS_NS_URI   "http://opcfoundation.org/UA/Robotics/"
 The OPC UA for Robotics companion-spec namespace URI (OPC 40010-1).
 

Typedefs

typedef enum PROTO_ENUM_PACKED RoboticsMotionDeviceCategory
 MotionDeviceCategory (OPC 40010-1 MotionDeviceCategoryEnumeration). Exposed as Int32; the numeric values follow the companion-spec enumeration.
 
typedef enum PROTO_ENUM_PACKED RoboticsMotionProfile
 Axis MotionProfile (OPC 40010-1 AxisMotionProfileEnumeration). Exposed as Int32; the numeric values follow the companion-spec enumeration.
 
typedef enum PROTO_ENUM_PACKED RoboticsOperationalMode
 SafetyState OperationalMode (OPC 40010-1 OperationalModeEnumeration). Exposed as Int32; the numeric values follow the companion-spec enumeration.
 

Enumerations

enum  PROTO_ENUM_PACKED {
  ROBOTICS_CAT_OTHER = 0 , ROBOTICS_CAT_ARTICULATED_ROBOT = 1 , ROBOTICS_CAT_SCARA_ROBOT = 2 , ROBOTICS_CAT_CARTESIAN_ROBOT = 3 ,
  ROBOTICS_CAT_SPHERICAL_ROBOT = 4 , ROBOTICS_CAT_PARALLEL_ROBOT = 5 , ROBOTICS_CAT_CYLINDRICAL_ROBOT = 6 , ROBOTICS_PROFILE_OTHER = 0 ,
  ROBOTICS_PROFILE_ROTARY = 1 , ROBOTICS_PROFILE_ROTARY_ENDLESS = 2 , ROBOTICS_PROFILE_LINEAR = 3 , ROBOTICS_PROFILE_LINEAR_ENDLESS = 4 ,
  ROBOTICS_MODE_OTHER = 0 , ROBOTICS_MODE_MANUAL_REDUCED_SPEED = 1 , ROBOTICS_MODE_MANUAL_HIGH_SPEED = 2 , ROBOTICS_MODE_AUTOMATIC = 3 ,
  ROBOTICS_MODE_AUTOMATIC_EXTERNAL = 4
}
 MotionDeviceCategory (OPC 40010-1 MotionDeviceCategoryEnumeration). Exposed as Int32; the numeric values follow the companion-spec enumeration. More...
 
enum  PROTO_ENUM_PACKED {
  ROBOTICS_CAT_OTHER = 0 , ROBOTICS_CAT_ARTICULATED_ROBOT = 1 , ROBOTICS_CAT_SCARA_ROBOT = 2 , ROBOTICS_CAT_CARTESIAN_ROBOT = 3 ,
  ROBOTICS_CAT_SPHERICAL_ROBOT = 4 , ROBOTICS_CAT_PARALLEL_ROBOT = 5 , ROBOTICS_CAT_CYLINDRICAL_ROBOT = 6 , ROBOTICS_PROFILE_OTHER = 0 ,
  ROBOTICS_PROFILE_ROTARY = 1 , ROBOTICS_PROFILE_ROTARY_ENDLESS = 2 , ROBOTICS_PROFILE_LINEAR = 3 , ROBOTICS_PROFILE_LINEAR_ENDLESS = 4 ,
  ROBOTICS_MODE_OTHER = 0 , ROBOTICS_MODE_MANUAL_REDUCED_SPEED = 1 , ROBOTICS_MODE_MANUAL_HIGH_SPEED = 2 , ROBOTICS_MODE_AUTOMATIC = 3 ,
  ROBOTICS_MODE_AUTOMATIC_EXTERNAL = 4
}
 Axis MotionProfile (OPC 40010-1 AxisMotionProfileEnumeration). Exposed as Int32; the numeric values follow the companion-spec enumeration. More...
 
enum  PROTO_ENUM_PACKED {
  ROBOTICS_CAT_OTHER = 0 , ROBOTICS_CAT_ARTICULATED_ROBOT = 1 , ROBOTICS_CAT_SCARA_ROBOT = 2 , ROBOTICS_CAT_CARTESIAN_ROBOT = 3 ,
  ROBOTICS_CAT_SPHERICAL_ROBOT = 4 , ROBOTICS_CAT_PARALLEL_ROBOT = 5 , ROBOTICS_CAT_CYLINDRICAL_ROBOT = 6 , ROBOTICS_PROFILE_OTHER = 0 ,
  ROBOTICS_PROFILE_ROTARY = 1 , ROBOTICS_PROFILE_ROTARY_ENDLESS = 2 , ROBOTICS_PROFILE_LINEAR = 3 , ROBOTICS_PROFILE_LINEAR_ENDLESS = 4 ,
  ROBOTICS_MODE_OTHER = 0 , ROBOTICS_MODE_MANUAL_REDUCED_SPEED = 1 , ROBOTICS_MODE_MANUAL_HIGH_SPEED = 2 , ROBOTICS_MODE_AUTOMATIC = 3 ,
  ROBOTICS_MODE_AUTOMATIC_EXTERNAL = 4
}
 SafetyState OperationalMode (OPC 40010-1 OperationalModeEnumeration). Exposed as Int32; the numeric values follow the companion-spec enumeration. More...
 

Functions

 PROTOCORE_NS_LAYOUT (RoboticsNs, bind, install)
 
void protocore_robotics_bind (uint8_t *work, const RoboticsMotionDeviceSystem *mds)
 Bind the MotionDeviceSystem the resolvers serve. mds must outlive .
 
void protocore_robotics_install (uint8_t *work, const RoboticsMotionDeviceSystem *mds)
 Convenience: bind mds and register both resolvers on the OPC UA .
 
uint8_t * protocore_robotics_span (void)
 The PROTOCORE_ROBOTICS_BORROW bytes this module's state lives in.
 

Variables

PROTOCORE_NS RoboticsNs Robotics PROTOCORE_UNUSED
 Module namespace.
 

Detailed Description

OPC UA for Robotics (OPC 40010-1) MotionDevice information model (PROTOCORE_ENABLE_ROBOTICS).

OPC 40010-1 "OPC UA for Robotics - Part 1: Vertical Integration" (VDMA / OPC Foundation, namespace http://opcfoundation.org/UA/Robotics/) standardizes how an industrial robot / motion device exposes its identity and live motion state so any OPC UA client (UaExpert, python asyncua, open62541, ...) reads the same MotionDeviceSystem structure across vendors.

This module builds the MotionDeviceSystem address space on top of the OPC UA Binary server (services/opcua, PROTOCORE_ENABLE_OPCUA): it registers a Browse + Read resolver that answers for the MotionDeviceSystem node hierarchy and serves live values out of a caller-owned RoboticsMotionDeviceSystem struct you refresh in your loop. Same pattern as services/umati (OPC 40501-1); no heap, no stdlib - the model is a fixed node table, the values are pointers/scalars in your struct.

Model exposed (BrowseNames per OPC 40010-1), under the Objects folder:

MotionDeviceSystem MotionDevices (Folder) MotionDevice Manufacturer, Model, ProductCode, SerialNumber, MotionDeviceCategory ParameterSet OnPath, InControl, SpeedOverride Axes (Folder) Axis_1..N ActualPosition, ActualSpeed, ActualAcceleration, MotionProfile Controllers (Folder) Controller Manufacturer, Model, ProductCode, SerialNumber Software Manufacturer, Model, SoftwareRevision SafetyStates (Folder) SafetyState ParameterSet OperationalMode, EmergencyStop, ProtectiveStop

The model is read-only (a monitoring model - the robot reports, the client observes). Scope note: one MotionDevice / Controller / SafetyState and PROTOCORE_ROBOTICS_AXES parametric axes are exposed (the common embedded robot); the values carry faithful BrowseNames, but the companion-spec TypeDefinitions, PowerTrains, and the NamespaceArray entry for the Robotics URI (which needs array-Variant support in the base server) are a documented follow-on - a generic OPC UA client still browses the structure and reads every value by BrowseName today.

work is PROTOCORE_ROBOTICS_BORROW bytes the CALLER took, at an address it knows. It is not held past the call, so nothing here aliases it. How those bytes are carved is this module's and is never named here.

Author
Douglas Quigg (dstroy0)
Date
2026

Definition in file robotics.h.

Macro Definition Documentation

◆ ROBOTICS_NS_URI

#define ROBOTICS_NS_URI   "http://opcfoundation.org/UA/Robotics/"

The OPC UA for Robotics companion-spec namespace URI (OPC 40010-1).

Definition at line 57 of file robotics.h.

Typedef Documentation

◆ RoboticsMotionDeviceCategory

MotionDeviceCategory (OPC 40010-1 MotionDeviceCategoryEnumeration). Exposed as Int32; the numeric values follow the companion-spec enumeration.

◆ RoboticsMotionProfile

Axis MotionProfile (OPC 40010-1 AxisMotionProfileEnumeration). Exposed as Int32; the numeric values follow the companion-spec enumeration.

◆ RoboticsOperationalMode

SafetyState OperationalMode (OPC 40010-1 OperationalModeEnumeration). Exposed as Int32; the numeric values follow the companion-spec enumeration.

Enumeration Type Documentation

◆ PROTO_ENUM_PACKED [1/3]

MotionDeviceCategory (OPC 40010-1 MotionDeviceCategoryEnumeration). Exposed as Int32; the numeric values follow the companion-spec enumeration.

Enumerator
ROBOTICS_CAT_OTHER 

a category outside the ones below.

ROBOTICS_CAT_ARTICULATED_ROBOT 

articulated (jointed-arm) robot.

ROBOTICS_CAT_SCARA_ROBOT 

SCARA robot.

ROBOTICS_CAT_CARTESIAN_ROBOT 

cartesian / gantry robot.

ROBOTICS_CAT_SPHERICAL_ROBOT 

spherical / polar robot.

ROBOTICS_CAT_PARALLEL_ROBOT 

parallel (delta) robot.

ROBOTICS_CAT_CYLINDRICAL_ROBOT 

cylindrical robot.

ROBOTICS_PROFILE_OTHER 

a profile outside the ones below.

ROBOTICS_PROFILE_ROTARY 

rotary axis (bounded travel).

ROBOTICS_PROFILE_ROTARY_ENDLESS 

rotary axis with endless rotation.

ROBOTICS_PROFILE_LINEAR 

linear axis (bounded travel).

ROBOTICS_PROFILE_LINEAR_ENDLESS 

linear axis with endless travel.

ROBOTICS_MODE_OTHER 

a mode outside the ones below.

ROBOTICS_MODE_MANUAL_REDUCED_SPEED 

manual jog, reduced speed (T1).

ROBOTICS_MODE_MANUAL_HIGH_SPEED 

manual, high speed (T2).

ROBOTICS_MODE_AUTOMATIC 

automatic program execution.

ROBOTICS_MODE_AUTOMATIC_EXTERNAL 

automatic, externally commanded.

Definition at line 63 of file robotics.h.

◆ PROTO_ENUM_PACKED [2/3]

Axis MotionProfile (OPC 40010-1 AxisMotionProfileEnumeration). Exposed as Int32; the numeric values follow the companion-spec enumeration.

Enumerator
ROBOTICS_CAT_OTHER 

a category outside the ones below.

ROBOTICS_CAT_ARTICULATED_ROBOT 

articulated (jointed-arm) robot.

ROBOTICS_CAT_SCARA_ROBOT 

SCARA robot.

ROBOTICS_CAT_CARTESIAN_ROBOT 

cartesian / gantry robot.

ROBOTICS_CAT_SPHERICAL_ROBOT 

spherical / polar robot.

ROBOTICS_CAT_PARALLEL_ROBOT 

parallel (delta) robot.

ROBOTICS_CAT_CYLINDRICAL_ROBOT 

cylindrical robot.

ROBOTICS_PROFILE_OTHER 

a profile outside the ones below.

ROBOTICS_PROFILE_ROTARY 

rotary axis (bounded travel).

ROBOTICS_PROFILE_ROTARY_ENDLESS 

rotary axis with endless rotation.

ROBOTICS_PROFILE_LINEAR 

linear axis (bounded travel).

ROBOTICS_PROFILE_LINEAR_ENDLESS 

linear axis with endless travel.

ROBOTICS_MODE_OTHER 

a mode outside the ones below.

ROBOTICS_MODE_MANUAL_REDUCED_SPEED 

manual jog, reduced speed (T1).

ROBOTICS_MODE_MANUAL_HIGH_SPEED 

manual, high speed (T2).

ROBOTICS_MODE_AUTOMATIC 

automatic program execution.

ROBOTICS_MODE_AUTOMATIC_EXTERNAL 

automatic, externally commanded.

Definition at line 78 of file robotics.h.

◆ PROTO_ENUM_PACKED [3/3]

SafetyState OperationalMode (OPC 40010-1 OperationalModeEnumeration). Exposed as Int32; the numeric values follow the companion-spec enumeration.

Enumerator
ROBOTICS_CAT_OTHER 

a category outside the ones below.

ROBOTICS_CAT_ARTICULATED_ROBOT 

articulated (jointed-arm) robot.

ROBOTICS_CAT_SCARA_ROBOT 

SCARA robot.

ROBOTICS_CAT_CARTESIAN_ROBOT 

cartesian / gantry robot.

ROBOTICS_CAT_SPHERICAL_ROBOT 

spherical / polar robot.

ROBOTICS_CAT_PARALLEL_ROBOT 

parallel (delta) robot.

ROBOTICS_CAT_CYLINDRICAL_ROBOT 

cylindrical robot.

ROBOTICS_PROFILE_OTHER 

a profile outside the ones below.

ROBOTICS_PROFILE_ROTARY 

rotary axis (bounded travel).

ROBOTICS_PROFILE_ROTARY_ENDLESS 

rotary axis with endless rotation.

ROBOTICS_PROFILE_LINEAR 

linear axis (bounded travel).

ROBOTICS_PROFILE_LINEAR_ENDLESS 

linear axis with endless travel.

ROBOTICS_MODE_OTHER 

a mode outside the ones below.

ROBOTICS_MODE_MANUAL_REDUCED_SPEED 

manual jog, reduced speed (T1).

ROBOTICS_MODE_MANUAL_HIGH_SPEED 

manual, high speed (T2).

ROBOTICS_MODE_AUTOMATIC 

automatic program execution.

ROBOTICS_MODE_AUTOMATIC_EXTERNAL 

automatic, externally commanded.

Definition at line 91 of file robotics.h.

Function Documentation

◆ PROTOCORE_NS_LAYOUT()

PROTOCORE_NS_LAYOUT ( RoboticsNs  ,
bind  ,
install   
)

◆ protocore_robotics_bind()

void protocore_robotics_bind ( uint8_t *  work,
const RoboticsMotionDeviceSystem *  mds 
)

Bind the MotionDeviceSystem the resolvers serve. mds must outlive .

Parameters
workPROTOCORE_ROBOTICS_BORROW bytes the caller took. Not held past the call.
mdsMds

◆ protocore_robotics_install()

void protocore_robotics_install ( uint8_t *  work,
const RoboticsMotionDeviceSystem *  mds 
)

Convenience: bind mds and register both resolvers on the OPC UA .

Parameters
workPROTOCORE_ROBOTICS_BORROW bytes the caller took. Not held past the call.
mdsMds

◆ protocore_robotics_span()

uint8_t * protocore_robotics_span ( void  )

The PROTOCORE_ROBOTICS_BORROW bytes this module's state lives in.

Stated beside the namespace rather than on it: an entry takes a borrow, and this is where that borrow comes from. Taken once from the end of the pool, which no mark and no release walks, so the state lasts the life of the program.

Returns
the span.

Variable Documentation

◆ PROTOCORE_UNUSED

PROTOCORE_NS RoboticsNs Robotics PROTOCORE_UNUSED
Initial value:
void protocore_robotics_install(uint8_t *work, const RoboticsMotionDeviceSystem *mds)
Convenience: bind mds and register both resolvers on the OPC UA .
void protocore_robotics_bind(uint8_t *work, const RoboticsMotionDeviceSystem *mds)
Bind the MotionDeviceSystem the resolvers serve. mds must outlive .

Module namespace.

Definition at line 190 of file robotics.h.