早速ASCOM Alpaca(以降、単にAlpacaとします)のAPIを調べました。
此方です:ASCOM Alpaca Device API v1 OAS 3.1
Alpacaでのデバイス指定は、”Alpaca Device API URLs” でURLで指定します。その方法や規定は
以下の感じです(上記URLの一部をDeepLで翻訳)
AlpacaデバイスAPIのURLは、http(s)://host:port/pathの形式です。pathは、「/api/v1/」の後に以下のメソッド名のいずれかが続きます。例えば、IPアドレス192.168.1.89のデバイスのポート7843で動作しているAlpacaインターフェースの場合:
・望遠鏡の「インターフェース・バージョン」メソッドURLは、http://192.168.1.89:7843/api/v1/telescope/0/interfaceversion
・ローテーターの 「Halt 」メソッドのURLは
http://192.168.1.89:7843/api/v1/rotator/0/halt
GET操作の場合、パラメータはURLのクエリー文字列の中に、
PUT操作の場合、パラメータはメッセージ本文の中に置くべきである。
応答はJSON形式で返され、クライアントのトランザクショ ン番号、サーバーのトランザクション番号、エラーメッセージ、エラー番号を含む 共通の値セットを常に含む。
この通り、正に自分が思っていたような方式、形式に違い近いです。さらに仕様では細かく規定されています。
1.ASCOM Methods Common To All Devices
# | 操作 | 指定 | 記述 | 要否 |
1 | PUT | /{device_type}/{device_number}/action | Invokes the named device-specific action | 調査検討 |
2 | PUT | /{device_type}/{device_number}/commandblind | Transmits an arbitrary string to the device | 調査検討 |
3 | PUT | /{device_type}/{device_number}/commandbool | Transmit an arbitrary string to device and returns a boolean value from device | 調査検討 |
4 | PUT | /{device_type}/{device_number}/commandstring | Transmit an arbitrary string to device and returns a string value from device | 調査検討 |
5 | PUT | /{device_type}/{device_number}/connect | Starts an asynchronous connect to the device | 調査検討 |
6 | GET | /{device_type}/{device_number}/connected | Retrieves the connected state of the device | 〇 |
7 | PUT | /{device_type}/{device_number}/connected | Set the connected stats to the device | 調査検討 |
8 | GET | /{device_type}/{device_number}/connecting | Completion variable for the asynchronous Connect() and Disconnect() methods | 調査検討 |
9 | GET | /{device_type}/{device_number}/description | Device Discription | 〇 |
10 | GET | /{device_type}/{device_number}/devicestate | Returns the device’s operational state in a single call | 〇 |
11 | PUT | /{device_type}/{device_number}/disconnect | Starts an asynchronous disconnect from the device | 調査検討 |
12 | GET | /{device_type}/{device_number}/driverinfo | Device driver description | 〇 |
13 | GET | /{device_type}/{device_number}/driverversion | Device Version | 〇 |
14 | GET | /{device_type}/{device_number}/interfaceversion | The ASCOM Device interface version number thar this device supports | 〇 |
15 | GET | /{device_type}/{device_number}/name | Device name | 〇 |
16 | GET | /{device_type}/{device_number}/supportedactions | Return the list of action names supported by this device | 調査検討 |
2.Dome Specific Method
# | 操作 | 指定 | 記述 | 要否 |
1 | GET | /dome/{device_number}/altitude | The dome altitude | × |
2 | GET | /dome/{device_number}/athome | Indicates whether the dome is in the home position | 〇 |
3 | GET | /dome/{device_number}/atpark | Indicates whether the dome is in the park position | × |
4 | GET | /dome/{device_number}/azimuth | The dome azimuth | 〇 |
5 | GET | /dome/{device_number}/canfindhome | Indicates whether the dome can find the home position | 〇 |
6 | GET | /dome/{device_number}/canpark | Indicate whether the dome ca be parked | false |
7 | GET | /dome/{device_number}/cansetaltitude | Indicates whether the dome altitude can be set | false |
8 | GET | /dome/{device_number}/cansetazimuth | Indicates whether the dome azimuth can be set | 検討 |
9 | GET | /dome/{device_number}/cansetpark | Indicates whether the dome park position can be set. | false |
10 | GET | /dome/{device_number}/cansetshutter | Indicates whether the dome shutter position can be set. | false |
11 | GET | /dome/{device_number}/canslave | Indicates whether the dome supports slaving to a telescope | false |
13 | GET | /dome/{device_number}/cansyncazimuth | Indicates whether the dome azimuth position can be synched | 〇 |
13 | GET | /dome/{device_number}/shutterstatus | Status of the dome shutter or roll-off roof | 〇 |
14 | GET | /dome/{device_number}/slaved | Indicates whether the dome is slaved to the telescope | × |
15 | PUT | /dome/{device_number}/slaved | Sets whether the dome is slaved to the telescope | × |
16 | GET | /dome/{device_number}/slewing | Indicates whether the any part of the dome is moving | 〇 |
17 | PUT | /dome/{device_number}/abortslew | Immediately cancel current dome operation | 〇 |
18 | PUT | /dome/{device_number}/closeshutter | Close the shutter or otherwise shield telescope from the shy | 〇 |
19 | PUT | /dome/{device_number}/findhome | Start Operation to search for the dome home position | 〇 |
20 | PUT | /dome/{device_number}/openshutter | Open shutter or otherwise expose telescope to the sky | 〇 |
21 | PUT | /dome/{device_number}/park | Rotate dome in azimuth to park position | × |
22 | PUT | /dome/{device_number}/setpark | Set the current azimuth, altitude position of dome to be the park position | × |
33 | PUT | /dome/{device_number}/slewtoaltitude | Slew the dome to the given altitude position | × |
24 | PUT | /dome/{device_number}/slewtoazimuth | Slew the dome to the given azimuth position | 〇 |
25 | PUT | /dome/{device_number}/synctoazimuth | Synchronize the current position of the dome to the given azimuth | 検討 |
3.要調査、要検討に関して
基本的に以下の機能は具備しない事とする。
i)高度の関連:スリットは0~90開いているので高度は提供しない。
ii)パーク機能:任意の方位での停止は提供しない事とする。
自動追尾はしないので当該方位でのパークも意味無いので有しない。
iii)Slave:自律的なSlave機能は持たない(単にPCからの方位指定:slewtoazimuthで移動のみ)
要調査項目:
1)action:どういった内容か
2)commandblind, commandbool, commandstring:どういった使い方をするものか
3)connect, connecting, connected, disconnectなど
4)supportedaction:内容など
検討項目:
A)cansetazimuth:使い方とか調べて
B)syncazumuth:指定方位の設定だが無条件か条件ありとするか
2025/1/20 誤記訂正
コメント