|
Instrument Neutral Distributed Interface INDI 2.2.5
|
Implementation of the ASCOM Alpaca Discovery Protocol. More...
#include <alpaca_discovery.h>
Public Member Functions | |
| AlpacaDiscovery (int discoveryPort=32227, int alpacaPort=11111) | |
| Constructor. | |
| ~AlpacaDiscovery () | |
| Destructor. | |
| bool | start () |
| Start the discovery server. | |
| bool | stop () |
| Stop the discovery server. | |
| bool | isRunning () const |
| Check if the discovery server is running. | |
| void | setDiscoveryPort (int port) |
| Set the discovery port. | |
| int | getDiscoveryPort () const |
| Get the discovery port. | |
| void | setAlpacaPort (int port) |
| Set the Alpaca API port. | |
| int | getAlpacaPort () const |
| Get the Alpaca API port. | |
Implementation of the ASCOM Alpaca Discovery Protocol.
This class implements the UDP-based discovery protocol for ASCOM Alpaca. It listens for UDP broadcasts on the discovery port (default 32227) and responds with the Alpaca API port.
The protocol is defined at: https://github.com/DanielVanNoord/AlpacaDiscoveryTests
Definition at line 44 of file alpaca_discovery.h.
| AlpacaDiscovery::AlpacaDiscovery | ( | int | discoveryPort = 32227, |
| int | alpacaPort = 11111 |
||
| ) |
Constructor.
| discoveryPort | The port to listen for discovery requests (default: 32227) |
| alpacaPort | The port of the Alpaca API server to report in responses |
Definition at line 50 of file alpaca_discovery.cpp.
| AlpacaDiscovery::~AlpacaDiscovery | ( | ) |
Destructor.
Stops the discovery server if it's running
Definition at line 59 of file alpaca_discovery.cpp.
| int AlpacaDiscovery::getAlpacaPort | ( | ) | const |
Get the Alpaca API port.
Definition at line 156 of file alpaca_discovery.cpp.
| int AlpacaDiscovery::getDiscoveryPort | ( | ) | const |
Get the discovery port.
Definition at line 138 of file alpaca_discovery.cpp.
| bool AlpacaDiscovery::isRunning | ( | ) | const |
Check if the discovery server is running.
Definition at line 120 of file alpaca_discovery.cpp.
| void AlpacaDiscovery::setAlpacaPort | ( | int | port | ) |
Set the Alpaca API port.
| port | The port of the Alpaca API server |
Definition at line 143 of file alpaca_discovery.cpp.
| void AlpacaDiscovery::setDiscoveryPort | ( | int | port | ) |
Set the discovery port.
| port | The port to listen for discovery requests |
Definition at line 125 of file alpaca_discovery.cpp.
| bool AlpacaDiscovery::start | ( | ) |
Start the discovery server.
Definition at line 68 of file alpaca_discovery.cpp.
| bool AlpacaDiscovery::stop | ( | ) |
Stop the discovery server.
Definition at line 92 of file alpaca_discovery.cpp.