PlatformAdapterManagedObject
- Namespace
- ZPlatform
- Extends
- Inherited Properties
- Inherited Methods
- Implements
FUNCTION_BLOCK ABSTRACT PlatformAdapterManagedObject EXTENDS ZCore.ManagedObject IMPLEMENTS ZCore.IManagedObject, ZCore.IObject, ZCore.IBootable, ZCore.IError (
[output] State : ObjectState)
This functionblock extends a ManagedObject with functions that
are commonly used when building adapters around original Beckhoff function blocks that have
"cyclic behavior" (busy
, error
, errorId
variables in the output of the function block).
Such functionblocks do not have an interface that fits nicely into the framework, but try to
achieve something similar like we handle with the Object in an object-oriented way.
Notably, this implementation overwrites Object.AbortErrorId to automatically write nice error details when aborting the object with an AdsErrorCode.
This function block should be adapted by all function blocks that are wrapped around Beckhoff function blocks.
However, in contrast to PlatformAdapterObject
it is intended for function blocks that are automatically called by a parent
, which is passed
during construction of this object with FB_init.
PlatformAdapterManagedObject per default do not have a Booting phase. This is achived by setting the state to idle when the object is constructed via the object's FB_init
Constructor
FB_init
METHOD FB_init (
[input] bInitRetains : BOOL,
[input] bInCopyCode : BOOL,
[input] parent : ZCore.IManagedObject) : BOOL
Inputs
bInitRetains
BOOLif TRUE, the retain variables are initialized (warm start / cold start)
bInCopyCode
BOOLif TRUE, the instance afterwards gets moved into the copy code (online change)
parent
IManagedObjectInterface to the ManagedObject that is the parent of this object
Returns
- BOOL
Methods
AbortErrorId
METHOD PROTECTED AbortErrorId (
[input] errorId : UDINT,
[input] message : ZCore.ZString)
Inputs
errorId
UDINTmessage
ZString(optional) gets concatenated to the errorMessage we decode out of the errorId of the original Beckhoff functionblock