template<class Class>
aes70::device::OcaMatrix class

Template parameters
Class - Class to wrap.

This class template detects the methods and events defined for the class OcaMatrix 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:

Detects the following event handlers for property changes (of type aes70::property_change_event ):

From the AES70 standard:

A matrix is a rectangular array of identical objects ("members") that is coordinate addressable and has sets of common input and output ports. The matrix host does not instantiate these objects, but instead mediates the coordinate addressing, implements the common input and output ports, and provdes certain other aggregate functions. Matrix members may be workers (including blocks), or agents. All members of a matrix must be of the same class. No object may belong to more than one matrix at a time. No object may appear more than once in a given matrix. The complete model of an OCA matrix consists of: 1. One instance of OcaMatrix. 2. (N x M) members, where each member is an instance of a worker or agent class. For any given matrix, this class must be the same for all members, and is referred to as the member class. Members are sometimes referred to as cells of the matrix. 3. One additional instance of the member class, called the matrix proxy. Thus, the OcaMatrix instance is a container for the two-dimensional collection of its members. Once a matrix is set up, the controller may get and set member properties by the following procedures: Get To get a property value of member (x1, y1): 1. Controller calls OcaMatrix.SetXY(x1, y1). This action: - locks the OcaMatrix instance, and - posts x1 and y1 as coordinates of the object whose property value is to be retrieved. 2. Controller calls the matrix proxy's Get method for the property value desired. This action causes the OcaMatrix instance to: - decode the posted x1 and y1 values into a member ONo. - call the given Get method for the object identified by the decoded ONo. - aggregate the OcaResult from each Get call into a consolidated OcaResult. - unlock the OcaMatrix instance. - return the consolidated OcaResult to the controller. Set To set a property value of member (x1, y1), or of row (0, y1) or column (x1, 0) or whole matrix (0,0) 1. Controller calls OcaMatrix.SetXY(x1, y1). This action:

  • locks the OcaMatrix instance, and - posts x1 and y1 as coordinates of the object whose property value is to be changed. 2. Controller calls the matrix proxy's Set method for the target property. This action causes the OcaMatrix instance to: - decode the posted x1 and y1 values into a list of target member ONos, as follows: If x1 > 0 and y1 > 0, the list will be the single ONo of the addressed cell. If x1 = 0 and y1 > 0, the list will be the list of ONos of the cells in row y1 . If x1 > 0 and y1 = 0, the list will be the list of ONos of the cells in column x1. If x1 = 0 and y1 = 0, the list will be the list of ONos of all cells of the matrix. - call the given Set method for each target member in the ONo list. - aggregate the OcaResult from each Set call into a consolidated OcaResult. - unlock the OcaMatrix instance.

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>
OcaMatrix(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::OcaMatrix<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::OcaMatrix<Class>::OcaMatrix(TN && ... args)

Constructor which calls the constructor of Class with args forwarded.

template<classClass>
uint16_t aes70::device::OcaMatrix<Class>::get_class_version() const virtual

Returns the AES70 class version of this object.

template<classClass>
const classid& aes70::device::OcaMatrix<Class>::get_classid() const virtual

Returns the AES70 class id of this object.

template<classClass>
void aes70::device::OcaMatrix<Class>::init(aes70::device::device* d, uint32_t n) virtual

Called when this object is added to a device.

template<classClass>
bool aes70::device::OcaMatrix<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::OcaMatrix<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::OcaMatrix<Class>::ClassVersion

The ClassVersion of this class according to the AES70 standard.

template<classClass>
static const classid_tpl<3> aes70::device::OcaMatrix<Class>::ClassId

The ClassID of this class according to the AES70 standard.

template<classClass>
static const size_t aes70::device::OcaMatrix<Class>::count_events

Number of events defined in this class. This depends on which events are implemented by Class.