Tags: arloliu/go-secs
Tags
fix(hsms): correct desired state setting order in connection state tr… …ansitions * Set desired state before changing actual state in ToConnecting, ToNotSelected, and ToSelected methods * Fix state consistency issues during state transitions * Add test case to verify async state change behavior when handler triggers further state changes
fix(hsmsss): prevent auto linktest from running when initially disabled * Fix linktest ticker not being stopped when auto linktest is disabled after connection establishment * Add proper state checking in linktestConnStateHandler to stop ticker when disabled * Update test to verify linktest properly respects initial disabled configuration
feat(hsms): add setter methods for DataMessage properties * Add SetStreamCode method with validation for stream code range (0-127) * Add SetFunctionCode method to update function code * Add SetWaitBit method to control wait bit setting * Enhance test coverage for new setter methods including error cases * Maintain API consistency with existing getter methods
feat(hsmsss): implement linktest suppression for active message commu… …nication This change implements linktest suppression by resetting the linktest interval ticker whenever messages are sent or received. This reduces the target equipment overhead by suppressing unnecessary linktest requests/responses during active communication periods. * Add resetLinktest() method to centralize linktest ticker reset logic * Reset linktest ticker when messages are sent successfully in senderTask * Reset linktest ticker when messages are received in receiverTask * Refactor UpdateConfigOptions method to use configuration getter methods * Rename ticketMgr to tickers for better naming consistency * Optimize tickerCtl to use RWMutex for better read concurrency * Improve test structure with helper functions and proper context handling
feat(hsms,hsmsss): add synchronous message sending and improve connec… …tion reliability * Add `SendMessageSync` method to `Session` interface for synchronous message sending * Add `WithSendTimeout` configuration option for message send timeout control * Refactor `TaskManager` to eliminate code duplication and improve reliability * Fix connection resource management with unified mutex for conn/reader/writer * Resolve buffered reader timeout issues by reading directly from connection * Add context protection with RWMutex to prevent data races in task operations * Implement proper panic recovery and connection cleanup in task loops * Add comprehensive test coverage for `TaskManager` and connection edge cases * Extend T3 timeout validation range from 120s to 600s
PreviousNext