Browse
(440) 299-7778
Menu
(440) 299-7778
One-year parts and labor warranty30-day money-back guaranteeEnglishEspañolContact

The text of a manual · part 7 of 16

4985 Network Controller Programmer's Guide: Section 4: File Structures, pages 43 to 52

Pages 43 to 52 of 130, from 4985 Network Controller Programmer's Guide

The original document is the PDF (762 KB). This is its text as extracted, unedited; tables and drawings read best in the PDF, and each page heading opens it at that page.

Filed in the catalog under the Norand Route Commander 4000 Series APU

Page 43

Section 4 File Structures "

"

"

"

"

"

"

"

"

"

"

"

"

"

"

"

"

"

"

"

"

"

"

"

"

"

"

"

Introduction Many of the configuration switches can be reconfigured by the host computer. These are with: "

"

Initialization record parameters. The host sends this record at the beginning of a communication session. Activation record parameters. The host sends this record to activate the LAN port.

Records from controller-to-host use a two-byte channel ID (when enabled) consisting of a one-byte device channel field. HHC channels belong to the active device on the corresponding device channel. The 4985 asynchronous interface works with device channel “0”. The Local Area Network (LAN) port works with HHC channels “1”, “4”, and “7”. Record formats with the two-byte channel option are the same as onebyte channels. The difference is that the device channel ID prepends to each record. " NOTE:

Appendix D contains a quick reference to all of the following records.

Host-to-Controller Records Special Commands The host may send two special commands to the controller. Records from the host, except for the special commands, must all be of the same fixed-length, and may include end-of-line pad bytes. 4985 Network Controller Programmer’s Guide

4-1

Page 44

SECTION 4

"

File Structures

Type ? - Host Ready Command The host sends this record to the controller when ready to receive data. Table 4-1 Type ? - Host Ready Command

Position Bytes Description 1 EXAMPLE:

1

Question mark “?”

(CR = end of record marker) ?<CR>

Type * - Reinitialization Command The host sends this record to reset the controller when the controller is expecting a ready command. Table 4-2 Type * - Reinitialization Command

Position Bytes Description 1 EXAMPLE:

1

Asterisk “*”

(CR = end of record marker) *<CR>

Each record sent from your host must have a record type field. There may be eight record types sent from your host to the controller. The controller may translate between ASCII and EBCDIC for EBCDIC hosts. You can enable the translation of the records using the host-tocontroller initialization record. The eight record types are: "

“0” = Download Data

"

“1” = End-of-Data

"

“2” = Initialize

"

“3” = Activate Auto-answer

"

“4” = Activate Auto-dial

"

“5” = Deactivate for one minute

"

“6” = Host Directive

"

“7” = Reboot Controller Directive

Record Layouts This explains the function of each record type. Actual record layouts appear after the record description. 4-2

4985 Network Controller Programmer’s Guide

Page 45

SECTION 4

"

File Structures

Each record from an ASYNC host must begin with a one-byte beginning-of-record delimiter (a slash “/”) and a one-byte command code (ASCII) “0” through “7”. The host sends records in response to requests from the controller, except for the initialization record. The initialization record is sent to activate a controller that is inactive yet ready for activation. The host may also send two special commands to the controller, a question mark “?” and an asterisk “*”. A question mark indicates the host is ready to receive data and serves as an acknowledgement record. The asterisk resets the controller, although the controller will reset itself if the host issues an invalid record or fails to respond within the host timeout period. The record includes an end-of-record delimiter, by default <CR>, which is configured in the initialization record. Records from the host (not including the special commands) must all be of the same fixed-length, and may include end-of-line pad bytes. The controller uses the initialization record sent from the host to determine these lengths: "

Record size

"

End-of-line pad

Type 0 - Download Data Record The host sends a download data record in response to a download request. Information obtained from upload data links download data with a specific HHC on a logical channel. Table 4-3 Type 0 - Download Data Record

Position Bytes Description 1

1

Beginning delimiter: “/”

2

1

Command code: “0”

3

256

Download data

259

2

Optional CRC bytes (if enabled)

261+

Optional pad (up to 3 bytes) 4985 Network Controller Programmer’s Guide

4-3

Page 46

SECTION 4

EXAMPLE:

"

File Structures

(CR = end of record marker) /0xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx<CRC><CRC>ppp<CR> Beginning delimiter = “/” Command code = Download Data “0” Download data = “xxx” Optional CRC bytes = 2 Optional pad = “ppp” Optional end-of-record delimiter = <CR>

Type 1 - End-of-Data Record The host sends an end-of-data record in response to a download request from the controller. This indicates that no more download data exists for this session or file. The host also sends end-of-data records in response to a file request to terminate file processing. Table 4-4 Type 1 - End-of-Data Record

Position Bytes Description 1

1

Beginning delimiter: “/”

2

1

Command code: “1”

3

256

Download data with required pad bytes if less than 256 bytes of data.

259+

4-4

Optional pad (up to 5 bytes)

4985 Network Controller Programmer’s Guide

Page 47

SECTION 4

EXAMPLE:

"

File Structures

(CR = end of record marker) /1xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxppppp<CR> Beginning delimiter = “/” Command code = End-of-Data “1” Download data = “xxx” Optional pad = “ppppp” Optional end-of-record delimiter = <CR>

Type 2 - Initialization Record At the beginning of a host-to-controller session, an initialization record sets the system mode parameters and default port activation parameters. The initialization record parameters are defined on page 4-20. Table 4-5 Type 2 - Initialization Record

Position Bytes Description 1

1

Beginning delimiter: “/”

2

1

Command code: “2”

3

