/* * mpsAlgorithm.h * mpsLinkProcessor * * Created by Stephen Norum. * Copyright 2007 Stanford Linear Accelerator Center. All rights reserved. * */ #ifndef MPSALGORITHM_H #define MPSALGORITHM_H #ifdef __cplusplus extern "C" { #endif #include #include #include enum { MPSAlgorithmRevisionStringMaxLength = 64 }; struct algorithmElement { ELLNODE listNode; CexpModule moduleHandle; int (*function)(void *context); unsigned int year; unsigned int month; unsigned int day; const char *revision; const char *functionName; const char *mpsDatabaseVersion; const char *compileDate; const char *compileTime; unsigned int objectVersion; int canUnload; }; typedef struct algorithmElement algorithmData; int addAlgorithmToList(algorithmData *newAd); int removeAlgorithmFromList(algorithmData *ad); int getAlgorithmList(ELLLIST *list); void mpsAlgorithmListLockMutex(); void mpsAlgorithmListUnlockMutex(); /* Must lock machineRatesBufferMutex before calling */ int setMaxRateAfterDevice(MPSBeamRate maxRate, MPSMitigationDevice device); #ifdef __cplusplus } #endif #endif