Hello. I am using matlab to control a spectrometer. The spectrometer uses a Wrapper object - described as below
"Before you can control your spectrometer, you must create an instance of the Wrapper object. This is your gateway into all of the capabilities of the spectrometer."
Example of initiating the wrapper object
wrapper = com.oceanoptics.omnidriver.api.wrapper.Wrapper()
wrapper.openAllSpectrometers();
wrapper.setTimeout(0, 3000); % 0 is the spectrometer index, 3000 is timeout in ms
My questions are:
1: Is there a way to view all the functions that in the wrapper object?
2: Whats the best way to clean up at the end (because according to the manual - "Your application must create only ONE instance of the wrapper object")
there is a function that I use:
wrapper.closeAllSpectrometers();
But whats the best way to remove all associated with the wrapper
This is an example of the created wrapper object:
wrapper =
com.oceanoptics.omnidriver.api.wrapper.Wrapper@6d099323

 採用された回答

Walter Roberson
Walter Roberson 2020 年 11 月 10 日

0 投票

com.oceanoptics.omnidriver.api.wrapper.Wrapper@6d099323
The format tells us that is a Java object instance. You can see the functions for it by asking
methodsview(wrapper)

4 件のコメント

Jason
Jason 2020 年 11 月 10 日
Thats awesome, thankyou Walter.
Not sure if I should start another question, if so I will.
Some of the methods return a java.lang.string i.e. getting the serial number
I have been using the following to convert it
string(SerialNumber)
however, when I try to concatanate like this
['Serial Number=',string(SerialNumber) ]
it doesn't work
Jason
Jason 2020 年 11 月 10 日
OK, I think I've sorted it.
['Serial Number=',char(SerialNumber)]
Walter Roberson
Walter Roberson 2020 年 11 月 10 日
"Serial Number=' + string(SerialNumber)
Jason
Jason 2020 年 11 月 10 日
Thankyou

サインインしてコメントする。

その他の回答 (0 件)

カテゴリ

ヘルプ センター および File ExchangeMATLAB についてさらに検索

製品

リリース

R2020b

タグ

質問済み:

2020 年 11 月 10 日

コメント済み:

2020 年 11 月 10 日

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by