Hello,
I am using this MATLAB toolkit: https://wiki.qut.edu.au/display/cyphy/QUT+EV3+MATLAB+toolkit to program an EV3 robot. My problem is that I am trying to access a part of this code simply by saying:
"b = Brick('ioType','wifi','wfAddr','192.168.1.104','wfPort',5555,'wfSN','0016533dbaf5')" but if I try to run it I first got an error about varagin not being allowed here but I went around that problem and now it tells me:
"Import statements are currently unsupported.
Function 'wfBrickIO.m' (#72.2759.2765), line 74, column 13: "import"".
The part of code that causes problem in wfBrickIO.m is:
% import the required java libraries
import java.io.*;
import java.net.*;
% add the java path to the class path
javaaddpath .
% open the brick IO connection
brickIO.handle = Socket(brickIO.addr, brickIO.port);
% set the input stream
brickIO.inputStream = DataInputStream(brickIO.handle.getInputStream);
% set the output stream
brickIO.outputStream = OutputStreamSend();
% connection message to the brick
wmsg = ['GET /target?sn=' brickIO.serialNum ' VMTP1.0' char(10) 'Protocol: EV3'];
if brickIO.debug > 0
fprintf('Sent: [ %s ]\n',char(wmsg));
end
% send the connection message
brickIO.write(wmsg);
% receive the reply
rmsg = brickIO.read;
if brickIO.debug > 0
fprintf('Returned: [ %s ]\n',char(rmsg));
end
What could I do ? I tried to say "coder.extrinsic('Brick')" but then I got an error saying that Code Generation needed 'Brick'. I tried "coder.extrinsic('wfBrickIO')" but then it tells me that: "Code generation does not support class properties of mxArray type."

댓글 수: 1

Sharmila Raghu
Sharmila Raghu 2016년 12월 29일
Please contact the author of the third party Toolkit, that you are using for assistance regarding this error.

댓글을 달려면 로그인하십시오.

답변 (0개)

카테고리

도움말 센터File Exchange에서 Startup and Shutdown에 대해 자세히 알아보기

제품

질문:

2016년 12월 25일

댓글:

2016년 12월 29일

Community Treasure Hunt

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

Start Hunting!

Translated by