/**
 *
 * @author    seagle
 * @date      2025-3-22
 * @Description 
 *   Replace old BaseDevice
 */  
#include"TcPch.h"
#pragma hdrstop
#include"BaseDevice.h"
#include"EV.h"
#include"DEVICE.h"
#include"debug.h"
void BaseDevice::clear(){
    _hasAlarm=FALSE;
}

void BaseDevice::addDevice(){
    DEVICE->addDevice(this);
}
BaseDevice::BaseDevice(const char* className, const char* name, const char* module) {
    
    strcpy (this->className, className);
    strcpy (this->name, name);
    strcpy (this->module ,module);
    memset(displayName, '\0', sizeof(displayName));
    hasAlarm = FALSE;
    isInstalled = TRUE;
    if (DEVICE != NULL) {
        DEVICE->addDevice(this);
    }
    
}
//TODO:Please delete these test codes

M_AI* AI;
M_AO* AO;
M_NDI* NDI;
M_NDO* NDO;
M_SDI* SDI;
M_SDO* SDO;
