×

INDI Library v2.0.6 is Released (02 Feb 2024)

Bi-monthly release with minor bug fixes and improvements

API for Rust

  • Posts: 114
  • Thank you received: 17

API for Rust was created by Denis

Hi,
I didn't find any rust-API for indi. I need functionality to control the camera (cooling and shooting) and I'm looking for advice on using indi from Rust. I have several ways to do this.
First, I can connect to indi via tcp and send XMLs. Second, I can write wrappers to c API. What way is easier?
1 year 4 months ago #88172

Please Log in or Create an account to join the conversation.

Replied by Jasem Mutlaq on topic API for Rust

Probably the 2nd method is easier. I have no experience in RUST so can't comment on how challenging that may be.
1 year 4 months ago #88178

Please Log in or Create an account to join the conversation.

  • Posts: 216
  • Thank you received: 120

Replied by Rick Bassham on topic API for Rust

I haven't used Rust, but I wrote some libraries in Go to interface with indi. I haven't updated them in a while, but they should still be good. Might be a good way to at least see it implemented in another language other than C++.

github.com/goastro
1 year 4 months ago #88228

Please Log in or Create an account to join the conversation.

  • Posts: 114
  • Thank you received: 17

Replied by Denis on topic API for Rust

Thanks for source code examples! I will try to write pure-rust API. Is it possible to see real XML data sent between EKos and Indi? I think examples of XML will make it easier to understand how Indi works
1 year 4 months ago #88249

Please Log in or Create an account to join the conversation.

  • Posts: 349
  • Thank you received: 107

Replied by nou on topic API for Rust

Run "indiserver -v indi_simulator_ccd indi_simulator_telescope" set new profile in ekos with remote address 127.0.0.5 and then run wireshark on localhost to snoop any messages.

Don't leave localhost in as address because then it seems use socket pipe and wireshark doesn't capture it.
Last edit: 1 year 4 months ago by nou.
1 year 4 months ago #88253

Please Log in or Create an account to join the conversation.

  • Posts: 114
  • Thank you received: 17

Replied by Denis on topic API for Rust

Thanks! But I already thought about sniffing of TCP. I was hoping that Indi could log communication with clients to a file
1 year 4 months ago #88256

Please Log in or Create an account to join the conversation.

  • Posts: 472
  • Thank you received: 165

Replied by Jarno Paananen on topic API for Rust

Adding -vvv to indiserver command line shows the full xml messages as well.
1 year 4 months ago #88265

Please Log in or Create an account to join the conversation.

  • Posts: 114
  • Thank you received: 17

Replied by Denis on topic API for Rust

This is what I was looking for. Thanks!
1 year 4 months ago #88283

Please Log in or Create an account to join the conversation.

  • Posts: 114
  • Thank you received: 17

Replied by Denis on topic API for Rust

Indi response consists of multiple XMLs. How to find out which XML is the latest one?

For this indilib.org/develop/developer-manual/106...ent-development.html how to understand
<deftextvector ...
is the last one?
1 year 4 months ago #88471

Please Log in or Create an account to join the conversation.

  • Posts: 114
  • Thank you received: 17

Replied by Denis on topic API for Rust

Hi,
Where can I get this list of devices supported by INDI and the corresponding line command for `indiserver`?
1 year 3 months ago #88915
Attachments:

Please Log in or Create an account to join the conversation.

Replied by Jasem Mutlaq on topic API for Rust

Devices are parsed from INDI XML files typically found under /usr/share/indi

You can checkout INDI Server documentation.
1 year 3 months ago #88920

Please Log in or Create an account to join the conversation.

  • Posts: 5
  • Thank you received: 1

Replied by Chris Constantine on topic API for Rust

I've been working on a rust api for indi, and just published the first version of it. Feel free to check it out, and I'd be happy to help if you run into any troubles or simply get confused. Feedback would be great too; I'm new to rust, and now's the time to get the rust api settled.

The crate is called indi (NOT indi_client), and you can see it on cargo here: crates.io/crates/indi.
The following user(s) said Thank You: Jasem Mutlaq
Last edit: 1 year 3 months ago by Chris Constantine.
1 year 3 months ago #89007

Please Log in or Create an account to join the conversation.

Time to create page: 1.686 seconds