#include <stdio.h>#include "rcs_prnt.hh"#include "emcglb.h"#include "sim.h"Include dependency graph for simaio.c:

Go to the source code of this file.
Defines | |
| #define | SIM_AIO_MAX_INPUTS 8 |
| #define | SIM_AIO_MAX_OUTPUTS 8 |
Functions | |
| char | __attribute__ ((unused)) ident[]="$Id |
| int | simAioQuit (void) |
| int | simAioMaxInputs (void) |
| int | simAioMaxOutputs (void) |
| int | simAioRead (int index, double *volts) |
| int | simAioWrite (int index, double volts) |
| int | simAioCheck (int index, double *volts) |
|
|
|
|
|
|
|
|
Definition at line 34 of file simaio.c. 00034 : simaio.c,v 1.3 2001/06/11 17:57:22 wshackle Exp $";
00035
00036 /*
00037 Analog IO model
00038
00039 Provides for simulated analog ins, outs
00040 */
00041
00042 #define SIM_AIO_MAX_INPUTS 8
00043 #define SIM_AIO_MAX_OUTPUTS 8
00044
00045 static double simAioInputs[SIM_AIO_MAX_INPUTS];
00046 static double simAioOutputs[SIM_AIO_MAX_OUTPUTS];
00047
00048 int simAioInit(const char * filename)
00049 {
00050 return 0;
00051 }
|
|
||||||||||||
|
Definition at line 96 of file simaio.c. Referenced by extAioCheck().
00097 {
00098 if (index < 0 || index >= SIM_AIO_MAX_OUTPUTS) {
00099 return -1;
00100 }
00101
00102 *volts = simAioOutputs[index];
00103
00104 return 0;
00105 }
|
|
|
Definition at line 58 of file simaio.c. Referenced by extAioMaxInputs().
00059 {
00060 return SIM_AIO_MAX_INPUTS;
00061 }
|
|
|
Definition at line 63 of file simaio.c. Referenced by extAioMaxOutputs().
00064 {
00065 return SIM_AIO_MAX_OUTPUTS;
00066 }
|
|
|
Definition at line 53 of file simaio.c. Referenced by extAioQuit().
00054 {
00055 return 0;
00056 }
|
|
||||||||||||
|
Definition at line 68 of file simaio.c. Referenced by extAioRead().
00069 {
00070 if (index < 0 || index >= SIM_AIO_MAX_INPUTS) {
00071 return -1;
00072 }
00073
00074 *volts = simAioInputs[index];
00075
00076 return 0;
00077 }
|
|
||||||||||||
|
Definition at line 79 of file simaio.c. Referenced by extAioWrite().
00080 {
00081 if (index < 0 || index >= SIM_AIO_MAX_OUTPUTS) {
00082 return -1;
00083 }
00084
00085 simAioOutputs[index] = volts;
00086
00087 #if !defined(rtlinux) && !defined(rtai)
00088 if (EMC_DEBUG & EMC_DEBUG_IO_POINTS) {
00089 rcs_print("[AOUT]\t%d\t%f\n", index, volts);
00090 }
00091 #endif
00092
00093 return 0;
00094 }
|
1.2.11.1 written by Dimitri van Heesch,
© 1997-2001