Changes between Initial Version and Version 1 of Docs/Prog/Manual/ApplicationLibraries/lib825ev/IO/GetInputMask


Ignore:
Timestamp:
12/27/11 09:35:01 (12 years ago)
Author:
Don Wilson
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • Docs/Prog/Manual/ApplicationLibraries/lib825ev/IO/GetInputMask

    v1 v1  
     1= GetInputMask =
     2Determine if any of one or more inputs for the main board or a DIO option card is on.
     3
     4{{{
     5bool GetInputMask(int bd, uint32 mask);
     6}}}
     7
     8== Parameters ==
     9
     10 * bd - 0 for main board or number of digital output card.
     11 * mask - input bit mask.
     12
     13== Return Value ==
     14
     15 * Returns the result - true = any input specified by the mask is on, false = all inputs specified by the mask are off
     16
     17== Remarks ==
     18
     19The main board or option card must already be opened by calling OpenMnBd first. This function returns the status of the memory buffer for the input. It is necessary to have communications code in place for this memory to be updated in an application. This can be done by using StartRepeatIO or StartRepeatMulti, at the beginning of the application or by calling MnBdRequest MNBD_GET_IO_STATUS prior to GetOutput.
     20
     21== Examples ==
     22
     23{{{
     24// Inputs 1 - 2 = mask 1 + 2 = 3
     25if(GetInputMask(MNBD_DEV, 3) == true)
     26    DisplayText(0, 0, "Inputs 1 2 or both ON");
     27}}}
     28
     29{{{
     30// inputs 2 - 3  =   mask 2 + 4 = 6
     31if(GetInputMask(1, 6) == false)
     32    DisplayText(0, 0, "Card 1 Inputs 2 and 3 are OFF");
     33}}}
     34
     35== See Also ==
     36
     37 * [http://tech.825spectrum.com/trac/wiki/Docs/Prog/Manual/ApplicationLibraries/lib825ev/IO/GetInput GetInput]
     38 * [http://tech.825spectrum.com/trac/wiki/Docs/Prog/Manual/ApplicationLibraries/lib825ev/IO/SetOutputMask SetOutputMask]