NCS Brain Server


Starting the server

The server is started with a configuration file for static ports, and a port value for automatic socket connections.

server config.txt 20000

Even if config.txt is empty, it still needs to be there until the server has a better command line interpreter


NCS Input File

Brain Block

Stimulus and Report Blocks Sample Input File


Name assignments

When NCS requests a connection from the server, it will construct a name for the object.


Client Programs

Once NCS sets up it's server connections, client programs need to be able to find those connections in order to send/receive data.

Open a connection to the main server on the main port and send the following lines (including the newline characters).

"request\n" - keyword for the server
"read\n" or "write\n" - whether you intend to read or write data to the server
"ascii\n" or "binary\n" - what data format you want to receive
"ncs_assigned_name\n" - the name of the socket to find or create

The server will then ensure that data is routed appropriately between the client program and NCS. The client program just continues using the same socket it used to write the original request.

demo clients
writer sending data to NCS
reader getting data from NCS