Intermec IP2L Basic Reader Interface Programmer's Reference Manual (BRI versio - Page 23

Programming the BRI Message Layer, BRI Message Types

Page 23 highlights

Chapter 2 - Designing Robust BRI Applications Programming the BRI Message Layer When programming the BRI Message Layer, you need to understand the message types and how they are handled. BRI Message Types The BRI protocol includes three message types: • BRI Command. This message type is a single BRI command sent to a reader. • BRI Command Response. This message type is the reader response to a BRI command. There are two types of BRI Command Response messages: • Command Error Response: An error response consists of two lines, one error line followed by one OK> response terminator. The error line may be formatted in three ways: ERR ERR CKERR Note: The BRI specification also defines field-level errors, such as WRERR. These errors do not indicate that the entire command has failed. They indicate that only part of the command failed. For a list of all errors, see "Understanding Error and Success Responses" on page 109. • Normal Command Response: Any command response that is not an error response is a Normal Command Response. It consists of zero or more BRI response lines followed by one OK> response terminator line. In general, the normal command response syntax is as follows: ResponseLine ResponseLine ... OK> As described in the previous note, the Normal Command Response also includes any field-level errors. • Asynchronous Event Messages. This message type is a single line message that is not a response to a command. Each asynchronous event begins with the EVT: prefix. An asynchronous event may occur between lines of another message. In general the asynchronous event syntax is as follows: EVT: Asynchronous event messages are single-line messages. They are not followed by their own OK> line. For more details about EVENT messages, see "Understanding Error and Success Responses" on page 109. Basic Reader Interface Programmer Reference Manual 11

  • 1
  • 2
  • 3
  • 4
  • 5
  • 6
  • 7
  • 8
  • 9
  • 10
  • 11
  • 12
  • 13
  • 14
  • 15
  • 16
  • 17
  • 18
  • 19
  • 20
  • 21
  • 22
  • 23
  • 24
  • 25
  • 26
  • 27
  • 28
  • 29
  • 30
  • 31
  • 32
  • 33
  • 34
  • 35
  • 36
  • 37
  • 38
  • 39
  • 40
  • 41
  • 42
  • 43
  • 44
  • 45
  • 46
  • 47
  • 48
  • 49
  • 50
  • 51
  • 52
  • 53
  • 54
  • 55
  • 56
  • 57
  • 58
  • 59
  • 60
  • 61
  • 62
  • 63
  • 64
  • 65
  • 66
  • 67
  • 68
  • 69
  • 70
  • 71
  • 72
  • 73
  • 74
  • 75
  • 76
  • 77
  • 78
  • 79
  • 80
  • 81
  • 82
  • 83
  • 84
  • 85
  • 86
  • 87
  • 88
  • 89
  • 90
  • 91
  • 92
  • 93
  • 94
  • 95
  • 96
  • 97
  • 98
  • 99
  • 100
  • 101
  • 102
  • 103
  • 104
  • 105
  • 106
  • 107
  • 108
  • 109
  • 110
  • 111
  • 112
  • 113
  • 114
  • 115
  • 116
  • 117
  • 118
  • 119
  • 120
  • 121
  • 122
  • 123
  • 124
  • 125
  • 126
  • 127
  • 128
  • 129
  • 130
  • 131
  • 132
  • 133
  • 134
  • 135
  • 136
  • 137
  • 138
  • 139
  • 140
  • 141
  • 142
  • 143
  • 144
  • 145
  • 146

Chapter 2 — Designing Robust BRI Applications
Basic Reader Interface Programmer Reference Manual
11
Programming the BRI Message Layer
When programming the BRI Message Layer, you need to understand the message
types and how they are handled.
BRI Message Types
The BRI protocol includes three message types:
BRI Command
. This message type is a single BRI command sent to a reader.
BRI Command Response
. This message type is the reader response to a BRI
command. There are two types of BRI Command Response messages:
Command Error Response
: An error response consists of two lines, one
error line followed by one OK> response terminator. The error line may be
formatted in three ways:
ERR
ERR <keyword>
CKERR
For a list of all errors, see
“Understanding Error and Success Responses”
on page 109
.
Normal Command Response
: Any command response that is not an error
response is a Normal Command Response. It consists of zero or more BRI
response lines followed by one OK> response terminator line. In general, the
normal command response syntax is as follows:
ResponseLine
<CRLF>
ResponseLine
<CRLF>
...
OK><CRLF>
As described in the previous note, the Normal Command Response also
includes any field-level errors.
Asynchronous Event Messages.
This message type is a single line message that
is not a response to a command. Each asynchronous event begins with the EVT:
prefix. An asynchronous event may occur between lines of another message. In
general the asynchronous event syntax is as follows:
EVT:<Type> <EventDetails><CRLF>
Asynchronous event messages are single-line messages. They are not followed by
their own OK> line. For more details about EVENT messages, see
“Understanding Error and Success Responses” on page 109
.
Note
: The BRI specification also defines field-level errors, such as WRERR.
These errors do not indicate that the entire command has failed. They
indicate that only part of the command failed.