Jump to content United States-English
HP.com Home Products and Services Support and Drivers Solutions How to Buy
» Contact HP
More options
HP.com home
ACC Programmer's Reference Guide > Chapter 3 ZCOM Tables and Data Structures

Message Header

» 

Technical documentation

Complete book in PDF
» Feedback
Content starts here

 » Table of Contents

 » Index

In the buffer header (i.e., BFDATA pointer), there is a message header that describes the message type, the source and destination addresses, and the type of response expected from the message. The message header is the first 30 bytes of the buffer data area. When the data buffer is allocated, the initial data offset is chosen so that the message data starts on a specific boundary depending on its purpose (e.g. for a inbound DMA buffer, the data area must be on a 64-byte boundary). For inbound DMA buffer, enough space is left at the end of the buffer so that the final 64-byte boundary is within the buffer area but beyond the end of the data area. These boundary limits ensure that the DMA reads and writes will not cause side effects by corrupting other buffers. Besides, the size of the buffer is rounded up to a multiple of 8-bytes, to satisfy the 64-bit alignment which is needed for the 64-bit kernel.

Message Header (zmhd_type)

Table 3-33 “Message Header (zmhd_type)” shows the information in the message header (zmhd_type).

Table 3-33 Message Header (zmhd_type)

Field Name

Field Description

Field Type

Size (Bytes)

MID

Message ID header

struct

24

MRQ

Message request block

struct

6

 

Message ID Header (zmid_type)

The Message ID Header contains information used for delivery of the message. See Table 3-34 “Message ID Header (zmid_type)”.

Table 3-34 Message ID Header (zmid_type)

Field Name

Field Description

Field Type

Size (Bytes)

MSTYPE

Message type

uns.char

1

MSRESP

Message response code

uns.char

1

MZDEST

Destination ZCOM address

struct

6

MZSRCE

Source ZCOM address

struct

6

MTAGW1

Message tag word 1

uns.short

2

MTAGW2

Message tag word 2

uns.short

6

MZAUXL

Auxiliary ZCOM address

struct

6

 

MSTYPE - Message type

This field contains the message type. If bit 3 of the message type is set (ZCOM_MSTYPE_REMOTE (0x08)), then the message is remote. Notice that the remote message type maps onto the message type for a local terminal.

Table 3-35 Message Type MSTYPE

ZCOM_MSTYPE_REMOTE

0X08

Mask for remote message bit

0

Undefined, reason in IERR

ZCOM_MSTYPE_MSLT

1

Message from local terminal

ZCOM_MSTYPE_LPLP

2

Msg from local program to program

ZCOM_MSTYPE_TDLZ

3

Timeout from local ZLU

ZCOM_MSTYPE_LPLT

4

Msg from local program to a terminal

ZCOM_MSTYPE_LSEM

5

Local system event message

ZCOM_MSTYPE_RSLT

6

Response message from local terminal

ZCOM_MSTYPE_RSLP

7

Response message from local program

8

Not defined

ZCOM_MSTYPE_MSRT

9

Message from remote terminal

ZCOM_MSTYPE_RPLP

10

Message from remote program to a program

ZCOM_MSTYPE_TORZ

11

Timeout from remote ZLU

ZCOM_MSTYPE_RPLT

12

Message from remote program to a terminal

ZCOM_MSTYPE_RSEM

13

Remote system event message

ZCOM_MSTYPE_RSRT

14

Response msg from remote terminal

ZCOM_MSTYPE_RSRP

15

Response msg from remote program

 

MSRESP- Response code

The response code is used in two ways. Firstly, for message types 2, 4, 10, and 12 (send message), it indicates the type of response expected when this message is sent or delivered. Secondly, for other message types, it is the status of the completed message.

Response code for message type 2 and 10 are shown in Table 3-36 “Response code for message type 2 and 10”.

Table 3-36 Response code for message type 2 and 10

7

6

5

4

3

2

1

0

LPR

XPS

PGW

BFR

DEF

ERR

 

ERR

Response if error exists

DEF

Definite response (error or no error)

BFR

Return status and message buffer as response (for data message only)

PGW

Program is waiting for response

XPS

Express transmit message

LPR

Low priority transmit message

Response code for all other message types are shown in Table 3-37 “Response code for all other message types”.

Table 3-37 Response code for all other message types

7

6

5

4

3

2

1

0

 

ZCOM error code or 0

 

MZDEST - Destination ZCOM address

This is the ZCOM address to which the message is to be sent.

MZSRCE - Source ZCOM address

This is the ZCOM address of the sender of the message. This field is returned in the message header with the zread routine. When a message is received from a terminal, the sender zaddr.zlu is the ZLU number of the terminal.

MTAGW1, MTAGW2 - Message tag words

These are application defined tag words that are passed unaltered through the ZCOM subsystem with the message data. They are supplied in the zsend and zcntl calls and returned in the zread call. When a receive message is returned from a terminal, the tag words are set to zero.

MZAUXL - Auxiliary ZCOM address

