template<class Class>
OcaBlockFactory class
Template parameters | |
---|---|
Class | - Class to wrap. |
Contents
This class template detects the methods and events defined for the class OcaBlockFactory in the AES70 specification and exposes them through AES70. Note that all AES70 methods and event handlers need to be public in order to be detected.
Detects the following symbols with the corresponding detector classes:
DefineProtoPort : aes70::
device:: Method Arguments:
- name : OcaString
- portmode : OcaPortMode
Return values:
- id : OcaProtoPortID
UndefineProtoPort : aes70::
device:: Method Arguments:
- ProtoPortID : OcaProtoPortID
GetProtoPorts : aes70::
device:: Getter Return values:
- Ports : OcaList<OcaProtoPort>
DefineProtoMemberUsingFactory : aes70::
device:: Method Arguments:
- FactoryONo : OcaUint32
Return values:
- ProtoObjectNumber : OcaUint32
UndefineProtoMember : aes70::
device:: Method Arguments:
- ProtoObjectNumber : OcaUint32
GetProtoMembers : aes70::
device:: Getter Return values:
- Members : OcaList<OcaProtoObjectIdentification>
DefineProtoSignalPath : aes70::
device:: Method Arguments:
- Path : OcaProtoSignalPath
Return values:
- Index : OcaUint16
UndefineProtoSignalPath : aes70::
device:: Method Return values:
- Index : OcaUint16
GetProtoSignalPaths : aes70::
device:: Getter Return values:
- Members : OcaMap<OcaUint16, OcaProtoSignalPath>
GetGlobalType : aes70::
device:: Getter Return values:
- GlobalType : OcaGlobalTypeIdentifier
SetGlobalType : aes70::
device:: Setter Arguments:
- GlobalType : OcaGlobalTypeIdentifier
Detects the following event handlers for property changes (of type aes70::
- OnProtoPortsChanged with property encoder OCP1::
OcaList<OCP1:: Struct<OCP1:: OcaUint32, OCP1::Struct<OCP1::OcaUint8, OCP1::OcaUint16>, OCP1:: OcaString>> - OnProtoMembersChanged with property encoder OCP1::
OcaList<OCP1:: Struct<OCP1:: OcaUint32, OCP1:: Struct<OCP1::OcaList<OCP1::OcaUint16>, OCP1:: OcaUint16>>> - OnProtoSignalPathsChanged with property encoder OCP1::
OcaMap<OCP1:: OcaUint16, OCP1:: Struct<OCP1:: Struct<OCP1:: OcaUint32, OCP1::Struct<OCP1::OcaUint8, OCP1::OcaUint16>, OCP1:: OcaString>, OCP1:: Struct<OCP1:: OcaUint32, OCP1::Struct<OCP1::OcaUint8, OCP1::OcaUint16>, OCP1:: OcaString>>> - OnGlobalTypeChanged with property encoder OCP1::
Struct<OCP1::OcaBlobFixedLen<3>, OCP1:: OcaUint32>
From the AES70 standard:
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.
Base classes
-
template<class Class>class OcaWorker
Public static variables
- static const OcaClassVersionNumber ClassVersion
-
static const classid_
tpl<3> ClassId - static const size_t count_events
Public static functions
- static auto get_event_index(OcaEventID id, size_t index) -> AES70_ALWAYS_INLINE ptrdiff_t
Constructors, destructors, conversion operators
-
template<typename ... TN>OcaBlockFactory(TN && ... args)
Public functions
- auto get_class_version() const -> uint16_t virtual
- auto get_classid() const -> const classid& virtual
-
void init(aes70::
device:: device* d, uint32_t n) virtual -
auto call(const OcaMethodID id,
const uint8_t* src,
const uint8_t* src_end,
uint8_t parameterCount,
const aes70::
response_generator& response) -> bool virtual - auto get_event_index(const OcaEventID OcaEventID) const -> ptrdiff_t virtual
Function documentation
template<classClass>
static AES70_ALWAYS_INLINE ptrdiff_t aes70:: device:: OcaBlockFactory<Class>:: get_event_index(OcaEventID id,
size_t index)
Internal class for finding the event index of a given EventID. Returns -1 if the given event is not defined.
template<classClass>
template<typename ... TN>
aes70:: device:: OcaBlockFactory<Class>:: OcaBlockFactory(TN && ... args)
Constructor which calls the constructor of Class with args forwarded.
template<classClass>
uint16_t aes70:: device:: OcaBlockFactory<Class>:: get_class_version() const virtual
Returns the AES70 class version of this object.
template<classClass>
const classid& aes70:: device:: OcaBlockFactory<Class>:: get_classid() const virtual
Returns the AES70 class id of this object.
template<classClass>
void aes70:: device:: OcaBlockFactory<Class>:: init(aes70:: device:: device* d,
uint32_t n) virtual
Called when this object is added to a device.
template<classClass>
bool aes70:: device:: OcaBlockFactory<Class>:: call(const OcaMethodID id,
const uint8_t* src,
const uint8_t* src_end,
uint8_t parameterCount,
const aes70:: response_generator& response) virtual
Internal method used to call AES70 methods in this object.
template<classClass>
ptrdiff_t aes70:: device:: OcaBlockFactory<Class>:: get_event_index(const OcaEventID OcaEventID) const virtual
Returns the index of a given event. The idea is that all events defined on a aes70 class can be enumerated. For events which this object does not implement, the value -1 is returned.
Variable documentation
template<classClass>
static const OcaClassVersionNumber aes70:: device:: OcaBlockFactory<Class>:: ClassVersion
The ClassVersion of this class according to the AES70 standard.
template<classClass>
static const classid_ tpl<3> aes70:: device:: OcaBlockFactory<Class>:: ClassId
The ClassID of this class according to the AES70 standard.
template<classClass>
static const size_t aes70:: device:: OcaBlockFactory<Class>:: count_events
Number of events defined in this class. This depends on which events are implemented by Class.