/****************************************************************************** * * Title : uirUtility.h * Version 0.0 * * Description: header file. * Related files: uirUtility.c * * Author: Lukas Tomasek, tomasekl@fzu.cz * ******************************************************************************/ #ifndef UIR_UTILITY_H /* multiple inclusion protection */ #define UIR_UTILITY_H /****************************************************************************** * Header files * ******************************************************************************/ #include "hostDefinitions.h" #include "errorHandler.h" #include "fileUtility.h" #include "hostUtility.h" #include /****************************************************************************** * Macros * ******************************************************************************/ #define UIR_STATUS_CHECK(status, functionName) \ if (status<0){\ programError(__FILE__,__LINE__, UIR_ERROR, #functionName, status, GetUILErrorString(status));\ } //predelat na funkci #define GET_AND_SET_CTRL_VAL(panelHandle, controlId, newValue, oldValuePointer) \ GetCtrlVal(panelHandle, controlId, oldValuePointer);\ if((newValue)!=*oldValuePointer) {\ SetCtrlVal(panelHandle, controlId, newValue);\ } #define LOAD_PANEL(panelHandlePointer, parentPanelHandle, fileName, panelId) \ *panelHandlePointer=LoadPanel(parentPanelHandle,fileName, panelId);\ if(*panelHandlePointer<0){\ programError(__FILE__,__LINE__, UIR_ERROR,"LoadPanel()", *panelHandlePointer, GetUILErrorString(status));\ } #define SET_BUTTON(panel, controlBase, index, data) \ SetCtrlVal(panel, controlBase##index, READ_BIT(data, index)); /****************************************************************************** * Global Function Declarations * ******************************************************************************/ void displayRodStatusReg0(struct HOST *host); void displayVmeCommandReg0(struct HOST *host); ERROR_ID viewBinFile(char fileName[PATHNAME_LENGTH]); ERROR_ID loadTimRegFile(int panel, int index); ERROR_ID loadRodRegFile(int panel, int control, int registerBaseId); ERROR_ID refreshFpgaStatus(struct HOST *host); ERROR_ID refreshDspRegs(struct HOST *host); void updateBitField(int panel) ; void displayCmdListExecBusy(struct HOST *host); ERROR_ID updateFlashPanelState (int panel); /******************************************************************************/ #endif /* UIR_UTILITY_H */