49 virtual bool Connect()
override;
57 virtual std::string
name()
override
59 return "CONNECTION_TCP";
62 virtual std::string
label()
override
67 virtual const char *
host()
const
71 virtual uint32_t
port()
const
80 virtual bool ISNewText(
const char *dev,
const char *
name,
char *texts[],
char *names[],
int n)
override;
81 virtual bool ISNewSwitch(
const char *dev,
const char *
name,
ISState *states,
char *names[],
int n)
override;
The Interface class is the base class for all INDI connection plugins.
virtual Type type()
type Return connection type
The TCP class manages connection with devices over the network via TCP/IP. Upon successfull connectio...
void setDefaultHost(const char *addressHost)
ISwitchVectorProperty TcpUdpSP
virtual std::string label() override
int m_ConfigConnectionType
virtual bool ISNewText(const char *dev, const char *name, char *texts[], char *names[], int n) override
static constexpr uint8_t SOCKET_TIMEOUT
void setLANSearchEnabled(bool enabled)
virtual std::string name() override
virtual bool Disconnect() override
Disconnect Disconnect from device.
void setConnectionType(int type)
TODO should be renamed to setDefaultConnectionType.
virtual void Activated() override
Activated Function called by the framework when the plugin is activated (i.e. selected by the user)....
void setDefaultPort(uint32_t addressPort)
virtual const char * host() const
virtual bool Connect() override
Connect Connect to device via the implemented communication medium. Do not perform any handshakes.
virtual uint32_t port() const
virtual bool saveConfigItems(FILE *fp) override
ConnectionType connectionType() const
ISwitchVectorProperty LANSearchSP
bool establishConnection(const std::string &hostname, const std::string &port, int timeout=-1)
establishConnection Create a socket connection to the host and port. If successful,...
virtual bool ISNewSwitch(const char *dev, const char *name, ISState *states, char *names[], int n) override
ITextVectorProperty AddressTP
Properties.
virtual void Deactivated() override
Deactivated Function called by the framework when the plugin is deactivated. It is usually used to de...
TCP(INDI::DefaultDevice *dev)
Class to provide extended functionality for devices in addition to the functionality provided by INDI...
int IUFindOnSwitchIndex(const ISwitchVectorProperty *svp)
Returns the index of first ON switch it finds in the vector switch property.
Combines all INDI Connection Plugins. Each INDI connection plugin is responsible of managing communic...
Switch vector property descriptor.
Text vector property descriptor.