Index

Class OcaBlockFactory

ClassID: 1.1.4

extends OcaWorker

Factory to create custom block instances. Used only in reconfigurable devices. The idea is that you instantiate a factory once, populate it with proto-objects and proto-signal paths, then use it subsequently to instantiate identical blocks. In this context, proto-object means a prototype of a block member. Unbound objects are identified by proto-object numbers (PONo's) instead of actual object numbers. PONos are unique within the factory, and are converted to globally unique object numbers ONos) in all new block instances that the factory builds. Correspondingly, proto-signal path means a signal path expressed in terms of PONos rather than ONos. When the factory constructs a block, it converts all of its unbound signal paths to normal (bound) signal paths by mapping its PONos into ONos. The factory also holds a list of proto-blockports which are OcaPorts that are allocated to new blocks the factory builds. As well, the proto-objects in the factory may contain lists of their own proto-ports. Together, the factory's proto-ports and its members' proto-ports are used to define the factory's set of proto-signal paths. Factories may be predefined at time of device manufacture, or constructed "on the fly" by controllers. To create a factory, the controller calls a block's CreateMember(...) method with the ClassID of this class (OcaBlockFactory). Factories ignore which block creates them, so it makes no difference which block's CreateMember(...) method is used. It will usually make the most sense to use the Root Block's method. To add proto-objects, proto-ports, and proto-signal paths to a block factory, the controller calls the factory's DefineProtoMember(...), DefineProtoPort(...), and DefineProtoSignalPath(...) methods, respectively.

Properties

static readonly OcaClassID ClassID = 1.1.4

Level: 1 Index: 1

This property is an override of the OcaRoot property.

static readonly OcaClassVersionNumber ClassVersion = 2

Level: 1 Index: 2

Identifies the interface version of the class. Any change to the class definition leads to a higher class version. This property is an override of the OcaRoot property.

OcaList<OcaProtoPort> ProtoPorts

Level: 3 Index: 1

List of proto-ports for built objects. The factory itself has no ports.

OcaList<OcaProtoObjectIdentification> ProtoMembers

Level: 3 Index: 2

List of prot-object identifiers of proto-members in the block.

OcaMap<OcaUint16,OcaProtoSignalPath> ProtoSignalPaths

Level: 3 Index: 3

List of proto-signal paths in the block.

OcaGlobalTypeIdentifier GlobalType

Level: 3 Index: 4

Global block type identifier for reusable blocks. Added in version 2 of this class.

Properties inherited from OcaWorker

OcaBoolean Enabled

OcaList<OcaPort> Ports

OcaString Label

OcaONo Owner

OcaTimeInterval Latency

Properties inherited from OcaRoot

readonly OcaONo ObjectNumber

readonly OcaBoolean Lockable

readonly OcaString Role

Methods

OcaBlockFactory::DefineProtoPort ( OcaString name, OcaPortMode portmode ) → ( OcaProtoPortID id)

Level: 3 Index: 1

Defines a proto-port in the factory. If proto-port already exists, it is replaced with the one from this call. The return value indicates whether the proto-port was successfully added.

OcaBlockFactory::UndefineProtoPort ( OcaProtoPortID ProtoPortID )

Level: 3 Index: 2

Deletes a proto-port from the factory. The return value indicates whether the proto-port was successfully deleted.

OcaBlockFactory::GetProtoPorts ( ) → ( OcaList<OcaProtoPort> Ports)

Level: 3 Index: 3

Gets the factory's list of proto-ports. The return value indicates whether the list was successfully retrieved.

OcaBlockFactory::DefineProtoMember ( OcaClassID ClassIdentification, ConstructionParameterDataType ConstructionParameters ) → ( OcaProtoONo ProtoObjectNumber)

Level: 3 Index: 4

Defines a proto-member of the given class in the factory. The most current version of the class is used. The return value indicates whether the proto-member was successfully defined.

OcaBlockFactory::DefineProtoMemberUsingFactory ( OcaONo FactoryONo ) → ( OcaProtoONo ProtoObjectNumber)

Level: 3 Index: 5

Defines a proto-member which will be instantiated by a specified factory when the block is built. The return value indicates whether the proto-member was successfully defined.

OcaBlockFactory::UndefineProtoMember ( OcaProtoONo ProtoObjectNumber )

Level: 3 Index: 6

Deletes a proto-member from the factory. Deletes all proto-signal paths attached to its ports. The return value indicates whether the member was successfully deleted.

OcaBlockFactory::GetProtoMembers ( ) → ( OcaList<OcaProtoObjectIdentification> Members)

Level: 3 Index: 7

Gets the factory's list of proto-members. Does not recurse inner proto-blocks. The return value indicates whether the list was successfully retrieved.

OcaBlockFactory::DefineProtoSignalPath ( OcaProtoSignalPath Path ) → ( OcaUint16 Index)

Level: 3 Index: 8

Defines a proto-signal path in the factory. The return value indicates whether the proto-signal path was successfully defined.

OcaBlockFactory::UndefineProtoSignalPath ( ) → ( OcaUint16 Index)

Level: 3 Index: 9

Deletes a proto-signal path from the factory. The return value indicates whether the signal path was successfully added.

OcaBlockFactory::GetProtoSignalPaths ( ) → ( OcaMap<OcaUint16,OcaProtoSignalPath> Members)

Level: 3 Index: 10

Gets the factory's list of proto-signal paths. Map key is proto-signal path ID. Does not recurse inner proto-blocks. The return value indicates whether the list was successfully retrieved.

OcaBlockFactory::GetGlobalType ( ) → ( OcaGlobalTypeIdentifier GlobalType)

Level: 3 Index: 11

Gets the global type identifier for blocks created by this factory. The return value indicates whether the identifier was successfully retrieved. Added in version 2 of this class.

OcaBlockFactory::SetGlobalType ( OcaGlobalTypeIdentifier GlobalType )

Level: 3 Index: 12

Sets the global type identifier for blocks created by this factory. The return value indicates whether the identifier was successfully set. Added in version 2 of this class.

Methods inherited from OcaWorker

OcaWorker::GetEnabled ( ) → ( OcaBoolean enabled)

OcaWorker::SetEnabled ( OcaBoolean enabled )

OcaWorker::AddPort ( OcaString Label, OcaPortMode Mode ) → ( OcaPortID ID)

OcaWorker::DeletePort ( OcaPortID ID )

OcaWorker::GetPorts ( ) → ( OcaList<OcaPort> OcaPorts)

OcaWorker::GetPortName ( OcaPortID PortID ) → ( OcaString Name)

OcaWorker::SetPortName ( OcaPortID PortID, OcaString Name )

OcaWorker::GetLabel ( ) → ( OcaString label)

OcaWorker::SetLabel ( OcaString label )

OcaWorker::GetOwner ( ) → ( OcaONo owner)

OcaWorker::GetLatency ( ) → ( OcaTimeInterval latency)

OcaWorker::SetLatency ( OcaTimeInterval latency )

OcaWorker::GetPath ( ) → ( OcaNamePath NamePath, OcaONoPath ONoPath)

Methods inherited from OcaRoot

OcaRoot::GetClassIdentification ( ) → ( OcaClassIdentification ClassIdentification)

OcaRoot::GetLockable ( ) → ( OcaBoolean lockable)

OcaRoot::LockTotal ( )

OcaRoot::Unlock ( )

OcaRoot::GetRole ( ) → ( OcaString Role)

OcaRoot::LockReadonly ( )