Hey guys, I have the following function:
BstCommand is called everytime a switch is toggled. Dig_out_line sets the state of the switch as high or low. The problem is I don't exactly understand how sleepex here works. It prevents the switch to high line from running depending on I/O and APC calls. But right now the last line always runs, so I always get high for the switch.
int BstCommand(int bat, int port, short line)
//sets switch low
status = DIG_Out_Line(card, port, line, 0);
//sets switch high
status = DIG_Out_Line(card, port, line, 1);
short DIG_Out_Line (short device,
int d =(int)&device;
I'm trying to emulate a virtual switch here using code that deals with real switches. I can only modify dig_out_line, but not Bstcommand. What can I do?