<< InPort_poll InPort OutPort >>

RTCscilab >> RTComponent > InPort > InPort_read

InPort_read

Read Data From InPort.

Calling Sequence

data=InPort_read(port, sz)

Parameters

port

Handle value of Outport.

sz

vector. size of matrix to be read.

data

vector.

Description

This function read user's data from InPort.

Matrix data is written in the order as follows:

Sequence                                                Matrix
                                                        |1  4  7|
                                                        |2  5  8|
[1 2 3 4 5 6 7 8 9]  ----------- DataOutPort ---------- |3  6  9|

Examples

<a href="initRTM.html" class="link">initRTM</a>("Scilab");
rtc =  <a href="RTC_create.html" class="link">RTC_create</a>();

port = <a href="RTC_registerInPort.html" class="link">RTC_registerInPort</a>(rtc, "TimedDoubleSeq", "in0");
if <a href="InPort_poll.html" class="link">InPort_poll</a>(port) then,
  sz = [3 3];
  data =  <a href="InPort_read.html" class="link">InPort_read</a>(port, sz);
end;

See Also

Authors

<< InPort_poll InPort OutPort >>