int cxInputDataChanged (int port)
int cxInputDataChangedV (int port, int *changeVec )
integer function cxInputDataChanged (port) integer port
integer function cxInputDataChangedV(port, pChangedVec) integer port pointer (pChangedVec, changedVec) integer changedVec(1)
- Port descriptor for the port to be checked, as returned from cxInputPortOpen.
- Set to the address of an array of integers indicating whether there is new data from each connection on the port.
cxInputDataChangedV returns the number of values in the changeVec array.cxInputDataChanged returns a non-zero value if port has new data. The status of input port data does not change during the firing of a module. Hence, this routine is most useful if used at the beginning of a firing cycle to determine which input ports have new data. A non-zero return value indicates that the data associated with the input port has not been accessed by the module on a previous firing. If cxInputDataChanged is not called, the port will still have new data the next time the module fires.
cxInputDataChangedV sets changeVec to the address of an array which contains a non-zero (or zero) value for each connection that has new (or old) data, and returns the number of connections in the array. The changeVec array is static and must not be deallocated. The changed flags correspond to the array of data pointers returned by cxInputDataGetV and the array of connection identifiers returned by cxInputDataConnIDGetV. cxInputDataChangedV will not return the current number of connections if connections were made and then disconnected. See cxInputDataGet for a discussion of what data value and changed flag are used in this case.
The port is considered new if any of the connections have new data. The port will be old the next time the module fires if either cxInputDataGet or cxInputDataGetV are called.
cxInputDataChanged and cxInputDataChangedV should not be called for "Fire" ports, cxFireDataChanged and cxFireDataChangedV provide similar functionality for such ports.
Modules that use the Module Data Wrapper can access cxInputDataChanged through the "Data Changed" element in the input ports menu, shown in the Connections window. Because the Module Data Wrapper calls cxInputDataGet for every input port, each input port will be "old" the next time the module fires. Thus, data wrapper modules cannot postpone querying a ports state from one firing to the next; all port states are queried each time the module fires.cxInputDataGet(3E), cxInputDataGetV(3E), cxInputDataConnIDGet(3E), cxInputDataConnIDGetV(3E), cxInputPortOpen(3E), cxFireDataChanged(3E), cxFireDataChangedV(3E).
Last modified: Mon Nov 6 16:33:21 GMT 2000
[ Documentation Home ] © The Numerical Algorithms Group Ltd, Oxford UK. 1999