Barst  2.0
A server that controls lab hardware.
Public Attributes | List of all members
SValveData Struct Reference

#include <cpl defs.h>

Public Attributes

unsigned short usIndex
 
bool bValue
 

Detailed Description

For output devices created with SValveInit (shift register devices) we use an array of this struct to set particular bits to a high/low value. This ensures that we only change the status of a particular bit that we want to change while leaving all other bits unchanged.

Definition at line 246 of file cpl defs.h.

Member Data Documentation

◆ usIndex

unsigned short SValveData::usIndex

the index of the bit to be changed. Each serial board that is attached outputs 8 bits and you can have multiple boards daisy chained to each other increasing to unlimited outputs. On each board itself we count the pins or outputs 0-7 from left to write (inverse of how a byte is numbered, right to left). So if one board is connected, the physical outputs of the board will be 0,1,2,3,4,5,6,7 in order from left to right. When more than one board is connected, i.e. they are daisy chained then the total number of outputs are n*8 where n is the number of boards connected. In this case, we count boards from most distant to computer to the closest to the computer, or assuming the leftmost board is connected to the computer, the rightmost board is board #1 and the leftmost board is board #n. So in the following layout: computer->board::n->board::n-1...board#2->board#1 the number of individual pins on each board are: computer->(n-1),(n-1)+1,(n-1)+2,(n-1)+3,(n-1)+4,(n-1)+5,(n-1)+6,(n-1)+7...8,9,10,11,12,13,14,15-> 0,1,2,3,4,5,6,7. The indexes given in the last example is the index number to use in usIndex.

Definition at line 260 of file cpl defs.h.