Skip to Content
FASTSUITE E2API ReferencePython APIAPI DomainsEvent HandlingResource Port Event

Resource Port Event

Quick Facts

PropertyValue
ClassCENPyOlpResourcePortEvent
Modulecenpylib.CENPyOlpResourcePortEvent
Packagecenpylib
ReleaseR2025.2.4
Methods7
Inherits fromCENPyOlpBuiltInEvent
SubclassesSet Resource Port Event, Wait For Resource Port Event

Inheritance

Quick Start

# Boilerplate Example # Acquire the event object from the runtime context resourcePortEvent = ... # provided by the framework

Method Index

MethodReturnsSummary
SetResourceAssigns a resource to this event.
GetResourceCENPyOlpResourceGet the resource that is currently assigned to this event.
AddResourcePortBoolAdds a port and a bool value for the port that this event should set.
AddResourcePortByteAdds a port and a byte value for the port that this event should set.
AddResourcePortIntAdds a port and an integer value for the port that this event should set.
AddResourcePortInt16Adds a port and an 16 bit integer value for the port that this event should set.
AddResourcePortFloatAdds a port and a floating point value for the port that this event should set.

Query Methods

GetResource

def GetResource() -> CENPyOlpResource

Get the resource that is currently assigned to this event.

Returns: CENPyOlpResource — Parent resource.

Mutation Methods

SetResource

def SetResource(resource: CENPyOlpResource)

Assigns a resource to this event. The event can only set ports of the one resource that is currently assigned. Please note! In order to add resource ports and set their values, the resource must be set to a port event.

Parameters:

NameTypeDescription
resourceCENPyOlpResourceResource that should be assigned to this event.

AddResourcePortBool

def AddResourcePortBool(port: CENPyOlpPort, value: bool)

Adds a port and a bool value for the port that this event should set. When the event is executed in simulation it will set the designated values to the ports that were added. If the port does not belong to the assigned resource it will not be added. If the port is not a bool input port it will not be added. If the port is already added its current value will be overwritten.

Parameters:

NameTypeDescription
portCENPyOlpPortThe port to be added.
valueboolThe value for the port.

AddResourcePortByte

def AddResourcePortByte(port: CENPyOlpPort, value: int)

Adds a port and a byte value for the port that this event should set. When the event is executed in simulation it will set the designated values to the ports that were added. If the port does not belong to the assigned resource it will not be added. If the port is not a byte input port it will not be added. If the port is already added its current value will be overwritten.

Parameters:

NameTypeDescription
portCENPyOlpPortThe port to be added.
valueintThe value for the port.

AddResourcePortInt

def AddResourcePortInt(port: CENPyOlpPort, value: int)

Adds a port and an integer value for the port that this event should set. When the event is executed in simulation it will set the designated values to the ports that were added. If the port does not belong to the assigned resource it will not be added. If the port is not a 32 - bit integer port it will not be added. If the port is already added its current value will be overwritten.

Parameters:

NameTypeDescription
portCENPyOlpPortThe port to be added.
valueintThe value for the port.

AddResourcePortInt16

def AddResourcePortInt16(port: CENPyOlpPort, value: int)

Adds a port and an 16 bit integer value for the port that this event should set. When the event is executed in simulation it will set the designated values to the ports that were added. If the port does not belong to the assigned resource it will not be added. If the port is not a 16 - bit integer port it will not be added. If the port is already added its current value will be overwritten.

Parameters:

NameTypeDescription
portCENPyOlpPortThe port to be added.
valueintThe value for the port.

AddResourcePortFloat

def AddResourcePortFloat(port: CENPyOlpPort, value: float)

Adds a port and a floating point value for the port that this event should set. When the event is executed in simulation it will set the designated values to the ports that were added. If the port does not belong to the assigned resource it will not be added. If the port is not a float input port it will not be added. If the port is already added its current value will be overwritten.

Parameters:

NameTypeDescription
portCENPyOlpPortThe port to be added.
valuefloatThe value for the port.

Version Notes

This class is documented as of release R2025.2.4.

Was this page helpful?