256

Initialization parameters list. The parameter list terminates with a slash “/.”

259+ EXAMPLE:

Optional pad (up to 5 bytes)

(CR = end of record marker) /2xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx/ppppp<CR> Beginning delimiter = “/” Command code = Initialization Record “2” Parameter initialization list = “xxx” Optional pad = “ppppp” Optional end-of-record delimiter = <CR> 4985 Network Controller Programmer’s Guide

4-5

Page 48

SECTION 4

"

File Structures

Type 3 - Activate (Auto-Answer) Record The host sends an activate record in response to an activate request record. Nonswitched (direct) connections are auto-answer connections. See page 4-26 to build your activation parameters list. Table 4-6 Type 3 - Activate (Auto-Answer) Record

Position Bytes Description 1

1

Beginning delimiter: “/”

2

1

Command code: “3”

3

1

ASCII blank “ ”

4

255

Optional activation parameters list. This list terminates with a slash “/” and the remaining bytes filled with blanks.

259+

EXAMPLE:

Optional pad up to 5 bytes

(CR = end of record marker) /3 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx/ppppp<CR> Beginning delimiter = “/” Command code = Activate Record “3” ASCII blank = “ ” Activation parameters list = “xxxx” Optional pad = “ppppp” Optional end-of-record delimiter = <CR>

Type 4 - Activate (Auto-Dial) Record The host responds to an activate request record with an activate record. Nonswitched (direct) connections are auto-answer connections. The controller processes auto-dial activate records for connections that are dial-out. The activation parameters lists are derived on page 4-26. 4-6

4985 Network Controller Programmer’s Guide

Page 49

SECTION 4

" NOTE:

"

File Structures

This is used on the 4980 Controller and is presented here for compatibility. The 4985 uses autoanswer records for NPCP. Table 4-7 Type 4 - Activate (Auto-Dial) Record

Position Bytes Description 1

1

Beginning delimiter: “/”

2

1

Command code: “4”

3

1

ASCII blank “ ”

4

255

Optional activation parameters list. This list terminates with a slash “/”. When used, this field should be filled with blanks.

259+ EXAMPLE:

Optional pad up to 5 bytes

(CR = end of record marker) /4 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx/ppppp<CR> Beginning delimiter = “/” Command code = Auto Dial Record “4” ASCII blank = “ ” Activation parameters list = “xxxx” Optional pad = “ppppp” Optional end-of-record delimiter = <CR>

4985 Network Controller Programmer’s Guide

4-7

Page 50

SECTION 4

"

File Structures

Type 5 - Deactivate for One Minute Record Use deactivate records to postpone activating the port for one minute. The controller will issue another activation request after one minute. Table 4-8 Type 5 - Deactivate for One Minute Record

Position Bytes Description 1

1

Beginning delimiter: “/”

2

1

Command code: “5”

3

256

Required pad bytes

259+ EXAMPLE:

Optional pad up to 5 bytes

(CR = end of record marker) /5xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxppppp<CR> Beginning delimiter = “/” Command code = 5 Filler = “xxxx” Optional pad = “ppppp” Optional end-of-record = <CR>

Type 6 - Host Directive Record The host sends a directive in response to a special download data request from the controller. Five subtypes of host directives are available. Types “1”, “2”, and “3” manage user data files. Type “4” sends download data to an HHC and type “6” cancels file processing.

4-8

4985 Network Controller Programmer’s Guide

Page 51

SECTION 4

"

File Structures

Table 4-9 Type 6 - Host Directive Record

Position Bytes Description 1

1

Beginning delimiter: “/”

2

1

Command code: “6”

3

1

Directive type: “1” - “4” and “6”: “1” = File upload directive “2” = File create or load directive “3” = File delete directive “4” = File download directive “6” = File processing abort

4

256

Directive information. The information required for this field depends on the directive type used.

259+

Optional pad up to 5 bytes

Type 7 - Reboot Controller Directive This directive may be sent in response to any controller-to-host record and will force the controller to reboot. Table 4-10 Type 7 - Reboot Controller Directive

Position Bytes Description 1

1

Beginning delimiter: “/”

2

1

Command code: “7”

3

1

Reboot state “0” = Do not clear files from RAM disk “1” = Clear files from RAM disk

4

256

Filler bytes

Directive Types If file processing is enabled using the system mode parameter in the initialization record, the host will receive file requests from the controller at the beginning of a host-to-controller session and after the host 4985 Network Controller Programmer’s Guide

4-9

Page 52

SECTION 4

"

File Structures acknowledges a controller Directive Status Record. These requests can have one of several host directives. These four file directives for file maintenance are:

" NOTE:

"

Upload

"

Create or load

"

Delete

"

Processing abort

The controller sends a directive status to the host immediately after completing a host directive.

File Upload Directive “1” The host sends an upload directive, in response to a file processing special request, to upload a file stored on the 4985 controller (usually the directory file). Table 4-11 File Upload Directive “1”

Position Bytes Description

EXAMPLE:

1

1

Beginning delimiter: “/”

2

1

Command code: “5”

3

1

Directive Type: “1”

4

8

DOS compatible filename, left-justified

12

3

DOS compatible filename extension, left-justified

15

245

Filler bytes (ASCII space)

/51FILENAMEEXT. . .xxxxxppppp<CR>

File Create or Load Directive “2” The host sends this directive, in response to a file processing special request, to create a data file on the controller. After the controller receives a create directive, it sends the host data request records. The host then sends data records until all the data is sent. An end-of-data record from the host marks the end of the data for the file. All directory entries use the following format: 4-10

4985 Network Controller Programmer’s Guide