This low-level module reads data from a visit connection.
module VisitReader<src_file="VisitReader.c"> { int+IPort2 SockID = -1; int+IPort2 Trigger = 0; omethod+notify_inst VisitReader_inst( TimeStamp+write, n1+read+write, n2+read+write, n3+read+write, n4+read+write, DataIntSize+write, DataInt+write, DataShortSize+write, DataShort+write, DataByteSize+write, DataByte+write, DataDoubleSize+write, DataDouble+write, DataString+write, DataIntScalar+write, DataByteScalar+write, DataShortScalar+write, DataDoubleScalar+write ) = "VisitReader_inst"; omethod+req VisitReader_read( SockID+read+req, Trigger+read+notify+req, TimeStamp+write, n1+write, n2+write, n3+write, n4+write, DataIntSize+write, DataInt+write, DataByteSize+write, DataByte+write, DataShortSize+write, DataShort+write, DataDoubleSize+write, DataDouble+write, DataString+write, DataIntScalar+write, DataShortScalar+write, DataByteScalar+write, DataDoubleScalar+write ) = "VisitReader_read"; double+OPort2 TimeStamp; int+OPort2 n1 = -1; int+OPort2 n2 = -1; int+OPort2 n3 = -1; int+OPort2 n4 = -1; int o1 = -1; int o2 = -1; int o3 = -1; int o4 = -1; int s1 = -1; int s2 = -1; int s3 = -1; int s4 = -1; int DataIntSize = 0; int+OPort2 DataInt[DataIntSize]; int DataByteSize = 0; byte+OPort2 DataByte[DataByteSize]; int DataShortSize = 0; short+OPort2 DataShort[DataShortSize]; int DataDoubleSize = 0; double+OPort2 DataDouble[DataDoubleSize]; string+OPort2 DataString; int+OPort2 DataIntScalar; byte+OPort2 DataByteScalar; short+OPort2 DataShortScalar; double+OPort2 DataDoubleScalar; };
This module reads data from a remote application. The remote application it should connect to is specified by the SockID input. This input will normally be provided by the VisitServer module that has created the connection. The module is triggered whenever data arrives at the Trigger port. The Trigger input can be connected directly to the Trigger output port of a VisitServer if only one VisitReader or VisitWriter module is being used. If more than one VisitReader or VisitWriter is connected to a VisitServer it is necessary to use a Multiplexer in order to select a VisitReader or VisitWriter module for each request. There is no implicit distinction between read and write requests. Therefore the user is responsible for using different IDs for read and write requests.
Whenever the module is triggered data is read from the remote application and presented on the output ports. The output values TimeStamp and n1 ... n4 contain the header-information that has been sent by the remote application (using the visit_send_4d
or visit_send_string
function calls). The Data... output ports contain the data values that have been sent by the remote application. Depending on the type of data that has been sent the data will be presented on the appropriate Data output port. With a field of length n1=n2=n3=n4=1 the data is presented at both a vector and a scalar output port.
The VisitReader module should be used in conjunction with the modules Multiplexer, VisitServer and VisitWriter.
Before this module can be compiled and used the VISIT library must be installed. For information on how to install this library please see the VISIT library(http://www.fz-juelich.de/zam/visit) home page. A complete set of documentation for the VISIT-library can also be found at this URL.
The Visit IAC project assumes that the VISIT library has been installed into the default directory i.e.
/usr/local/visit/
If this is not the case then the references to that directory in the visit_mods.v file will have to be modified.
SockID
Integer input port that contains a socket descriptor. This socket descriptor specifies the data-connection to the remote application. This input port should be connected to the SockID output port of the VisitServer module.
Trigger
When this input is triggered the VisitReader module will attempt to read a message from the remote application. Normally this port should be connected to the Trigger output port of the VisitServer module. This should be done by either making a direct connection or making an indirect connection through a Multiplexer module.
Timestamp, n1, n2, n3, n4
Contain the header-information that has been sent by the remote application (using the visit_send_4d or visit_send_string function calls).
DataString
If the datatype of the read message is STRING this output port will present the data contained in the message.
DataInt, DataShort, DataByte, DataDouble
If the read message contains numerical data the values will be presented at one of these array outputs. The output used depends upon the datatype of the read message. If the message only contains a single value the value will also be presented at the appropriate scalar output.
DataIntScalar, DataShortScalar, DataByteScalar, DataDoubleScalar
If the read message contains a single numerical value the value will be presented at one of these scalar outputs. The output used depends upon the datatype of the read message. If the message contains more than one value these outputs will not used.
The low-level module VisitReader is used in the Functional Macro visitreader.
Examples of the use of this module can be found in the VisitSimpleEg and VisitGoLEg example applications.
iac_proj/visit/visit_mods.v contains the V definition of the VisitReader module.
By default the low-level library VisitMods, which needs to be compiled, has the process set to express. Therefore express must not be running while this project is compiled.
Before the Visit project can be compiled the VISIT library must be installed, configured and compiled. For full instructions please see the VISIT library web-site.
The Visit IAC project assumes that the VISIT library has been installed into the default directory i.e.
/usr/local/visit/
If this is not the case then the references to that directory in the visit_mods.v file will have to be modified.
Wolfgang Frings Central Institute for Applied Mathematics Research Center Juelich D-52425 Juelich Germany
Ma YingLiang, Manchester Visualization Centre Andrew Dodd, International AVS Centre
Wolfgang Frings Central Institute for Applied Mathematics Forschungszentrum Juelich GmbH D-52425 Juelich Germany E-mail: W.Frings@fz-juelich.deInternational AVS Centre Manchester Visualization Centre Manchester Computing University of Manchester Oxford Road Manchester United Kingdom M13 9PL E-mail: avs@iavsc.org