When using the multiplexed mode of operation through the logical terminal table, this field stores the original source ZLU.

Message Request Header (zmrq_type)

The six-byte message request block may or may not be present, depending on the message type and whether it is destined for a terminal. For request types 1, 4, and 6, to a terminal, the request block will be present; for request types 2 and 7 the request block will contain meaningless data. More information on the contents of this block can be found in the firmware reference manual. The Message Request Header is always present. For message types 2, 3, 7, 10, 11, and 15, it contains meaningless data. For types 4, 6, 12, and 14, it contains valid data.

Table 3-38 Message Request Header (zmrq_type)

Field Name

Field Description

Field Type

Size (Bytes)

MRQCODE

Request code

uns.char

1

MRQTERM

Terminal number

uns.char

1

MRQSTAT

Request status

uns.char

1

MRQTAG

Tag parameter

uns.char

1

MRQLEN

Data length

uns.short

2

 

MRQCODE - Terminal request code

This field contains the request code sent to or received from the Mux firmware on the interface card. The message request code values are shown in Table 3-39 “MRQCODE Terminal request codes”.

Table 3-39 MRQCODE Terminal request codes

Request

Value

Description

ZCOM_MRQCODE_UND

0

Undefined type

ZCOM_MRQCODE_READ

1

Terminal input

ZCOM_MRQCODE_WRITE

2

Terminal write

ZCOM_MRQCODE_CNTWR

3

Terminal write

ZCOM_MRQCODE_STDT

4

(Internal Use) status transfer

ZCOM_MRQCODE_STATUS

5

Unsolicited status change

ZCOM_MRQCODE_TERM

6

Set terminal parameters

ZCOM_MRQCODE_ENB

7

Terminal enable

ZCOM_MRQCODE_DSB

8

Terminal disable

ZCOM_MRQCODE_ACT

9

Message from remote terminal

ZCOM_MRQCODE_DEA

10

Terminal deactivate

ZCOM_MRQCODE_DEL

11

Terminal delete

ZCOM_MRQCODE_PORT

14

Port configuration

ZCOM_MRQCODE_MULTI

15

Multi-completion RXDT request code

 

MRQTERM - Terminal number

This is the relative terminal number within the Mux card. It comes from the PTTERM field in PTT.

MRQSTAT - Request status

This is the status code returned from the protocol module and may be protocol type dependent.

MRQTAG - Tag parameter

This tag parameter is used to carry protocol specific information from the application program to the protocol module on the Mux card and return information from the firmware to the driver or application program.

MRQLEN - Data length

This is the total length of the data to be sent, or the length of data received, in this message.

System Event Message (zevent_type)

A System Event Message (SEM) is a special message generated by the ZCOM subsystem to represent an alarm condition or type of event that has occurred within the ZCOM subsystem. Applications may request that ZCOM deliver these events to a program ZLU by issuing a zevent_rcvr call. A SEM is returned to the application as a normal data message with a message type of ZCOM_MSTYPE_LSEM (5) or ZCOM_MSTYPE_RSEM (13). See the zevent_rcvr routine for addition details.

The structure used to hold the system event messages is composed of a fixed header structure and a variable part that is specific to the type of event. See Table 3-40 “System Event Message (zevent_type) Structure”.

Table 3-40 System Event Message (zevent_type) Structure

Field Name

Field Description

Field Type

Size (Bytes)

SETYPE

System Event Type

uns.char

1

SEFLAG

Event flags (currently not used)

uns.char

1

SENODE

Node where event was generated

uns.short

2

SETIME

Time when the event occurred

uns.int

4

SEDATA

Event specific data

union struct

8

 

SETYPE - System Event Type

This field contains the type of event represented by this message. Currently there are three defined types of events; a node status event (ZCOM_SETYPE_NODE), a card status change event (ZCOM_SETYPE_CARD), and a dynamic reconfiguration event (ZCOM_SETYPE_RECONFIG). The format of the variable part of the message is dependent on the event type.

SEFLAG - Event flags (currently not used)

This field is currently not used. It is intended to contain global information on the event (e.g. event priority, etc).

SENODE - Node where event was generated

This field will contain the ZCOM node number of the system that generated the event message. If the message type is ZCOM_MSTYPE_LSEM, this will contain the local ZCOM node number.

SETIME - Time when the event occurred

This field contains the Coordinated Universal Time (UTC) of when the event occurred. It is taken from the originating system at the time of the event.

SEDATA - Event specific data

Immediately following the header is a union that contains information specific to the type of event that occurred. There are currently two different event types that can be generated. The data structure for each is documented below.

ZCOM_SETYPE_NODE - Node status change event

The node status change event is generated whenever a node changes state or the state of the ZNODE daemon changes. The event data is referenced using sedata.node.<field name> and has the following fields:

Table 3-41 Node Status Change Event Fields (ZCOM_SETYPE_NODE)

Field Name

Field Description

Field Type

Size (Bytes)

NODE_NUM

Node Number

uns.short

2

NSTAT

