INOS
CINOSCOPModule Class Reference

The class handling a single COP module. More...

#include <cinoscopmodule.h>

Public Member Functions

const charGetName ()
 get module name
 
const charGetInfo ()
 get module info
 
const charGetStateText ()
 Get state text.
 
uint32 GetAddress ()
 get module address
 
voidGetEepromAddress (uint32 auOffset)
 get eeprom address
 
voidGetEepromAddress (const char *apName, uint32 auOffset)
 
uint32 GetEepromSize ()
 get eeprom address
 
XMLNode GetXmlNode ()
 Get card node.
 
CINCOObject * GetInco ()
 get inco
 
virtual const charGetXmlCompressedAddr ()
 get address of xml description
 
virtual uint32 GetXmlSize ()
 get size of xml description
 
virtual uint32 GetXmlCompressedSize ()
 get compressed size of xml description
 
bool HasRamPortsProtected ()
 Check if module needs config enable bit set for writing ram ports F8/F9.
 
bool IsRamLittleEndian ()
 Check if module ram is little endian.
 
void GetBoardInfo (SINOSCOPModuleEeprom &aBoardInfo, bool &abEepromValid)
 Get board info for target registration.
 
void SetBoardInfo (SINOSCOPModuleEeprom &aBoardInfo)
 Set board info for target registration.
 
uint32 GetFpgaRevision ()
 Get the fpga revision.
 
uint16 GetAddressSwitch ()
 Get the address switch read after scanning.
 
void FixPortRegistration ()
 Adjust the ports registration to show the real value.
 
void Startup ()
 run startup actions
 
CINOSCOPModuleGetNext ()
 module pointer to next cop module
 
void SetNext (CINOSCOPModule *apNext)
 set pointer to next cop module
 
void SetDistributionModule (CINOSCOPModule *apDist, char *apXml)
 set pointer to distribution module
 
uint32 PutBlock32 (uint32 auDest, uint32 *apSource, uint16 auNumber, uint32 auFlags=0)
 Write a number of 32 bit values.
 
uint32 GetBlock32 (uint32 auSource, uint32 *apDest, uint16 auNumber, uint32 auFlags=0)
 Read a number of 32 bit values.
 
uint32 PutBlock16 (uint32 auDest, uint16 *apSource, uint16 auNumber, uint32 auFlags=0)
 put block of 16 bit values
 
uint32 GetBlock16 (uint32 auSource, uint16 *apDest, uint16 auNumber, uint32 auFlags=0)
 get block of 16 bit values
 
uint32 PutBlock8 (uint32 auDest, uint8 *apSource, uint16 auNumber, uint32 auFlags=0)
 Write a number of 8 bit values.
 
uint32 GetBlock8 (uint32 auSource, uint8 *apDest, uint16 auNumber, uint32 auFlags=0)
 Read a number of 8 bit values.
 
uint32 PortPut16 (uint16 auNumber, uint16 auValue)
 put 16 bit value to cop module port
 
uint32 PortGet16 (uint16 auNumber, uint16 &auValue)
 get 16 bit value from cop module port
 
uint32 PortPut32 (uint16 auNumber, uint32 auValue)
 put 32 bit value to cop module port
 
uint32 PortGet32 (uint16 auNumber, uint32 &auValue)
 get 32 bit value from cop module port
 
uint32 GetVariable (const char *apName, real64 &arValue)
 get variable from module tree
 
uint32 GetVariable (const char *apName, char *apValue, uint32 auLength)
 get variable from module tree
 
uint32 GetVariableEx (const char *apName, uint32 auIncoType, void *apValue, uint32 auSize)
 get variable from module tree
 
uint32 PutVariable (const char *apName, real64 arValue)
 put variable in module tree
 
uint32 PutVariable (const char *apName, const char *apValue)
 put variable in module tree
 
uint32 CallProcedure (const char *apName, long aiNrOfParameters, void *apParameters, void *apResult)
 call procedure.
 
 CINOSCOPModule (CINOSCOPMaster *apMaster, SINOSCOPModule *apDesc, SINOSCOPModuleEeprom *apEeprom, XMLNode aCardNode, CINCOCOPDevice *apDevice, bool abOnline)
 Constructor of COP module.
 
virtual ~CINOSCOPModule ()
 Destructor.
 
CINCOCOPDeviceGetDevice ()
 get pointer to cop inco device
 
void RegisterRam ()
 Register variables pointing into onboard ram.
 
bool CheckRangeCondition (CINOSBusPortHandlerRangeCondition *apCond)
 Check if the condition of a range is met.
 
void ResolveEepromValues (XMLNode &aAction)
 Resolve values with eeprom references (e.g. uint16:Eeprom[80]).
 
template<class T >
T GetEepromValue (uint32 auOffset)
 Get eeprom value with certain type.
 
virtual uint32 EepromRead ()
 Read cop bus module eeprom.
 
virtual uint32 EepromWrite ()
 Write cop bus module eeprom.
 
void UpdateTargetString ()
 Terminate eeprom strings and update info string.
 
void SetXmlModValid (bool abXmlModValid)
 Set validity of module's xml file.
 
void SetXmlMod (const char *apModXml)
 Set content of module's xml file.
 
bool IsOnline ()
 Return online state of cop module.
 
bool IsEepromValid ()
 Return true if eeprom is valid.
 
void FixPortRegistration (CINCOItem *apItem, uint32 *apTable, uint32 auTableSize)
 Fix the registration of a write port item (recursively).
 
void EnablePortCache ()
 Enable port cache.
 
