12.07.2015 Views

SDISC Assembler Call - NetEx

SDISC Assembler Call - NetEx

SDISC Assembler Call - NetEx

SHOW MORE
SHOW LESS
  • No tags were found...

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

Programming NotesThe following sections provide supplemental information intended to make programming NETEX simpler.The following topics are discussed:• Keeping NETEX Active• Handling Multiple Connections• Service Wait Options• Satellite Communication• Error Recovery Procedures• Code Conversion OptionsHandling Multiple ConnectionsNETEX provides the capability for a program to be simultaneously connected to more than one other callingprogram. Requests coming from different connections are identified using the NRBNREF word of the NRB.NRBNREF contains a unique number assigned to a connection when it is established. The capability to handlemultiple connections enables the programmer to establish database server and requestor programs.Database server programs allow a network of hosts to use each other’s databases. A database server programsimply OFFERs itself to other hosts. When another host (a requestor) establishes a connection, the serverSREADs or SWRITEs files to or from its database as specified by the requestor.Database server programs may issue multiple offers (SOFFER) by specifying a different NRB with eachSOFFER. The offers (SOFFER) are completed in the order that they are issued. Many users on one machinemay issue multiple offers, if each is generated as though it were an individual host.Program B in the concurrent write/read example is an example of a simple database server. Program BSWRITEs the files program A requests, and then waits for more instructions. More sophisticated databaseservers could allow themselves to connect to several requestors at one time.Program A in the last example is a simple example of a database requestor.Service WAIT OptionsOn each session call, the user has the option to wait or not to wait for the request to complete. If waiting isdesired, then the “W” form of the call should be used. The User Request Manager will issue the wait on theuser’s behalf and return control to the user when the NRB is posted.The SWAIT request may be used to wait on a single NRB, a list of NRBs, or may be used to wait on zeroNRBs. The way to use the wait request depends on the situation.• If servicing a single connection where data moves logically in only one direction, use the wait option onthe requests.• If servicing multiple simultaneous connections, or a single connection where data flows both ways, useSWAIT(n) to wait on a list of NRBs.• When servicing both NETEX and a real-time application, use SWAIT(0) to wait on zero NRBs, thencheck the real-time device. When issuing an SWAIT on zero NRBs, check the NRBSTAT fields of theNRBs for the requests that you are interested in.Page 22 Intertask Communication MAN-REF-H307IP-04

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!