LoginSignup
9
8

More than 5 years have passed since last update.

API Reference《前編》

Last updated at Posted at 2015-08-26

前書き

前の記事ではqiSDKについて簡単な解説をしました。
今回は続編として、APIリファレンスについて簡単に解説します。

本題

API Referenceについて

この項は主に3項目あります。

  • 型の定義(Type equivalences between languages)
  • PythonのAPI Reference
  • C++のAPI Reference

この3つです。

型の定義

qiの型,C++,Python,Javaのそれぞれの方の比較をしています。

qi type C++ Python Java
Void void NoneType Void
Bool bool bool Boolean
Int# int#_t int Integer
UInt# uint#_t int Integer
Float float float Float
Double double float Double
String std::string str String
List std::vector list ArrayList
Map std::map dict Map
Object qi::AnyObject class instance qimessaging.Object
Value qi::AnyValue underlying type Object

PythonのAPI Reference

PythonはAPIの数がそれほどでもないので全部のせます。
詳しくはドキュメントを読んでください。

qi.Application API

アプリケーションを起動したり停止したり、そんな感じ

qi clock API

いろんなタイムスタンプを取得します。

qi.logging API

loggerです。infoやerror,warningなど系5種でlogを出します。

qi.path API

パスを見つけて関数にsetします。

qi.Session API

セッションを取得/登録出来ます。

qi.Future API

マルチスレッドでの、データの同期をします。

qi.Signal API

スレッド間のやり取りを行います。

qi.Property API

Introductionがありませんでした。
(コールバック関数に関してのAPIっぽい?)

qi.Types* API

それぞれの型に対するAPIです。インスタンスがあるか?値はいくつ?とかそんな感じ。

Bind API

関数を縛るためのAPI
メソッドの引数や戻り値を指定したものにしたり、bar1,bar2のような2つの関数をbarという関数として利用したり。そんな感じ。

qi.async, qi.PeriodicTask API

スレッドの管理

qi.Translator API

いくつかの言語を登録することで、簡単なローカライズが可能になるとかそんな感じ?

qi.Module API

自作モジュールの読み込みを可能にする
以下引用により、たぶんまだ使えません。
>*Creating modules in Python is not yet supported.
>*Pythonで作ったモジュールはまだサポートしていません

C++のAPI Reference

くっそ数が多いので、別記事へ。

感想

ちゃんと使えれば、Choreographeで開発するより早そう。

関連URL

API References
http://doc.aldebaran.com/libqi/api/python/index.html

9
8
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
9
8