Instrument Neutral Distributed Interface INDI
1.9.5
|
Go to the documentation of this file.
37 class TCP :
public Interface
47 virtual ~TCP() =
default;
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;
ITextVectorProperty AddressTP
Properties.
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 Disconnect() override
Disconnect Disconnect from device.
ISwitchVectorProperty LANSearchSP
virtual bool saveConfigItems(FILE *fp) override
virtual std::string label() override
virtual bool Connect() override
Connect Connect to device via the implemented communication medium. Do not perform any handshakes.
Text vector property descriptor.
void setConnectionType(int type)
TODO should be renamed to setDefaultConnectionType.
virtual Type type()
type Return connection type
virtual bool ISNewText(const char *dev, const char *name, char *texts[], char *names[], int n) override
TCP(INDI::DefaultDevice *dev)
virtual void Activated() override
Activated Function called by the framework when the plugin is activated (i.e. selected by the user)....
static constexpr uint8_t SOCKET_TIMEOUT
ConnectionType connectionType() const
ISwitchVectorProperty TcpUdpSP
Combines all INDI Connection Plugins. Each INDI connection plugin is responsible of managing communic...
virtual uint32_t port() const
void setDefaultHost(const char *addressHost)
void setDefaultPort(uint32_t addressPort)
virtual std::string name() override
virtual const char * host() const
virtual void Deactivated() override
Deactivated Function called by the framework when the plugin is deactivated. It is usually used to de...
void setLANSearchEnabled(bool enabled)
int IUFindOnSwitchIndex(const ISwitchVectorProperty *sp)
Returns the index of first ON switch it finds in the vector switch property.
int m_ConfigConnectionType
Class to provide extended functionality for devices in addition to the functionality provided by INDI...
virtual bool ISNewSwitch(const char *dev, const char *name, ISState *states, char *names[], int n) override
Switch vector property descriptor.