A.2.1. CADIBroker class definition

The CADIBroker class definition is shown in Example A.2.

Note

The CADI broker owns all CADI simulations and no other class is permitted to delete them.

If a CADI factory creates a simulation, it must transfer the pointer to the new simulation to the broker.

If the simulation is shut down or killed, the broker is responsible for deleting the simulation. This must be done by processing GetSimulationInfos() and checking for running simulations (check that the reference count is 0 and any other implementation-specific conditions are in the appropriate state).

Example A.2. The CADIBroker class

class WEXP CADIBroker: public CAInterface
{
public:
static if_name_t IFNAME() { return "eslapi.CADIBroker2"; }
static if_rev_t IFREVISION() { return 0; }

virtual ~CADIBroker() {}

virtual void Release() = 0;

virtual CADIReturn_t GetSimulationFactories(uint32_t startFactoryIndex,
     uint32_t desiredNumberOfFactories, CADISimulationFactory **factoryList,
     uint32_t *actualNumberOfFactories) = 0;

virtual CADIReturn_t GetSimulationInfos(uint32_t startSimulationInfoIndex, 
     uint32_t desiredNumberOfSimulations, CADISimulationInfo_t *simulationList,
     uint32_t *actualNumberOfSimulations) = 0;

virtual CADISimulation* SelectSimulation( uint32_t simulationId, 
     CADIErrorCallback* errorCallbackObject, CADISimulationCallback*
     simulationCallbackObject, 
     char simulationCallbacksEnable[CADI_SIM_CB_Count])=0;
};

Copyright © 2008-2011 ARM. All rights reserved.ARM DUI 0444H
Non-ConfidentialID010512