Documentation
¶
Overview ¶
Package simpl provides SIMPL Windows process management and interaction.
Index ¶
- Constants
- func GetSimplWindowsPath() string
- func ValidateSimplWindowsInstallation() error
- type Client
- func (c *Client) Cleanup(hwnd uintptr, pid uint32)
- func (c *Client) FindWindow(targetPid uint32, debug bool) (uintptr, string)
- func (c *Client) ForceCleanup(hwnd uintptr, knownPid uint32)
- func (c *Client) StartMonitoring(pid uint32) func()
- func (c *Client) WaitForAppear(targetPid uint32, timeout time.Duration) (uintptr, bool)
- func (c *Client) WaitForReady(hwnd uintptr, timeout time.Duration) bool
- type SimplProcessAPI
Constants ¶
const DefaultSimplWindowsPath = "C:\\Program Files (x86)\\Crestron\\Simpl\\smpwin.exe"
Variables ¶
This section is empty.
Functions ¶
func GetSimplWindowsPath ¶
func GetSimplWindowsPath() string
GetSimplWindowsPath returns the path to the SIMPL Windows executable. It checks the SIMPL_WINDOWS_PATH environment variable first, falling back to the default installation path if not set.
func ValidateSimplWindowsInstallation ¶
func ValidateSimplWindowsInstallation() error
ValidateSimplWindowsInstallation checks if the SIMPL Windows executable exists. Returns an error with helpful guidance if the file is not found.
Types ¶
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
Client provides methods for interacting with SIMPL Windows processes
func NewClient ¶
func NewClient(log logger.LoggerInterface) *Client
NewClient creates a new SIMPL Windows client
func (*Client) Cleanup ¶
Cleanup ensures SIMPL Windows is properly closed, with fallback to force termination
func (*Client) FindWindow ¶
FindWindow searches for the SIMPL Windows main window belonging to a specific process targetPid must be a valid process ID - passing 0 will return no results
func (*Client) ForceCleanup ¶
ForceCleanup attempts to forcefully close SIMPL Windows using the known PID. It tries two approaches in order: 1. Use hwnd if available (graceful close with PID for force termination) 2. Use known PID (forced termination)
func (*Client) StartMonitoring ¶
StartMonitoring starts a background goroutine that monitors SIMPL Windows dialogs for a specific PID Returns a function to stop the monitoring
func (*Client) WaitForAppear ¶
WaitForAppear waits for the SIMPL Windows main window to appear for a specific process targetPid must be a valid process ID - passing 0 will immediately return failure
type SimplProcessAPI ¶
type SimplProcessAPI struct {
// contains filtered or unexported fields
}
SimplProcessAPI is a concrete implementation of the SIMPL process management interface It wraps the Client for backward compatibility with the interface
func NewSimplProcessAPI ¶
func NewSimplProcessAPI(log logger.LoggerInterface) *SimplProcessAPI
func (SimplProcessAPI) FindWindow ¶
func (s SimplProcessAPI) FindWindow(targetPid uint32, debug bool) (uintptr, string)
func (SimplProcessAPI) WaitForReady ¶
func (s SimplProcessAPI) WaitForReady(hwnd uintptr, timeout time.Duration) bool