-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore: Add comprehensive error codes to app_config.json in COMMonitor V2
- Included a wide range of common serial communication error codes and their descriptions in the configuration file. - Updated the error code lookup functionality to fetch descriptions from the JSON config. - Improved maintainability by centralizing fixed data in app_config.json.
- Loading branch information
1 parent
7acb13a
commit 9ee47de
Showing
3 changed files
with
111 additions
and
29 deletions.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
{ | ||
"terminal_size": { | ||
"width": 80, | ||
"height": 24 | ||
}, | ||
"log_settings": { | ||
"log_filename": "COMMonitor", | ||
"log_level": "INFO", | ||
"log_format": "%(asctime)s - %(levelname)s - %(message)s", | ||
"log_date_format": "%Y-%m-%d %H:%M:%S" | ||
}, | ||
"error_codes": { | ||
"1": "Incorrect function. This could happen if a function is called on a COM port that does not support it.", | ||
"2": "File Not Found (The specified COM port could not be found or is disabled.)", | ||
"5": "Access Denied (The COM port is in use by another application.)", | ||
"6": "The handle is invalid. This might happen if there’s a problem with how the port was opened or managed.", | ||
"10": "The environment is incorrect. This might indicate an issue with the configuration of the COM port.", | ||
"20": "The system cannot find the device specified. Similar to ERROR_FILE_NOT_FOUND, it might indicate that the COM port is missing.", | ||
"21": "The device is not ready. This might occur if the COM port device is not ready to receive data.", | ||
"22": "The device does not recognize the command given to it. This could indicate that the command or data sent to the COM port is not valid.", | ||
"24": "The length of the data provided to a system call is invalid.", | ||
"31": "A device attached to the system is not functioning. This could indicate hardware issues with the port.", | ||
"87": "The parameter is incorrect. This might occur if the port is being accessed with incorrect settings or configurations.", | ||
"110": "The system cannot open the device or file specified.", | ||
"121": "The semaphore timeout period has expired. This might occur if the device connected to the port is not responding.", | ||
"122": "The data area passed to a system call is too small.", | ||
"234": "More data is available. This might occur if a buffer is too small to hold the data being received.", | ||
"995": "The I/O operation has been aborted due to thread exit or application request.", | ||
"998": "Invalid access to memory location. This might happen if the memory associated with the COM port is not accessible.", | ||
"1117": "The request could not be performed because of an I/O device error. This indicates a general problem with the hardware.", | ||
"1167": "The device is not connected. This usually occurs when the device was physically disconnected or powered off.", | ||
"1460": "This operation returned because the timeout period expired." | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters