05.05.2014 Views

csmstr - Omega Engineering

csmstr - Omega Engineering

csmstr - Omega Engineering

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

PORTINPUT(PORT, START, END, TIMEOUT, LENGTH)<br />

CRIMSON USER MANUAL - MODULAR CONTROLLER<br />

PORTINPUT(PORT, START, END, TIMEOUT, LENGTH)<br />

ARGUMENT TYPE DESCRIPTION<br />

port int The raw port to be read.<br />

start int The start character to match, if any.<br />

end int The end character to match, if any.<br />

timeout int The inter-character timeout in milliseconds, if any.<br />

length int The maximum number of characters to read, if any.<br />

DESCRIPTION<br />

Reads a string of characters from the port indicated by port, using the various other<br />

parameters to control the input process. If start is non-zero, the process begins by waiting<br />

until the character indicated by this parameter is received. If start is zero, the receive<br />

process begins immediately. The process then continues until one of the following conditions<br />

has been met…<br />

• end is non-zero and a character matching end is received.<br />

• timeout is non-zero, and that period passes without a character being received.<br />

• length is non-zero, and that many characters have been received.<br />

The function then returns the characters received, not including the start or end byte. This<br />

function is used together with Raw Port drivers to implement custom protocols using<br />

Crimson’s programming language. It replaces the RYOP functionality found in Edict.<br />

FUNCTION TYPE<br />

This function is active.<br />

RETURN TYPE<br />

cstring.<br />

EXAMPLE<br />

Frame := PortInput(1, '*', 13, 100, 200)<br />

PAGE 386<br />

http://www.redlion.net/controller

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!