void DisablePortCache ()
 Disable port cache.
 
void SetupPortCache (uint16 auNumber, uint8 auSize, const char *apType)
 Check if given port needs to be cached.
 
void UpdatePortCache (uint16 auNumber, uint8 auSize)
 Update cache of given port.
 
bool IsPortCachable (uint16 auNumber)
 Check if port cachable.
 
bool IsPortCached (uint16 auNumber)
 Check if port cached.
 

Friends

class CINOSCOPMaster
 

Detailed Description

The class handling a single COP module.

Constructor & Destructor Documentation

◆ CINOSCOPModule()

CINOSCOPModule::CINOSCOPModule ( CINOSCOPMaster apMaster,
SINOSCOPModule apDesc,
SINOSCOPModuleEeprom apEeprom,
XMLNode  aCardNode,
CINCOCOPDevice apDevice,
bool  abOnline 
)

Constructor of COP module.

Parameters
apMasterPointer to bus master.
apDescDescriptor of module.
apEepromEeprom content read from module.
aCardNodeParsed xml data from module or user config.
apDeviceInco device used to read from and write to module.
abOnlineFlag if mosule is online (scanned).

Member Function Documentation

◆ CheckRangeCondition()

bool CINOSCOPModule::CheckRangeCondition ( CINOSBusPortHandlerRangeCondition apCond)

Check if the condition of a range is met.

Parameters
apCondCondition to check.
Returns
Success of check.

◆ FixPortRegistration()

void CINOSCOPModule::FixPortRegistration ( CINCOItem apItem,
uint32 *  apTable,
uint32  auTableSize 
)

Fix the registration of a write port item (recursively).

Parameters
apItemThe item to fix, can be an object with children.
apTableThe job table to use for the fixing.
auTableSizeNumber of jobs in the table.

◆ GetAddressSwitch()

uint16 CINOSCOPModule::GetAddressSwitch ( )
inline

Get the address switch read after scanning.

Returns
Address switch at scanning.

◆ GetBlock32()

uint32 CINOSCOPModule::GetBlock32 ( uint32  auSource,
uint32 *  apDest,
uint16  auNumber,
uint32  auFlags = 0 
)

Read a number of 32 bit values.

Parameters
auSourceAddress to read from.
apDestBuffer to write data to.
auNumberNumber of data items to read.
auFlagsData format flags.

◆ GetBlock8()

uint32 CINOSCOPModule::GetBlock8 ( uint32  auSource,
uint8 *  apDest,
uint16  auNumber,
uint32  auFlags = 0 
)

Read a number of 8 bit values.

Parameters
auSourceAddress to read from.
apDestBuffer to write data to.
auNumberNumber of data items to read.
auFlagsData format flags.

◆ GetEepromValue()

template<class T >
T CINOSCOPModule::GetEepromValue ( uint32  auOffset)
inline

Get eeprom value with certain type.

Parameters
auOffsetOffset of value in eeprom data.
Returns
Value at this offset in the given type.

◆ GetFpgaRevision()

uint32 CINOSCOPModule::GetFpgaRevision ( )
inline

Get the fpga revision.

Returns
The module's fpga revision.

◆ IsEepromValid()

bool CINOSCOPModule::IsEepromValid ( )
inline

Return true if eeprom is valid.

Returns
Eeprom valid state

◆ IsOnline()

bool CINOSCOPModule::IsOnline ( )

Return online state of cop module.

Returns
Online state of cop module.

◆ IsPortCachable()

bool CINOSCOPModule::IsPortCachable ( uint16  auNumber)
inline

Check if port cachable.

Parameters
auNumberRequested port number

◆ IsPortCached()

bool CINOSCOPModule::IsPortCached ( uint16  auNumber)
inline

Check if port cached.

Parameters
auNumberRequested port number

◆ PutBlock32()

uint32 CINOSCOPModule::PutBlock32 ( uint32  auDest,
uint32 *  apSource,
uint16  auNumber,
uint32  auFlags = 0 
)

Write a number of 32 bit values.

Parameters
auDestAddress to write to.
apSourceData to write.
auNumberNumber of data items to write.
auFlagsData format flags.

◆ PutBlock8()

uint32 CINOSCOPModule::PutBlock8 ( uint32  auDest,
uint8 *  apSource,
uint16  auNumber,
uint32  auFlags = 0 
)

Write a number of 8 bit values.

Parameters
auDestAddress to write to.
apSourceData to write.
auNumberNumber of data items to write.
auFlagsData format flags.

◆ ResolveEepromValues()

void CINOSCOPModule::ResolveEepromValues ( XMLNode aAction)

Resolve values with eeprom references (e.g. uint16:Eeprom[80]).

Parameters
aActionNode of action which text value may be resolved.

◆ SetupPortCache()

void CINOSCOPModule::SetupPortCache ( uint16  auNumber,
uint8  auSize,
const char apType 
)

Check if given port needs to be cached.

Parameters
apPropsPointer to port properties

◆ SetXmlMod()

void CINOSCOPModule::SetXmlMod ( const char apModXml)
inline

Set content of module's xml file.

Parameters
apModXmlPointer to xml file.

◆ SetXmlModValid()

void CINOSCOPModule::SetXmlModValid ( bool  abXmlModValid)
inline

Set validity of module's xml file.

Parameters
abXmlModValidNew state.

◆ UpdatePortCache()

void CINOSCOPModule::UpdatePortCache ( uint16  auNumber,
uint8  auSize 
)

Update cache of given port.

Parameters
auNumberRequested port number

The documentation for this class was generated from the following file: