Skip to Content

Core Resource

Quick Facts

PropertyValue
ClassOlpCorePythonResource
Modulecenpyolpcore.OlpCorePythonResource
Packagecenpyolpcore
ReleaseR2025.2.4
Methods6
Inherits fromOlpCorePythonItem

Inheritance

Quick Start

# Boilerplate Example coreResource = ... # obtained from the runtime context result = coreResource.GetItemType()

Method Index

MethodReturnsSummary
GetItemTypeItemTypeReturns the item type of this resource
GetItemSubTypeItemSubTypeReturns the item subtype of this resource
GetSupportedConfigurationslistGets all supported configurations on this resource if the resource is a machine or robot
GetSupportedTurnslistGets all supported turns on this resource if the resource is a machine or robot
GetAllPortslistGet all ports that are currently active in this resource.
GetPortslistGet all ports that are currently active in this resource with the value type and the direction specified.

Query Methods

GetItemType

def GetItemType() -> ItemType

Returns the item type of this resource

Returns: ItemType — None

GetItemSubType

def GetItemSubType() -> ItemSubType

Returns the item subtype of this resource

Returns: ItemSubType — None

GetSupportedConfigurations

def GetSupportedConfigurations() -> list

Gets all supported configurations on this resource if the resource is a machine or robot

Returns: list — returns all supported configurations on this resource as list of strings

GetSupportedTurns

def GetSupportedTurns() -> list

Gets all supported turns on this resource if the resource is a machine or robot

Returns: list — returns all supported turns on this resource as list of strings

GetAllPorts

def GetAllPorts() -> list

Get all ports that are currently active in this resource.

Returns: list — a vector with all the ports found on the resource

GetPorts

def GetPorts(valueType: int, direction: int) -> list

Get all ports that are currently active in this resource with the value type and the direction specified.

Parameters:

NameTypeDescription
valueTypeintport value type
directionintport direction

Returns: list — a vector with all the ports found on the resource

Version Notes

This class is documented as of release R2025.2.4.

Was this page helpful?