This method of communication is useful for when there are a high number of reports and/or stimulus. Rather than opening a socket for each communication stream, all communications are carried out on one stream. This requires some conversation between the client and the server.
When the client connects to the server, it may begin by issuing a number of new commands.
setpath
Format: setpath\ndirectory name[ws]job name\n
Response: [1 byte code]
First, send the command with a newline ('\n') at the end. The server
will prepare to receive the parameters. Next will come the directory
name, followed by a white space character (either a space ' ' or a
tab '\t') then the job name. A final newline ('\n') will end the
command. If either the directory name or job name should be left
the same, you can leave its place blank, but keep the separating white
space (see examples).
After the server completes the request, it will respond with a single
bytes code. 0 for success or greater if failure.
Example:
Example:
Example:
setsort
Example:
[2][3][4][5] [200][1.23][1.45][1.67][1.8][6.23][7.51][6.54][8.23][7.41] [201][1.13][1.52][1.64][1.92][6.05][6.97][6.88][7.96][7.64] [202][1.03][1.46][1.71][2.01][6.51][6.45][6.91][7.82][7.38]
setpattern
Format:setpattern\n[N]field1[WS]field2[WS]field3[WS]field4[WS]field5[WS]field6\n
Response:[patternID]
Patterns are used to select a subset of reports out of all reports in a
given path with the active job name.
First the command is sent, followed by a newline ('\n'). Then an integer N
(four byte, little endian) indicating the number of subpatterns. Each
subpattern is made up of six fields, each field separated by white space ( the space
character ' ' or tab '\t') with a newline ('\n') to separate the subpatteerns. See the examples for more clarification on formatting.
After the server receives a pattern, it will reply with an ID number so
that the pattern can be accessed again more easily.
About fields: When looking for reports, there are six fields that the server looks
at to determine if a given report should be included when using getdata.
These fields are:
Examples
setpattern\n[1]Report1 * * * * *\n
This pattern looks for a report named 'Report1'. Since reports
typically use a unique name, this pattern will probably return
one report despite the fact that all other fields are set to wild.
setpattern\n[1]* * AI_2 * * soma_e1\n
This pattern looks for any Report so long as it has a column named
'AI_2' and a compartment named 'soma_e1'
setpattern\n[2]* VOLTAGE AI_1 Layer_A Excitatory *\n
* VOLTAGE AI_2 * * *\n
Here, two subpatterns are sent. If a report matches either, it will
be included. Even though there are two subpatterns, only one patternID
value is sent.
setpattern\n[3]* VOLTAGE * Layer_A Excitatory soma\n
* VOLTAGE * Layer_A Excitatory basal\n
* VOLTAGE * Layer_A Excitatory apical\n
Here, three subpatterns are sent. Again, a report only has to
match one of the patterns for it to be included, and only one
patternID will be sent back to the client.
launch
The server will handle submitting a simulation to the cluster
Queue. This will allow nodes to be used more efficiently.
Format: launch\n[Flags][N][App#]inputFileName\n[file contents (optional)]outputFileName\nerrorFileName\n
Response: [1 byte code]