Example #1
0
static long write_mbbo(void* precord){
    char stripdName[32];
    mbboRecord *pmbbo = (mbboRecord*) precord;
    PDEBUG(DEBUG_REC_PROC, "record name: %s\n", pmbbo->name);

    stripEpicsIocName(stripdName, pmbbo);
    return writeBest(stripdName, USHORT, (void*)&pmbbo->val);
}
Example #2
0
static long write_ao(void* precord){
    char stripdName[32];
    aoRecord *pao = (aoRecord*) precord;
    PDEBUG(DEBUG_REC_PROC, "record name: %s\n", pao->name);

    stripEpicsIocName(stripdName, pao);
    writeBest(stripdName, DOUBLE, (void*)&pao->val);

    return 0;
}
Example #3
0
// compute the value of the current LS
// update the file containing the best value if there is a new reccord
void LS::updateBest() {
    double bestVal = readBest();
    if (score > bestVal) {
        cerr << "new reccord!!: " << score << endl;
        writeBest();
#ifdef SENDMAIL
        stringstream message;
        message << "./sendMail.rb ";
        message << "'new value: "<< score << "'";
        message << " 'new highscore LS - dim " << DIM << " - size " << LARGEUR << "'"  ;
        system(message.str().c_str());
        cerr << "mail sent" << endl;
#endif
    }
}