05.05.2014 Views

csmstr - Omega Engineering

csmstr - Omega Engineering

csmstr - Omega Engineering

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

TESTACCESS(RIGHTS, PROMPT)<br />

CRIMSON USER MANUAL - MODULAR CONTROLLER<br />

TESTACCESS(RIGHTS, PROMPT)<br />

ARGUMENT TYPE DESCRIPTION<br />

rights int The required access rights.<br />

prompt cstring The prompt to be used in the log-on popup.<br />

DESCRIPTION<br />

Returns a value of true or false depending on whether the current user has access rights<br />

defined by the rights parameter. This parameter comprises a bit-mask representing the<br />

various user-defined rights, with bit 0 (ie. the bit with a value of 0x01) representing User<br />

Right 1, bit 1 (ie. the bit with a value of 0x02) representing User Right 2 and so on. If no user<br />

is currently logged on, the system will display a popup to ask for user credentials, using the<br />

prompt argument to indicate why the popup is being displayed. The function is typically used<br />

in programs that perform a number of actions that might be subject to security, and that might<br />

otherwise be interrupted by a log-on popup. By executing this function before the actions are<br />

performed, you can provide a better indication to the user as to why a log-on is required, and<br />

you can avoid a security failure part way through a series of operations.<br />

FUNCTION TYPE<br />

This function is passive.<br />

RETURN TYPE<br />

int<br />

EXAMPLE<br />

if( TestAccess(1, “Clear all data?”) ) {<br />

Data1 := 0;<br />

Data2 := 0;<br />

Data3 := 0;<br />

}<br />

PAGE 424<br />

http://www.redlion.net/controller

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

Saved successfully!

Ooh no, something went wrong!