Prerequisites
Relevant source files
The following files were used as context for generating this wiki page:
The Pulsar_DomeDriver requires specific configuration to operate correctly. These settings are managed through the ASCOM driver's setup dialog and are stored in the ASCOM Profile registry. The configuration covers serial communication with the dome controller, logging behavior, error recovery mechanisms, and optional integrations with external systems like MQTT and the Goodnight System (GNS).
Properly configuring these prerequisites is essential for establishing a connection, monitoring dome status, and ensuring the driver can automatically recover from communication stalls or hardware errors. The ConfigManager class is responsible for reading and writing these values, which are then utilized by the main DomeDriver class.
Sources: Config/ConfigManager.cs, Driver/Pulsar_DomeDriver.cs:119-130, UI/SettingsForm.cs
Configuration Architecture
The driver's settings are managed through a dedicated SettingsForm, which interacts with the ConfigManager to persist settings to the ASCOM Profile. The DomeDriver instance then uses the ConfigManager to access these settings during its lifecycle.
This diagram illustrates the flow of configuration data from the user interface to the driver.
Core Configuration
These are the fundamental settings required for basic driver operation.
Serial Communication
The driver communicates with the Pulsar dome controller via a serial port. The port name must be correctly specified. Other serial parameters are hardcoded.
- Port Name: The COM port to which the controller is connected.
- Baud Rate: 115200 (hardcoded)
- Parity: None (hardcoded)
- Data Bits: 8 (hardcoded)
- Stop Bits: One (hardcoded)
- Handshake: None (hardcoded)
The InitializeSerialPort method in the DomeDriver class uses the configured port name to set up the SerialPort object.
Sources: Driver/Pulsar_DomeDriver.cs:174-192, Config/ConfigManager.cs:98-102, UI/SettingsForm.cs:41-55
Logging
The driver supports configurable logging to a file.
- Log File Location: The directory path where the log file (
Pulsar_DomeDriver.log) will be created. - Debug Log: A checkbox to enable detailed debug-level messages.
- Trace Log: A checkbox to enable highly verbose trace-level messages, typically for deep diagnostics.
The logger is initialized at driver startup, reading these settings from the profile.
Sources: Driver/Pulsar_DomeDriver.cs:131-149, Diagnostics/FileLogger.cs, Config/ConfigManager.cs:134-142, 220-244
Error Recovery and Reset
The driver features a robust error recovery system that can perform "soft" or "hard" resets if the dome controller becomes unresponsive.
Reset Strategy
The user can enable one or both reset strategies. If a command times out, the driver will attempt a soft reset first (if enabled). If that fails or is disabled, it will proceed to a hard reset (if enabled).
- Internal Reset (Soft): Sends a
RESTARTcommand to the controller. - External Reset (Hard): Uses an external executable to power-cycle the controller.
Sources: Driver/Pulsar_DomeDriver.cs:1250-1349, Config/ConfigManager.cs:104-124, UI/SettingsForm.Designer.cs:238-255
Hard Reset Configuration
A hard reset involves power-cycling the controller using an external script or program. This requires several specific parameters.
| Setting | UI Control | Registry Key | Description |
|---|---|---|---|
| Reset Executable | txtBoxExternalExe | ResetExe | Path to the executable file that controls the power relay. |
| ON Parameters | txtBoxOnParameters | ResetOnParameters | Command-line arguments to pass to the executable to turn power ON. |
| OFF Parameters | txtBoxOffParameters | ResetOffParameters | Command-line arguments to pass to the executable to turn power OFF. |
| Reboot Delay (s) | txtBoxResetDelay | ResetDelay | Seconds to wait after turning power ON for the controller to initialize. |
| Cycle Delay (s) | txtBoxCycleDelay | CycleDelay | Seconds to wait between turning power OFF and turning it back ON. |
Sources: Config/ConfigManager.cs:144-183, UI/SettingsForm.cs:72-88, Driver/Pulsar_DomeDriver.cs:1434-1478
The following diagram shows the sequence of a hard reset.
Timeout Configuration
Timeouts determine how long the driver waits for an action to complete before triggering the reset routine.
| Setting | UI Control | Registry Key | Description | Default (ms) |
|---|---|---|---|---|
| Shutter Timeout (s) | txtBoxShutterTimeout | ShutterTimeout | Max time to wait for the shutter to open or close. | 90000 |
| Rotation Timeout (s) | txtBoxRotationTimeout | RotationTimeout | Max time to wait for a dome rotation to complete. | 90000 |
Sources: Config/ConfigManager.cs:185-218, UI/SettingsForm.cs:85-86, Driver/Pulsar_DomeDriver.cs:1865-1873, 1904-1912
Optional Integrations
The driver can integrate with other systems for status reporting and notifications.
MQTT
If enabled, the driver will connect to an MQTT broker and publish status updates on various topics.
- Enable MQTT: A checkbox (
chkBoxMQTT) to turn the feature on or off. - Broker IP: Hardcoded to
localhost. - Broker Port: Hardcoded to
1883.
The MqttPublisher class handles the connection and publishing of messages.
*Sources: Config/ConfigManager.cs:246-258, Driver/Pulsar_DomeDriver.cs:1571-1596, MQTT/MqttPublisher.cs_
Goodnight System (GNS)
If enabled, the driver can send notifications to the Goodnight System (GNS) via a named pipe.
- Enable GNS: A checkbox (
chkBoxGNS) to turn the feature on or off. - GNS Path: Path to the GNS executable.
- GNS Dispatcher Path: Path to the GNS Dispatcher executable.
The GNS class formats and sends messages to the GNSBridge named pipe.
Sources: Config/ConfigManager.cs:260-280, GNS/GNS.cs, UI/SettingsForm.cs:60-64
Full Configuration Parameter List
All settings are stored under the Pulsar_DomeDriver ASCOM Profile ID.
| Setting | Registry Key | Type | Description |
|---|---|---|---|
| Serial Port | SerialPort | string | The COM port for the dome controller. |
| Log Location | LogLocation | string | Directory to store the log file. |
| Debug Log | DebugLog | boolean | Enables DEBUG level logging. |
| Trace Log | TraceLog | boolean | Enables TRACE level logging. |
| Internal Reset | InternalReset | boolean | Enables soft reset (RESTART command). |
| External Reset | ExternalReset | boolean | Enables hard reset via an external executable. |
| Reset Executable | ResetExe | string | Path to the hard reset executable. |
| ON Parameters | ResetOnParameters | string | Arguments for the reset executable to turn power on. |
| OFF Parameters | ResetOffParameters | string | Arguments for the reset executable to turn power off. |
| Reboot Delay | ResetDelay | int (s) | Wait time after power-on during a hard reset. |
| Cycle Delay | CycleDelay | int (s) | Wait time between power-off and power-on during a hard reset. |
| Shutter Timeout | ShutterTimeout | int (s) | Timeout for shutter open/close operations. |
| Rotation Timeout | RotationTimeout | int (s) | Timeout for dome slew/home/park operations. |
| MQTT | MQTT | boolean | Enables MQTT integration. |
| GNS | GNS | boolean | Enables Goodnight System (GNS) integration. |
| GNS Path | GNSPath | string | Path to the GNS executable. |
| GNS Dispatcher Path | GNSDispatcherPath | string | Path to the GNS Dispatcher executable. |
Sources: Config/ConfigManager.cs:302-323, UI/SettingsForm.cs:113-140