Node status change indicator

char

1

SPARE

Reserved, not used

char

1

HSTAT

Host link status change indicator

char [4]

4

 

NODE_NUM - Node number

This is the number of the node that has changed state. Note that this node is different from the SENODE field. For example, in ZCOM node 10, two remote nodes 40 and 50 are defined. In node 10, if the system detects that remote node 40 has gone down, the SEM generated will have SENODE=10, SEDATA.NODE.NODE_NUM=40.

NSTAT - Node status change indicator

This field contains a numeric value indicating the status change. If the value is zero, then there has been no change to the node's status. If the value is +1, the node changed state from DOWN to UP. If the value is -1, the node changed state from UP to DOWN.

HSTAT - Host link status change indicator

This field is an array of four values, one for each potential link associated with NODE_NUM. Each entry indicates the status change of one link. If the value is zero, then there has been no change to the link's status. If the value is +1, the link changed state from DOWN to UP. If the value is -1, the link changed state from UP to DOWN.

ZCOM_SETYPE_RECONFIG - Dynamic Reconfiguration Event

The dynamic reconfiguration event is generated by using the zconfig routine, typically after programmatically reconfiguring the ZCOM subsystem during runtime operations. The event data is referenced using sedata.recfg.<field name> and has the fields shown in Table 3-42 “Dynamic Reconfiguration Event (ZCOM_SETYPE_RECONFIG)”.

Table 3-42 Dynamic Reconfiguration Event (ZCOM_SETYPE_RECONFIG)

Field Name

Field Description

Field Type

Size (Bytes)

CFG_CLASS

Type of reconfiguration performed

uns.int

4

CFG_INFO1

Caller supplied data

uns.int

4

 

CFG_CLASS - Type of reconfiguration performed

The field should contain the type of reconfiguration performed. Values from 0 to 999 are reserved for use by the ZCOM subsystem. There is currently one type defined, ZcCLASS_X25 (1), used to indicate that an X.25 link has been reconfigured.

CFG_INFO1 - Caller supplied data

The application or driver calling zconfig to generate the dynamic reconfiguration SEM should supply a class specific piece of data. In the case where the CFG_CLASS is set to ZcCLASS_X25, this field will contain the X.25 level 2 ZLU that was reconfigured.

ZCOM_SETYPE_CARD - Change in Card Status Event

This event is generated whenever there is a change in the state of an ACC interface card. This includes notification of firmware failures (causes an automatic restart of the card), user initiated restarts, hardware failures, and for those systems that support it, the on-line addition, removal, or replacement of an ACC card. The event data is referenced using sedata.card.<field name> and has the following fields:

Table 3-43 Change in Card Status Event (ZCOM_SETYPE_CARD)

Field Name

Field Description

Field Type

Size (Bytes)

reason

Reason for the change in card state

uns.char

1

iftno

ttgen mux# (if any)

uns.int

1

bus_addr_len

Number of entries in bus_addr

uns.int

1

bus_addr[7]

Bus address path to card

uns.short

7 *2

card_addr

Card's slot address

uns.short

2

 

Reason - The reason for the change in card state may be one of the following:

ZcSE_CARD_ADDED - An ACC card has been added to the system at the H/W path indicated by the bus_addr[] and card_addr fields

ZcSE_CARD_SUSPENDED - The operator has suspended card operation in preparation for on-line replacement of the card. The iftno field indicates which ACC card was suspended.

ZcSE_CARD_REMOVED - The ACC card indicated by the iftno field has been removed from the system and is no longer usable.

ZcSE_CARD_REPLACED - The ACC card indicated by the iftno field has been replaced (on-line) and can now be used.

ZcSE_CARD_STOPPED - The ACC card indicated by the iftno field has been halt by user request and must not be used.

ZcSE_CARD_FAILED - The ACC card indicated by the iftno field has been failed and is no longer usable.

ZcSE_CARD_USER_RESTART - The ACC card indicated by the iftno field is being restarted by user request and must not be used until a ZcSE_CARD_RESTRT_CMPLT event is received.

ZcSE_CARD_FAIL_RESTART - the ACC card indicated by the iftno field is being restarted due to a firmware failure and must not be used until a ZcSE_CARD_RESTRT_CMPLT event is received.

ZcSE_CARD_RESTRT_CMPLT - The ACC card indicated by the iftno field has been redownloaded and restarted. It can now be used by applications.

Iftno - This is the ZCOM MUX number of the card that has changed state.

Bus_addr_len - Number of bus addresses in the bus_addr[] field. This field is only valid when the event has a reason code of ZcSE_CARD_ADDED.

Bus_addr[] - Hardware path of the ACC card being added. This field is only valid when the event has a reason code of ZcSE_CARD_ADDED.

Card_addr - Contains the address of the slot that the card was inserted into. This field is only valid when the event has a reason code of ZcSE_CARD_ADDED.

Printable version
Privacy statement Using this site means you accept its terms Feedback to webmaster
© 2000 Hewlett-Packard Development Company, L.P.