From 20dd9f6b3fcb42d03f0de006cd59fc70acbf5ee2 Mon Sep 17 00:00:00 2001 From: Jack Harper Date: Thu, 23 Jul 2026 14:40:05 +0100 Subject: [PATCH 1/8] Modifying filecontentsserver to take an output file --- .../Db/FileContentsServer.db | 23 +-- .../src/FileContentsServerDriver.cpp | 159 ++++++++++-------- .../src/FileContentsServerDriver.h | 13 +- FileContentsServerApp/src/Makefile | 1 + 4 files changed, 104 insertions(+), 92 deletions(-) diff --git a/FileContentsServerApp/Db/FileContentsServer.db b/FileContentsServerApp/Db/FileContentsServer.db index be26b9c..aaa69fb 100644 --- a/FileContentsServerApp/Db/FileContentsServer.db +++ b/FileContentsServerApp/Db/FileContentsServer.db @@ -8,21 +8,21 @@ record(waveform, "$(P)LINES_ARRAY:SP") } -record(stringin, "$(P)FILE_NAME") +record(stringin , "$(P)INPUT_FILE") { field(DTYP, "asynOctetRead") - field(INP, "@asyn($(PORT),0,0)FILE_NAME") + field(INP, "@asyn($(PORT),0,0)INPUT_FILE") field(SCAN, "I/O Intr") } -record(stringout, "$(P)FILE_NAME:SP") +record(stringin, "$(P)OUTPUT_FILE") { - field(DTYP, "asynOctetWrite") - field(OUT, "@asyn($(PORT),0,0)FILE_NAME") - info(autosaveFields, "VAL") - field(PINI, "YES") + field(DTYP, "asynOctetRead") + field(INP, "@asyn($(PORT),0,0)OUTPUT_FILE") + field(SCAN, "I/O Intr") } + record(bo, "$(P)SAVE_FILE") { field(DESC, "Trigger save file") @@ -64,15 +64,6 @@ record(bo, "$(P)RESET") field(UDFS, "NO_ALARM") } -record(bi, "$(P)NEW_FILE_WARNING"){ - field(DTYP, "asynInt32") - field(INP, "@asyn($(PORT),0,0)NEW_FILE_WARNING") - field(VAL, "0") - field(ZNAM, "No") - field(ONAM, "Yes") - field(SCAN, "I/O Intr") -} - record(bi, "$(P)UNSAVED_CHANGES"){ field(DTYP, "asynInt32") field(INP, "@asyn($(PORT),0,0)UNSAVED_CHANGES") diff --git a/FileContentsServerApp/src/FileContentsServerDriver.cpp b/FileContentsServerApp/src/FileContentsServerDriver.cpp index 6fd343b..d8c70ef 100644 --- a/FileContentsServerApp/src/FileContentsServerDriver.cpp +++ b/FileContentsServerApp/src/FileContentsServerDriver.cpp @@ -5,14 +5,13 @@ #include #include #include +#include #include #include #include #include #include #include -#include -#include #include #include @@ -40,9 +39,9 @@ static const char *driverName = "FileContentsServerDriver"; -FileContentsServerDriver::FileContentsServerDriver(const char *portName, const char *fileDir) +FileContentsServerDriver::FileContentsServerDriver(const char *portName, const char *fileDir, const char *inputFile, const char *outputFile) : asynPortDriver(portName, - 0, /* maxAddr */ + 0, /* maxAddr */ asynInt32Mask | asynInt32ArrayMask | asynFloat64Mask | asynFloat64ArrayMask | asynOctetMask | asynDrvUserMask, /* Interface mask */ asynInt32Mask | asynInt32ArrayMask | asynFloat64Mask | asynFloat64ArrayMask | asynOctetMask, /* Interrupt mask */ ASYN_CANBLOCK, /* asynFlags. This driver can block but it is not multi-device */ @@ -52,7 +51,9 @@ FileContentsServerDriver::FileContentsServerDriver(const char *portName, const c m_fileDir(fileDir) { const char *functionName = "FileContentsServerDriver"; - createParam(P_fileNameString, asynParamOctet, &P_fileName); + + createParam(P_inputFileNameString, asynParamOctet, &P_inputFileName); + createParam(P_outputFileNameString, asynParamOctet, &P_outputFileName); createParam(P_fileContentsString, asynParamOctet, &P_fileContents); createParam(P_saveFileString, asynParamInt32, &P_saveFile); createParam(P_resetString, asynParamInt32, &P_reset); @@ -62,6 +63,23 @@ FileContentsServerDriver::FileContentsServerDriver(const char *portName, const c createParam(P_unsavedChangesString, asynParamInt32, &P_unsavedChanges); setStringParam(P_fileDir, fileDir); + setStringParam(P_inputFileName, inputFile); + + // Read the original contents in first. + readFile(); + + if (outputFile == "") + { + // If the output file is not specified, default to saving output to the input file. + setStringParam(P_outputFileName, inputFile); + } + else + { + setStringParam(P_outputFileName, outputFile); + // Save the file so that the output file has the contents of the input file initially. + saveFile(); + } + const int defaultSaveFile = 0; setIntegerParam(P_saveFile, defaultSaveFile); const int defaultReset = 0; @@ -70,12 +88,52 @@ FileContentsServerDriver::FileContentsServerDriver(const char *portName, const c setIntegerParam(P_newFileWarning, defaultNewFileWarning); const int defaultUnsavedChanges = 0; setIntegerParam(P_unsavedChanges, defaultUnsavedChanges); - setStringParam(P_fileContents, ""); setStringParam(P_log, ""); logMessage("Editor initialized"); callParamCallbacks(); } +asynStatus FileContentsServerDriver::saveFile() +{ + logMessage("Triggering save"); + + char buffer[5000]; // Assuming the response will fit within 256 characters + + // Get the value of the parameter we just set + getStringParam(P_fileContents, sizeof(buffer), buffer); + + char fileName[512]; + getStringParam(P_outputFileName, sizeof(fileName), fileName); + // join the file name with the file directory + std::string fullFileName = m_fileDir + "/" + fileName; + // Write the contents of buffer to a file + try + { + std::ofstream outfile(fullFileName, std::ios::trunc | std::ios::binary); // Open in write mode + if (outfile.is_open()) + { + outfile << buffer; + outfile.close(); + logMessage("File saved successfully"); + setIntegerParam(P_saveFile, 0); + setIntegerParam(P_newFileWarning, 0); + setIntegerParam(P_unsavedChanges, 0); + } + else + { + logMessage(std::format("Failed to open file ({}) for writing", fullFileName)); + return asynError; + } + } + catch (const std::exception &e) + { + logMessage(e.what()); + return asynError; + } + callParamCallbacks(); + return asynSuccess; +} + // Override the method to handle writes to parameters asynStatus FileContentsServerDriver::writeInt32(asynUser *pasynUser, epicsInt32 value) { @@ -85,46 +143,7 @@ asynStatus FileContentsServerDriver::writeInt32(asynUser *pasynUser, epicsInt32 { if (value == 1 && hasChanged == 1) { - std::cout << "Triggering save" << std::endl; - std::cout << "Value received by asyn: " << value << std::endl; - - char buffer[5000]; // Assuming the response will fit within 256 characters - - // Get the value of the parameter we just set - getStringParam(P_fileContents, sizeof(buffer), buffer); - - char fileName[512]; - getStringParam(P_fileName, sizeof(fileName), fileName); - // join the file name with the file directory - std::string m_fullFileName = m_fileDir + "/" + fileName; - // Write the contents of buffer to a file - try - { - std::ofstream outfile(m_fullFileName, std::ios::trunc | std::ios::binary); // Open in write mode - if (outfile.is_open()) - { - outfile << buffer; - outfile.close(); - std::cout << "Contents written to file successfully." << std::endl; - logMessage("File saved successfully"); - setIntegerParam(P_saveFile, 0); - setIntegerParam(P_newFileWarning, 0); - setIntegerParam(P_unsavedChanges, 0); - } - else - { - std::cerr << "Failed to open file for writing." << std::endl; - logMessage("Failed to open file for writing"); - return asynError; - } - } - catch (const std::exception &e) - { - std::cerr << "Exception caught: " << e.what() << std::endl; - logMessage(e.what()); - return asynError; - } - callParamCallbacks(); + return saveFile(); } return asynSuccess; } @@ -132,8 +151,9 @@ asynStatus FileContentsServerDriver::writeInt32(asynUser *pasynUser, epicsInt32 { if (value == 1) { - std::cout << "Resetting" << std::endl; + logMessage("Reloading from disk"); setStringParam(P_fileContents, m_original_lines_array); + saveFile(); logMessage("Reset successful."); setIntegerParam(P_reset, 0); setIntegerParam(P_unsavedChanges, 0); @@ -147,7 +167,7 @@ asynStatus FileContentsServerDriver::writeInt32(asynUser *pasynUser, epicsInt32 } } -void FileContentsServerDriver::logMessage(const std::string& message) +void FileContentsServerDriver::logMessage(const std::string &message) { // add the time to the front of the log message // current time @@ -162,6 +182,7 @@ void FileContentsServerDriver::logMessage(const std::string& message) // Create the log message std::string log_message = std::string(time_str) + ": " + message; + std::cout << log_message << std::endl; setStringParam(P_log, log_message); callParamCallbacks(); } @@ -171,26 +192,26 @@ void FileContentsServerDriver::readFile() std::cout << "Calling readFile" << std::endl; std::fstream f; char fileName[256]; - getStringParam(P_fileName, sizeof(fileName), fileName); - std::string m_fullFileName = m_fileDir + "/" + fileName; - std::cout << "FileContentsServerDriver: Reading file " << m_fullFileName << std::endl; + getStringParam(P_inputFileName, sizeof(fileName), fileName); + std::string fullFileName = m_fileDir + "/" + fileName; + + logMessage(std::format("Reading file {}", fullFileName)); try { - f.open(m_fullFileName, std::ios::in); + f.open(fullFileName, std::ios::in); if (!f.is_open()) { m_original_lines_array = ""; setStringParam(P_fileContents, ""); if (errno == ENOENT) // File not found { - std::cout << "File not found: " + m_fullFileName << std::endl; - setIntegerParam(P_newFileWarning, 1); - throw std::runtime_error("File not found"); + logMessage(std::format("File not found: {}", fullFileName)); + throw std::runtime_error("File not found"); } else // Other errors, e.g., permission denied { - std::cerr << "Unable to open file: " + m_fullFileName << std::endl; - throw std::runtime_error(std::string("Unable to open file: ") + std::string(strerror(errno))); + logMessage(std::format("Unable to open file: {}, error {}", fullFileName, std::string(strerror(errno)))); + throw std::runtime_error(std::string("Unable to open file: ") + std::string(strerror(errno))); } } setIntegerParam(P_newFileWarning, 0); @@ -209,7 +230,7 @@ void FileContentsServerDriver::readFile() catch (const std::exception &e) { std::cerr << "Exception caught: " << e.what() << std::endl; - logMessage(e.what()); + logMessage(e.what()); } callParamCallbacks(); @@ -235,12 +256,6 @@ asynStatus FileContentsServerDriver::writeOctet(asynUser *pasynUser, const char setIntegerParam(P_unsavedChanges, 0); } } - else if (function == P_fileName) - { - std::cout << "Setting file name to " << value << std::endl; - setStringParam(P_fileName, value); - readFile(); - } else { return asynPortDriver::writeOctet(pasynUser, value, maxChars, nActual); @@ -259,11 +274,11 @@ extern "C" /// \param[in] portName @copydoc initArg0 /// \param[in] fileDir @copydoc initArg1 - int FileContentsServerConfigure(const char *portName, const char *fileDir) + int FileContentsServerConfigure(const char *portName, const char *fileDir, const char *inputFile, const char *outputFile) { try { - FileContentsServerDriver *driver = new FileContentsServerDriver(portName, fileDir); + FileContentsServerDriver *driver = new FileContentsServerDriver(portName, fileDir, inputFile, outputFile); if (driver == NULL) { errlogSevPrintf(errlogMajor, "FileContentsServerConfigure failed (NULL)\n"); @@ -283,17 +298,21 @@ extern "C" // EPICS iocsh shell commands - static const iocshArg initArg0 = {"portName", iocshArgString}; ///< The name of the asyn driver port we will create - static const iocshArg initArg1 = {"fileDir", iocshArgString}; ///< file name + static const iocshArg initArg0 = {"portName", iocshArgString}; ///< The name of the asyn driver port we will create + static const iocshArg initArg1 = {"fileDir", iocshArgString}; ///< The directory to open/save files into + static const iocshArg initArg2 = {"inputFile", iocshArgString}; ///< input file name to read and initially serve contents of + static const iocshArg initArg3 = {"outputFile", iocshArgString}; ///< file name to save output to when a user hits save. If not set this defaults to inputFile. static const iocshArg *const initArgs[] = {&initArg0, - &initArg1}; + &initArg1, + &initArg2, + &initArg3}; static const iocshFuncDef initFuncDef = {"FileContentsServerConfigure", sizeof(initArgs) / sizeof(iocshArg *), initArgs}; static void initCallFunc(const iocshArgBuf *args) { - FileContentsServerConfigure(args[0].sval, args[1].sval); + FileContentsServerConfigure(args[0].sval, args[1].sval, args[2].sval, args[3].sval); } static void FileContentsServerRegister(void) diff --git a/FileContentsServerApp/src/FileContentsServerDriver.h b/FileContentsServerApp/src/FileContentsServerDriver.h index 651d553..088b0e5 100644 --- a/FileContentsServerApp/src/FileContentsServerDriver.h +++ b/FileContentsServerApp/src/FileContentsServerDriver.h @@ -6,14 +6,15 @@ class FileContentsServerDriver : public asynPortDriver { public: - FileContentsServerDriver(const char *portName, const char *fileDir); + FileContentsServerDriver(const char *portName, const char *fileDir, const char *inputFile, const char *outputFile); // These are the methods that we override from asynPortDriver virtual asynStatus writeOctet(asynUser *pasynUser, const char *value, size_t maxChars, size_t *nActual); virtual asynStatus writeInt32(asynUser *pasynUser, epicsInt32 value); private: - int P_fileName; + int P_inputFileName; + int P_outputFileName; int P_fileContents; int P_saveFile; int P_fileDir; @@ -21,17 +22,17 @@ class FileContentsServerDriver : public asynPortDriver int P_log; int P_newFileWarning; int P_unsavedChanges; -#define FIRST_FILESERV_PARAM P_fileName - std::string m_fileName; std::string m_fileDir; std::string m_original_lines_array; void readFile(); - void logMessage(const std::string& message); + asynStatus saveFile(); + void logMessage(const std::string &message); }; -#define P_fileNameString "FILE_NAME" +#define P_inputFileNameString "INPUT_FILE" +#define P_outputFileNameString "OUTPUT_FILE" #define P_fileContentsString "LINES_ARRAY" #define P_saveFileString "SAVE_FILE" #define P_fileDirString "FILE_DIR" diff --git a/FileContentsServerApp/src/Makefile b/FileContentsServerApp/src/Makefile index 8f02df6..d527792 100644 --- a/FileContentsServerApp/src/Makefile +++ b/FileContentsServerApp/src/Makefile @@ -7,6 +7,7 @@ include $(TOP)/configure/CONFIG USR_INCLUDES += -I"$(TOP)/../../libraries/boost/include" #USR_CXXFLAGS += /EHa /DNOMINMAX +USR_CXXFLAGS += /std:c++20 LIBRARY_IOC += FileContentsServer FileContentsServer_SRCS += FileContentsServerDriver.cpp From 51a56080b2c141a271074164a378c0a7538ebcc0 Mon Sep 17 00:00:00 2001 From: Jack Harper Date: Thu, 6 Aug 2026 10:40:30 +0100 Subject: [PATCH 2/8] use getStringParam with std::string --- .../src/FileContentsServerDriver.cpp | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/FileContentsServerApp/src/FileContentsServerDriver.cpp b/FileContentsServerApp/src/FileContentsServerDriver.cpp index d8c70ef..8418d0f 100644 --- a/FileContentsServerApp/src/FileContentsServerDriver.cpp +++ b/FileContentsServerApp/src/FileContentsServerDriver.cpp @@ -97,13 +97,13 @@ asynStatus FileContentsServerDriver::saveFile() { logMessage("Triggering save"); - char buffer[5000]; // Assuming the response will fit within 256 characters + std::string buffer; // Assuming the response will fit within 256 characters // Get the value of the parameter we just set - getStringParam(P_fileContents, sizeof(buffer), buffer); + getStringParam(P_fileContents, buffer); - char fileName[512]; - getStringParam(P_outputFileName, sizeof(fileName), fileName); + std::string fileName; + getStringParam(P_outputFileName, fileName); // join the file name with the file directory std::string fullFileName = m_fileDir + "/" + fileName; // Write the contents of buffer to a file @@ -191,8 +191,8 @@ void FileContentsServerDriver::readFile() { std::cout << "Calling readFile" << std::endl; std::fstream f; - char fileName[256]; - getStringParam(P_inputFileName, sizeof(fileName), fileName); + std::string fileName; + getStringParam(P_inputFileName, fileName); std::string fullFileName = m_fileDir + "/" + fileName; logMessage(std::format("Reading file {}", fullFileName)); From 656ecfc34c06b6ed8ee16a1a602688f83c3f0123 Mon Sep 17 00:00:00 2001 From: Jack Harper Date: Fri, 7 Aug 2026 09:20:32 +0100 Subject: [PATCH 3/8] use binary for open and save, use ifstream for open, use NULL comparison for outputFile check --- FileContentsServerApp/src/FileContentsServerDriver.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/FileContentsServerApp/src/FileContentsServerDriver.cpp b/FileContentsServerApp/src/FileContentsServerDriver.cpp index 8418d0f..577c8d1 100644 --- a/FileContentsServerApp/src/FileContentsServerDriver.cpp +++ b/FileContentsServerApp/src/FileContentsServerDriver.cpp @@ -68,7 +68,7 @@ FileContentsServerDriver::FileContentsServerDriver(const char *portName, const c // Read the original contents in first. readFile(); - if (outputFile == "") + if (outputFile == NULL) { // If the output file is not specified, default to saving output to the input file. setStringParam(P_outputFileName, inputFile); @@ -190,7 +190,7 @@ void FileContentsServerDriver::logMessage(const std::string &message) void FileContentsServerDriver::readFile() { std::cout << "Calling readFile" << std::endl; - std::fstream f; + std::ifstream f; std::string fileName; getStringParam(P_inputFileName, fileName); std::string fullFileName = m_fileDir + "/" + fileName; @@ -198,7 +198,7 @@ void FileContentsServerDriver::readFile() logMessage(std::format("Reading file {}", fullFileName)); try { - f.open(fullFileName, std::ios::in); + f.open(fullFileName, std::ios::binary); if (!f.is_open()) { m_original_lines_array = ""; From a30afdb1359bcff31af57b9885fbd31bcf0bade2 Mon Sep 17 00:00:00 2001 From: Freddie Akeroyd Date: Fri, 7 Aug 2026 16:56:53 +0100 Subject: [PATCH 4/8] Trap both NULL and zero length --- .../src/FileContentsServerDriver.cpp | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/FileContentsServerApp/src/FileContentsServerDriver.cpp b/FileContentsServerApp/src/FileContentsServerDriver.cpp index 577c8d1..77a21a4 100644 --- a/FileContentsServerApp/src/FileContentsServerDriver.cpp +++ b/FileContentsServerApp/src/FileContentsServerDriver.cpp @@ -68,17 +68,17 @@ FileContentsServerDriver::FileContentsServerDriver(const char *portName, const c // Read the original contents in first. readFile(); - if (outputFile == NULL) - { - // If the output file is not specified, default to saving output to the input file. - setStringParam(P_outputFileName, inputFile); - } - else + if (outputFile && *outputFile) { setStringParam(P_outputFileName, outputFile); // Save the file so that the output file has the contents of the input file initially. saveFile(); } + else + { + // If the output file is not specified, default to saving output to the input file. + setStringParam(P_outputFileName, inputFile); + } const int defaultSaveFile = 0; setIntegerParam(P_saveFile, defaultSaveFile); From ac52cf5f62a75af9878773d5aa96486903b5ef29 Mon Sep 17 00:00:00 2001 From: Jack Harper Date: Fri, 7 Aug 2026 17:34:26 +0100 Subject: [PATCH 5/8] Update FileContentsServerApp/src/FileContentsServerDriver.cpp Co-authored-by: Tom Willemsen --- FileContentsServerApp/src/FileContentsServerDriver.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/FileContentsServerApp/src/FileContentsServerDriver.cpp b/FileContentsServerApp/src/FileContentsServerDriver.cpp index 77a21a4..e05b7ef 100644 --- a/FileContentsServerApp/src/FileContentsServerDriver.cpp +++ b/FileContentsServerApp/src/FileContentsServerDriver.cpp @@ -97,7 +97,7 @@ asynStatus FileContentsServerDriver::saveFile() { logMessage("Triggering save"); - std::string buffer; // Assuming the response will fit within 256 characters + std::string buffer; // Get the value of the parameter we just set getStringParam(P_fileContents, buffer); From fb5eddfb4f1e16c0ca9aa196ae9d330c76b9a292 Mon Sep 17 00:00:00 2001 From: Freddie Akeroyd Date: Fri, 7 Aug 2026 18:00:24 +0100 Subject: [PATCH 6/8] Adjust comment --- FileContentsServerApp/src/FileContentsServerDriver.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/FileContentsServerApp/src/FileContentsServerDriver.cpp b/FileContentsServerApp/src/FileContentsServerDriver.cpp index 77a21a4..e05b7ef 100644 --- a/FileContentsServerApp/src/FileContentsServerDriver.cpp +++ b/FileContentsServerApp/src/FileContentsServerDriver.cpp @@ -97,7 +97,7 @@ asynStatus FileContentsServerDriver::saveFile() { logMessage("Triggering save"); - std::string buffer; // Assuming the response will fit within 256 characters + std::string buffer; // Get the value of the parameter we just set getStringParam(P_fileContents, buffer); From 0ce321e131fe8e19f0505d7b8f245aeca29e702a Mon Sep 17 00:00:00 2001 From: Freddie Akeroyd Date: Fri, 7 Aug 2026 23:12:41 +0100 Subject: [PATCH 7/8] Remove newFileWarning as no longer used --- FileContentsServerApp/src/FileContentsServerDriver.cpp | 5 ----- FileContentsServerApp/src/FileContentsServerDriver.h | 2 -- 2 files changed, 7 deletions(-) diff --git a/FileContentsServerApp/src/FileContentsServerDriver.cpp b/FileContentsServerApp/src/FileContentsServerDriver.cpp index e05b7ef..21a5013 100644 --- a/FileContentsServerApp/src/FileContentsServerDriver.cpp +++ b/FileContentsServerApp/src/FileContentsServerDriver.cpp @@ -59,7 +59,6 @@ FileContentsServerDriver::FileContentsServerDriver(const char *portName, const c createParam(P_resetString, asynParamInt32, &P_reset); createParam(P_fileDirString, asynParamOctet, &P_fileDir); createParam(P_logString, asynParamOctet, &P_log); - createParam(P_newFileWarningString, asynParamInt32, &P_newFileWarning); createParam(P_unsavedChangesString, asynParamInt32, &P_unsavedChanges); setStringParam(P_fileDir, fileDir); @@ -84,8 +83,6 @@ FileContentsServerDriver::FileContentsServerDriver(const char *portName, const c setIntegerParam(P_saveFile, defaultSaveFile); const int defaultReset = 0; setIntegerParam(P_reset, defaultReset); - const int defaultNewFileWarning = 0; - setIntegerParam(P_newFileWarning, defaultNewFileWarning); const int defaultUnsavedChanges = 0; setIntegerParam(P_unsavedChanges, defaultUnsavedChanges); setStringParam(P_log, ""); @@ -116,7 +113,6 @@ asynStatus FileContentsServerDriver::saveFile() outfile.close(); logMessage("File saved successfully"); setIntegerParam(P_saveFile, 0); - setIntegerParam(P_newFileWarning, 0); setIntegerParam(P_unsavedChanges, 0); } else @@ -214,7 +210,6 @@ void FileContentsServerDriver::readFile() throw std::runtime_error(std::string("Unable to open file: ") + std::string(strerror(errno))); } } - setIntegerParam(P_newFileWarning, 0); int i = 0; std::stringstream buffer; diff --git a/FileContentsServerApp/src/FileContentsServerDriver.h b/FileContentsServerApp/src/FileContentsServerDriver.h index 088b0e5..39f4b04 100644 --- a/FileContentsServerApp/src/FileContentsServerDriver.h +++ b/FileContentsServerApp/src/FileContentsServerDriver.h @@ -20,7 +20,6 @@ class FileContentsServerDriver : public asynPortDriver int P_fileDir; int P_reset; int P_log; - int P_newFileWarning; int P_unsavedChanges; std::string m_fileDir; @@ -38,7 +37,6 @@ class FileContentsServerDriver : public asynPortDriver #define P_fileDirString "FILE_DIR" #define P_logString "LOG" #define P_resetString "RESET" -#define P_newFileWarningString "NEW_FILE_WARNING" #define P_unsavedChangesString "UNSAVED_CHANGES" #endif /* FILECONTENTSSERVERDRIVER_H */ From d2b0423f0e87f28053d16032978ba43f0405441e Mon Sep 17 00:00:00 2001 From: Jack Harper Date: Mon, 10 Aug 2026 10:58:00 +0100 Subject: [PATCH 8/8] remove manager mode from save_file --- FileContentsServerApp/Db/FileContentsServer.db | 1 - 1 file changed, 1 deletion(-) diff --git a/FileContentsServerApp/Db/FileContentsServer.db b/FileContentsServerApp/Db/FileContentsServer.db index aaa69fb..47a6623 100644 --- a/FileContentsServerApp/Db/FileContentsServer.db +++ b/FileContentsServerApp/Db/FileContentsServer.db @@ -31,7 +31,6 @@ record(bo, "$(P)SAVE_FILE") field(VAL, "0") field(ZNAM, "Idle") field(ONAM, "Saving file") - field(ASG, "MANAGER") field(UDFS, "NO_ALARM") }