All notable changes to this project will be documented in this file.
The format is based on Keep a Changelog, and this project adheres to Semantic Versioning.
Date: August 27, 2024
- Initial release of
router_os_client
. - Basic API connection functionality for RouterOS devices.
- Added documentation and examples for usage.
Date: August 27, 2024
- Reformated
router_os_client
file.
Date: August 27, 2024
- Removed cupertino_icons from dependencies.
Date: August 31, 2024
-
fix: prevent empty maps from being added to parsed replies
-
Modified the
_parseReply
method to ensure that only non-empty maps are added to theparsedReplies
list. This prevents the unnecessary{}
from being returned at the end of command execution.
Date: August 31, 2024
- Replace print statements with Logger for consistent logging
- Updated all print statements to use the Logger instance.
- Ensured that verbose logging is handled through the logger for better control.
- Improved error handling and log messaging with appropriate log levels (debug, info, warning, error).
Date: September 2, 2024
- _parseCommand Method Update:
- Introduced a check to determine if a command part contains an = character.
- Preserved parts containing = without modification to avoid incorrect command formatting.
- Applied a / prefix only to base command parts that do not contain =.
- Command Parsing Issue:
- Resolved an issue where commands with parameters (e.g., profile=1d) were incorrectly parsed by adding an extra = character. This fix ensures that commands such as /ip/hotspot/user/print profile=1d are parsed correctly and sent as /ip/hotspot/user/print with profile=1d as a parameter.
- Corrected the behavior of the client.talk method to ensure proper communication with the RouterOS API, allowing for accurate filtering of data.
- Command Handling:
- Enhanced the robustness of the command parsing mechanism, ensuring that commands with parameters are handled accurately and without unintended modifications.
Date: September 7, 2024
- Fixed issue where
talk
function would throw an "invalid arguments" error whenmessage
is a single string. - Ensured that single strings passed to
talk
are wrapped in aList<String>
before sending to_send
function.
- Added explicit handling for
message
when it is a single string to convert it into a list. - Updated error handling to improve robustness for dynamic inputs.
Date: September 7, 2024
- Added example project to demonstrate usage of the
router_os_client
package.
Date: September 7, 2024
- Added Dartdoc comments to all public members and classes, including exceptions (
LoginError
,WordTooLong
,CreateSocketError
,RouterOSTrapError
). - Renamed anonymous extension to
IntToBytes
for better readability. - Documented the
IntToBytes
extension with a description for thetoBytes
method.
Date: September 7, 2024
- Reformatted for pub.dev compliance.
Date: September 9, 2024
- Fixed an issue where logs were displayed even when verbose was set to false.
Date: September 12, 2024
- Fixed stream data bug.
Date: September 12, 2024
- Fixed parse command bug.
Date: September 22, 2024
-
Support for complex commands in
talk
andstreamData
:talk
andstreamData
methods now accept both simple commands (strings) and complex commands with parameters (Map<String, String>
).- Parameters are automatically converted into the RouterOS command format (
=key=value
).
-
_parseSentence
method:- A new method to parse RouterOS responses into key-value pairs for easier handling of device responses.
- Code flexibility and command handling:
- Improved flexibility by allowing both string-based and map-based input for commands sent to the RouterOS device.
- Better handling of both types of inputs while maintaining backward compatibility.