WIP
This commit is contained in:
@@ -63,6 +63,7 @@ ecmcSocketCAN::ecmcSocketCAN(char* configStr,
|
||||
{
|
||||
// Init
|
||||
cfgCanIFStr_ = NULL;
|
||||
cfgDbgMode_ = 0;
|
||||
destructs_ = 0;
|
||||
socketId_ = -1;
|
||||
memset(&ifr_,0,sizeof(struct ifreq));
|
||||
@@ -108,10 +109,10 @@ void ecmcSocketCAN::parseConfigStr(char *configStr) {
|
||||
}
|
||||
|
||||
// ECMC_PLUGIN_DBG_PRINT_OPTION_CMD (1/0)
|
||||
/*if (!strncmp(pThisOption, ECMC_PLUGIN_DBG_PRINT_OPTION_CMD, strlen(ECMC_PLUGIN_DBG_PRINT_OPTION_CMD))) {
|
||||
if (!strncmp(pThisOption, ECMC_PLUGIN_DBG_PRINT_OPTION_CMD, strlen(ECMC_PLUGIN_DBG_PRINT_OPTION_CMD))) {
|
||||
pThisOption += strlen(ECMC_PLUGIN_DBG_PRINT_OPTION_CMD);
|
||||
cfgDbgMode_ = atoi(pThisOption);
|
||||
} */
|
||||
}
|
||||
|
||||
// ECMC_PLUGIN_IF_OPTION_CMD (Source string)
|
||||
else if (!strncmp(pThisOption, ECMC_PLUGIN_IF_OPTION_CMD, strlen(ECMC_PLUGIN_IF_OPTION_CMD))) {
|
||||
@@ -124,7 +125,7 @@ void ecmcSocketCAN::parseConfigStr(char *configStr) {
|
||||
free(pOptions);
|
||||
}
|
||||
if(!cfgCanIFStr_) {
|
||||
throw std::invalid_argument( "Data source not defined.");
|
||||
throw std::invalid_argument( "CAN interface not defined.");
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -49,8 +49,6 @@ class ecmcSocketCAN : public asynPortDriver {
|
||||
|
||||
virtual asynStatus writeInt32(asynUser *pasynUser, epicsInt32 value);
|
||||
virtual asynStatus readInt32(asynUser *pasynUser, epicsInt32 *value);
|
||||
virtual asynStatus readFloat64Array(asynUser *pasynUser, epicsFloat64 *value,
|
||||
size_t nElements, size_t *nIn);
|
||||
virtual asynStatus readInt8Array(asynUser *pasynUser, epicsInt8 *value,
|
||||
size_t nElements, size_t *nIn);
|
||||
virtual asynStatus readFloat64(asynUser *pasynUser, epicsFloat64 *value);
|
||||
@@ -62,6 +60,7 @@ class ecmcSocketCAN : public asynPortDriver {
|
||||
void initCAN();
|
||||
static std::string to_string(int value);
|
||||
char* cfgCanIFStr_; // Config: can interface can0, vcan0..
|
||||
int cfgDbgMode_;
|
||||
int destructs_;
|
||||
struct can_frame rxmsg_;
|
||||
struct can_frame txmsg_;
|
||||
|
||||
@@ -27,7 +27,7 @@
|
||||
static ecmcSocketCAN* can = NULL;
|
||||
static char portNameBuffer[ECMC_PLUGIN_MAX_PORTNAME_CHARS];
|
||||
|
||||
int createFFT(char* configStr) {
|
||||
int createSocketCAN(char* configStr) {
|
||||
|
||||
// create new ecmcFFT object
|
||||
|
||||
|
||||
Reference in New Issue
Block a user