MCPcopy Create free account
hub / github.com/Hamlib/Hamlib / indi_wrapper_open

Function indi_wrapper_open

rotators/indi/indi_wrapper.cpp:598–622  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

596}
597
598extern "C" int indi_wrapper_open(ROT *rot)
599{
600 hamlib_port_t *rotp = ROTPORT(rot);
601 char host[256];
602 char port[6];
603
604 rig_debug(RIG_DEBUG_TRACE, "%s called\n", __func__);
605
606 if (parse_hoststr(rotp->pathname, strlen(rotp->pathname), host, port) == RIG_OK)
607 {
608 indi_wrapper_client->setServer(host, atoi(port));
609 }
610 else
611 {
612 indi_wrapper_client->setServer("localhost", 7624);
613 }
614
615 if (!indi_wrapper_client->connectServer())
616 {
617 rig_debug(RIG_DEBUG_ERR, "indi: server refused connection\n");
618 return -RIG_EPROTO;
619 }
620
621 return RIG_OK;
622}
623
624extern "C" int indi_wrapper_close(ROT *rot)
625{

Callers

nothing calls this directly

Calls 2

rig_debugFunction · 0.85
parse_hoststrFunction · 0.85

Tested by

no test coverage detected