Framework Components Application Programming Interface (API)  fc-v07
Data Fields
IRESMAN_ConstructFxns Struct Reference

These functions are used to determine memory requirements for and initialize the IRES protocol's environment that will be allocated by the resource manager. More...

#include <iresman_protocol.h>

Collaboration diagram for IRESMAN_ConstructFxns:
Collaboration graph

Data Fields

String(* getName )()
 
IRES_ProtocolRevision *(* getRevision )()
 
IRES_Status(* getMemRecs )(IRES_Handle handle, IRES_ProtocolArgs *protocolArgs, IALG_MemRec *memRecs)
 
Int(* getNumMemRecs )(IRES_ProtocolArgs *protocolArgs)
 
IRES_Handle(* constructHandle )(IRES_ProtocolArgs *protocolArgs, IALG_MemRec *memRecs, IRESMAN_ConstructArgs *constructHandleArgs, IRES_Status *status)
 
IRES_Status(* destructHandle )(IRES_Handle handle)
 

Detailed Description

These functions are used to determine memory requirements for and initialize the IRES protocol's environment that will be allocated by the resource manager.

Remarks
These fxns are implemented by the IRES protocol that is used for a given channel (e.g, ACPY3), and are passed in the IRES_ProtocolArgs and IRES_ResmanProtocolConstructArgs structure to request a logical resource.
getName() - Called by the resource manager to query the name of the protocol to return to the generic Resource Manager RMAN
getRevision() - Called by the resource manager to query the revision of the protocol to return to the generic Resource Manager RMAN
getMemRecs() - Called by the resource manager when creating a resource handle to query the specific resource protocol's memory requirements. Since IRES is an abstract interface, the actual size of the handle can be extended by the specific resource protocol.
getNumMemRecs() - Called by the resource manager when creating a logical resource handle to obtain the number of IALG memory request descriptors the protocol uses to request memory for the resource handle.
constructHandle() - Called by the resource manager after allocating memory for the handle, so that the resource specific custom protocol initializes the handle.
destructHandle() - Called by the resource manager just before the resource is freed, to allow the custom IRES protocol to perform any required de-initialization.

Field Documentation

String(* IRESMAN_ConstructFxns::getName) ()

Query for identification for protocol

IRES_ProtocolRevision*(* IRESMAN_ConstructFxns::getRevision) ()

Query for revision of the protocol

IRES_Status(* IRESMAN_ConstructFxns::getMemRecs) (IRES_Handle handle, IRES_ProtocolArgs *protocolArgs, IALG_MemRec *memRecs)

Obtain the memory requirements that must be allocated by the framework to construct a resource handle.

The 'protocol' determines the size and attributes of the memory that represents the logical resource. The size must be at least the size of IRES_Obj. The first sizeof(IRES_Obj) bytes are assigned by the Resource Manager, the protocol may request additional 'environment' memory to follow the IRES_Obj.

The "IRES_Handle handle" argument may be NULL, in which case the resource protocol fills in the memRecs with the attributes of the memory that is needed to create a handle.

Resource Manager may call this function anytime after the 'constructHandle()' call with a valid IRES_Handle to find out the memory assigned to the resource handle. Prior to the 'constructHandle()' call, or when a NULL IRES_Handle argument is supplied, the value(s) returned in the memRecs' IALG_MemRec::base fields are undefined.

Int(* IRESMAN_ConstructFxns::getNumMemRecs) (IRES_ProtocolArgs *protocolArgs)

Obtain the number of IALG memory request descriptors the protocol uses to request memory for the resource handle.

IRES_Handle(* IRESMAN_ConstructFxns::constructHandle) (IRES_ProtocolArgs *protocolArgs, IALG_MemRec *memRecs, IRESMAN_ConstructArgs *constructHandleArgs, IRES_Status *status)

Protocol specific initialization function to finalize the creation a resource object (handle). The protocol::constructHandle function can extend the IRES_Obj structure and must store any additional allocated 'environment' memory within the resource handle and return the IALG_MemRec descriptors in protocol::getResourceMemRecs() function.

Two types of arguments are passed to this function, protocolArgs that are forwarded from the IRES_Protocol and the constructHandleArgs that consists of information from the Resource Manager required to construct a Resource handle. Return valid resource handle on success, and set status to IRES_OK. Return NULL and indicate an IRES Error status otherwise.

IRES_Status(* IRESMAN_ConstructFxns::destructHandle) (IRES_Handle handle)

Perform any resource specific operations that may be required before the resource is reclaimed by the resource manager.


The documentation for this struct was generated from the following file:
Copyright 2016, Texas Instruments Incorporated