03.09.2013 Views

FIPA Agent Message Transport Envelope Representation in Bit ...

FIPA Agent Message Transport Envelope Representation in Bit ...

FIPA Agent Message Transport Envelope Representation in Bit ...

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

1<br />

2<br />

3<br />

4<br />

5<br />

6<br />

7<br />

8<br />

9<br />

10<br />

11<br />

12<br />

13<br />

14<br />

15<br />

16<br />

17<br />

18<br />

19<br />

20<br />

FOUNDATION FOR INTELLIGENT PHYSICAL AGENTS<br />

<strong>FIPA</strong> <strong>Agent</strong> <strong>Message</strong> <strong>Transport</strong> <strong>Envelope</strong><br />

<strong>Representation</strong> <strong>in</strong> <strong>Bit</strong>-Efficient Encod<strong>in</strong>g<br />

Specification<br />

Document title <strong>FIPA</strong> AMT <strong>Envelope</strong> <strong>Representation</strong> <strong>in</strong> <strong>Bit</strong>-Efficient Encod<strong>in</strong>g Specification<br />

Document number SC00088D Document source <strong>FIPA</strong> TC <strong>Agent</strong> Management<br />

Document status Standard Date of this status 2002/12/03<br />

Supersedes None<br />

Contact fab@fipa.org<br />

Change history See Informative Annex B — ChangeLog<br />

© 1996-2002 Foundation for Intelligent Physical <strong>Agent</strong>s<br />

http://www.fipa.org/<br />

Geneva, Switzerland<br />

Notice<br />

Use of the technologies described <strong>in</strong> this specification may <strong>in</strong>fr<strong>in</strong>ge patents, copyrights or other <strong>in</strong>tellectual property<br />

rights of <strong>FIPA</strong> Members and non-members. Noth<strong>in</strong>g <strong>in</strong> this specification should be construed as grant<strong>in</strong>g permission to<br />

use any of the technologies described. Anyone plann<strong>in</strong>g to make use of technology covered by the <strong>in</strong>tellectual property<br />

rights of others should first obta<strong>in</strong> permission from the holder(s) of the rights. <strong>FIPA</strong> strongly encourages anyone<br />

implement<strong>in</strong>g any part of this specification to determ<strong>in</strong>e first whether part(s) sought to be implemented are covered by<br />

the <strong>in</strong>tellectual property of others, and, if so, to obta<strong>in</strong> appropriate licenses or other permission from the holder(s) of<br />

such <strong>in</strong>tellectual property prior to implementation. This specification is subject to change without notice. Neither <strong>FIPA</strong><br />

nor any of its Members accept any responsibility whatsoever for damages or liability, direct or consequential, which<br />

may result from the use of this specification.


21<br />

22<br />

23<br />

24<br />

25<br />

26<br />

27<br />

28<br />

29<br />

30<br />

31<br />

32<br />

33<br />

34<br />

35<br />

36<br />

37<br />

38<br />

Foreword<br />

The Foundation for Intelligent Physical <strong>Agent</strong>s (<strong>FIPA</strong>) is an <strong>in</strong>ternational organization that is dedicated to promot<strong>in</strong>g the<br />

<strong>in</strong>dustry of <strong>in</strong>telligent agents by openly develop<strong>in</strong>g specifications support<strong>in</strong>g <strong>in</strong>teroperability among agents and agentbased<br />

applications. This occurs through open collaboration among its member organizations, which are companies and<br />

universities that are active <strong>in</strong> the field of agents. <strong>FIPA</strong> makes the results of its activities available to all <strong>in</strong>terested parties<br />

and <strong>in</strong>tends to contribute its results to the appropriate formal standards bodies where appropriate.<br />

The members of <strong>FIPA</strong> are <strong>in</strong>dividually and collectively committed to open competition <strong>in</strong> the development of agentbased<br />

applications, services and equipment. Membership <strong>in</strong> <strong>FIPA</strong> is open to any corporation and <strong>in</strong>dividual firm,<br />

partnership, governmental body or <strong>in</strong>ternational organization without restriction. In particular, members are not bound to<br />

implement or use specific agent-based standards, recommendations and <strong>FIPA</strong> specifications by virtue of their<br />

participation <strong>in</strong> <strong>FIPA</strong>.<br />

The <strong>FIPA</strong> specifications are developed through direct <strong>in</strong>volvement of the <strong>FIPA</strong> membership. The status of a<br />

specification can be either Prelim<strong>in</strong>ary, Experimental, Standard, Deprecated or Obsolete. More detail about the process<br />

of specification may be found <strong>in</strong> the <strong>FIPA</strong> Document Policy [f-out-00000] and the <strong>FIPA</strong> Specifications Policy [f-out-<br />

00003]. A complete overview of the <strong>FIPA</strong> specifications and their current status may be found on the <strong>FIPA</strong> Web site.<br />

<strong>FIPA</strong> is a non-profit association registered <strong>in</strong> Geneva, Switzerland. As of June 2002, the 56 members of <strong>FIPA</strong><br />

represented many countries worldwide. Further <strong>in</strong>formation about <strong>FIPA</strong> as an organization, membership <strong>in</strong>formation,<br />

<strong>FIPA</strong> specifications and upcom<strong>in</strong>g meet<strong>in</strong>gs may be found on the <strong>FIPA</strong> Web site at http://www.fipa.org/.<br />

ii


39<br />

40<br />

41<br />

42<br />

43<br />

44<br />

45<br />

46<br />

47<br />

48<br />

49<br />

50<br />

Contents<br />

1 Scope...........................................................................................................................................................................1<br />

2 <strong>Bit</strong>-Efficient <strong>Envelope</strong> <strong>Representation</strong> .........................................................................................................................2<br />

2.1 Component Name ................................................................................................................................................2<br />

2.2 ACC Process<strong>in</strong>g of <strong>Bit</strong>-Efficient <strong>Envelope</strong>............................................................................................................2<br />

2.3 Concrete <strong>Message</strong> <strong>Envelope</strong> Syntax ...................................................................................................................3<br />

2.4 Notes on the Grammar Rules...............................................................................................................................5<br />

3 References ..................................................................................................................................................................7<br />

4 Informative Annex A — Examples...............................................................................................................................8<br />

5 Informative Annex B — ChangeLog ..........................................................................................................................12<br />

5.1 2002/11/01 - version C by TC X2S.....................................................................................................................12<br />

5.2 2002/12/03 - version D by <strong>FIPA</strong> Architecture Board ..........................................................................................12<br />

iii


51<br />

52<br />

53<br />

54<br />

55<br />

56<br />

57<br />

58<br />

© 1996-2002 Foundation for Intelligent Physical <strong>Agent</strong>s <strong>FIPA</strong> AMT <strong>Envelope</strong> <strong>Representation</strong> <strong>in</strong> <strong>Bit</strong>-Efficient Encod<strong>in</strong>g<br />

1 Scope<br />

This document deals with message transportation between <strong>in</strong>ter-operat<strong>in</strong>g agents and also forms part of the <strong>FIPA</strong><br />

<strong>Agent</strong> Management Specification [<strong>FIPA</strong>00023]. It conta<strong>in</strong>s specifications for:<br />

• Syntactic representation of a message envelope <strong>in</strong> bit-efficient form.<br />

Informative examples of the bit-efficient envelope syntax are given <strong>in</strong> Section 4.<br />

1


59<br />

60<br />

61<br />

62<br />

63<br />

64<br />

65<br />

66<br />

67<br />

68<br />

69<br />

70<br />

71<br />

72<br />

73<br />

74<br />

75<br />

76<br />

77<br />

78<br />

79<br />

80<br />

81<br />

82<br />

83<br />

84<br />

85<br />

86<br />

87<br />

88<br />

89<br />

90<br />

91<br />

92<br />

93<br />

© 1996-2002 Foundation for Intelligent Physical <strong>Agent</strong>s <strong>FIPA</strong> AMT <strong>Envelope</strong> <strong>Representation</strong> <strong>in</strong> <strong>Bit</strong>-Efficient Encod<strong>in</strong>g<br />

2 <strong>Bit</strong>-Efficient <strong>Envelope</strong> <strong>Representation</strong><br />

This section gives the concrete syntax for the message envelope specification that must be used to transport messages<br />

over a <strong>Message</strong> <strong>Transport</strong> Protocol (MTP - see [<strong>FIPA</strong>00067]). This concrete syntax is designed to complement<br />

[<strong>FIPA</strong>00069].<br />

The message envelope transport syntax is expressed <strong>in</strong> standard EBNF format 1 (see Table 1).<br />

Grammar rule component Example<br />

Term<strong>in</strong>al tokens are enclosed <strong>in</strong> double quotes<br />

"("<br />

Non-term<strong>in</strong>als are written as capitalised identifiers<br />

Expression<br />

Square brackets denote an optional construct<br />

[ "," OptionalArg ]<br />

Vertical bars denote an alternative between choices<br />

Integer | Float<br />

Asterisk denotes zero or more repetitions of the preced<strong>in</strong>g expression Digit*<br />

Plus denotes one or more repetitions of the preced<strong>in</strong>g expression Alpha+<br />

Parentheses are used to group expansions<br />

( A | B )*<br />

Productions are written with the non-term<strong>in</strong>al name on the left-hand side,<br />

expansion on the right-hand side and term<strong>in</strong>ated by a full stop<br />

ANonTerm<strong>in</strong>al = "term<strong>in</strong>al".<br />

0x?? is a hexadecimal byte<br />

0x00<br />

2.1 Component Name<br />

The name assigned to this component is:<br />

fipa.mts.env.rep.bitefficient.std<br />

Table 1: EBNF Rules<br />

2.2 ACC Process<strong>in</strong>g of <strong>Bit</strong>-Efficient <strong>Envelope</strong><br />

Accord<strong>in</strong>g to [<strong>FIPA</strong>00067], a <strong>FIPA</strong> compliant ACC is not allowed to modify any element of the envelope that it receives.<br />

It is however allowed to update a value <strong>in</strong> any of the envelope’s parameters by add<strong>in</strong>g a new Ext<strong>Envelope</strong> element at<br />

the beg<strong>in</strong>n<strong>in</strong>g of the message<strong>Envelope</strong>s sequence. This new element is required to have only those parameter values<br />

that the ACC wishes to add or update plus a new ReceivedObject element 2<br />

.<br />

The follow<strong>in</strong>g pseudo code algorithm may be used to obta<strong>in</strong> the latest values for each of the envelope’s parameters.<br />

<strong>Envelope</strong>WithAllParams := new empty <strong>Envelope</strong><br />

while (not all envelopes processed) {<br />

temp<strong>Envelope</strong> = getNext<strong>Envelope</strong>;<br />

foreach parameter <strong>in</strong> an envelope {<br />

if ((this parameter has no value <strong>in</strong> <strong>Envelope</strong>WithAllParams)<br />

AND (this parameter has a value <strong>in</strong> temp<strong>Envelope</strong>))<br />

then copy the value of this parameter to <strong>Envelope</strong>WithAllParams<br />

}<br />

}<br />

<strong>Envelope</strong>WithAllParams now conta<strong>in</strong>s the latest values for all the parameters set <strong>in</strong> the envelope.<br />

White space is not allowed between tokens.<br />

The new ReceivedObject parameter s forced, syntactically, to be <strong>in</strong> all envelopes of the message<strong>Envelope</strong>s sequence except the first one.<br />

1<br />

2<br />

2


94<br />

95<br />

96<br />

97<br />

98<br />

99<br />

100<br />

101<br />

102<br />

103<br />

104<br />

105<br />

106<br />

107<br />

108<br />

109<br />

110<br />

111<br />

112<br />

113<br />

114<br />

115<br />

116<br />

117<br />

118<br />

119<br />

120<br />

121<br />

122<br />

123<br />

124<br />

125<br />

126<br />

127<br />

128<br />

129<br />

130<br />

131<br />

132<br />

133<br />

134<br />

135<br />

136<br />

137<br />

138<br />

139<br />

140<br />

141<br />

142<br />

143<br />

144<br />

145<br />

146<br />

147<br />

148<br />

149<br />

150<br />

151<br />

152<br />

153<br />

154<br />

155<br />

© 1996-2002 Foundation for Intelligent Physical <strong>Agent</strong>s <strong>FIPA</strong> AMT <strong>Envelope</strong> <strong>Representation</strong> <strong>in</strong> <strong>Bit</strong>-Efficient Encod<strong>in</strong>g<br />

2.3 Concrete <strong>Message</strong> <strong>Envelope</strong> Syntax<br />

<strong>Message</strong><strong>Envelope</strong> = (Ext<strong>Envelope</strong>)* Base<strong>Envelope</strong> Payload.<br />

Base<strong>Envelope</strong> = Base<strong>Envelope</strong>Header (Parameter)* EndOf<strong>Envelope</strong>.<br />

Ext<strong>Envelope</strong> = Ext<strong>Envelope</strong>Header (Parameter)* EndOf<strong>Envelope</strong>.<br />

Base<strong>Envelope</strong>Header = BaseMsgId EnvLen ACL<strong>Representation</strong> Date.<br />

Ext<strong>Envelope</strong>Header = ExtMsgId EnvLen ReceivedObject.<br />

EnvLen = Len16<br />

| Jumbo<strong>Envelope</strong>. /* See comment 1 (Section 2.4) */<br />

Jumbo<strong>Envelope</strong> = EmptyLen16 Len32.<br />

BaseMsgId = 0xFE.<br />

ExtMsgId = 0xFD.<br />

EndOf<strong>Envelope</strong> = EndOfCollection.<br />

Payload = /* See comment 2 (Section 2.4) */<br />

Parameter = Predef<strong>in</strong>edParameter<br />

| UserDef<strong>in</strong>edParameter. /* See comment 5 (Section 2.4) */<br />

Predef<strong>in</strong>edParameter = 0x02 <strong>Agent</strong>IdentifierSequence /* to */<br />

| 0x03 <strong>Agent</strong>Identifier /* from */<br />

| 0x04 ACL<strong>Representation</strong> /* acl-representation */<br />

| 0x05 Comments /* comments */<br />

| 0x06 PayloadLength /* payload-length */<br />

| 0x07 PayloadEncod<strong>in</strong>g /* payload-encod<strong>in</strong>g */<br />

| 0x09 IntendedReceiver /* <strong>in</strong>tended-receiver */<br />

| 0x0a ReceivedObject /* received */<br />

| 0x0b <strong>Transport</strong>Behaviour. /* transport-behaviour */<br />

ACL<strong>Representation</strong> = UserDef<strong>in</strong>edACL<strong>Representation</strong><br />

| 0x10 /* fipa.acl.rep.bitefficient.std [<strong>FIPA</strong>00069] */<br />

| 0x11 /* fipa.acl.rep.str<strong>in</strong>g.std [<strong>FIPA</strong>00070] */<br />

| 0x12. /* fipa.acl.rep.xml.std [<strong>FIPA</strong>00071] */<br />

Date = B<strong>in</strong>DateTimeToken.<br />

Comments = NullTerm<strong>in</strong>atedStr<strong>in</strong>g.<br />

PayloadLength = B<strong>in</strong>Number.<br />

PayloadEncod<strong>in</strong>g = NullTerm<strong>in</strong>atedStr<strong>in</strong>g.<br />

IntendedReceiver = <strong>Agent</strong>IdentifierSequence.<br />

<strong>Transport</strong>Behaviour = Any.<br />

UserDef<strong>in</strong>edACL<strong>Representation</strong><br />

= 0x00 NullTerm<strong>in</strong>atedStr<strong>in</strong>g.<br />

ReceivedObject = By<br />

Date<br />

[From]<br />

[Id]<br />

[Via]<br />

3


156<br />

157<br />

158<br />

159<br />

160<br />

161<br />

162<br />

163<br />

164<br />

165<br />

166<br />

167<br />

168<br />

169<br />

170<br />

171<br />

172<br />

173<br />

174<br />

175<br />

176<br />

177<br />

178<br />

179<br />

180<br />

181<br />

182<br />

183<br />

184<br />

185<br />

186<br />

187<br />

188<br />

189<br />

190<br />

191<br />

192<br />

193<br />

194<br />

195<br />

196<br />

197<br />

198<br />

199<br />

200<br />

201<br />

202<br />

203<br />

204<br />

205<br />

206<br />

207<br />

208<br />

209<br />

210<br />

211<br />

212<br />

213<br />

214<br />

215<br />

216<br />

217<br />

218<br />

219<br />

© 1996-2002 Foundation for Intelligent Physical <strong>Agent</strong>s <strong>FIPA</strong> AMT <strong>Envelope</strong> <strong>Representation</strong> <strong>in</strong> <strong>Bit</strong>-Efficient Encod<strong>in</strong>g<br />

By = URL.<br />

From = 0x02 URL.<br />

(UserDef<strong>in</strong>edParameter)*<br />

EndOfCollection.<br />

Id = 0x03 NullTerm<strong>in</strong>atedStr<strong>in</strong>g.<br />

Via = 0x04 NullTerm<strong>in</strong>atedStr<strong>in</strong>g.<br />

B<strong>in</strong>Number = Digits. /* See comment 4 (Section 2.4) */<br />

Digits = CodedNumber+.<br />

NullTerm<strong>in</strong>atedStr<strong>in</strong>g = Str<strong>in</strong>g 0x00.<br />

UserDef<strong>in</strong>edParameter = 0x00 Keyword NullTerm<strong>in</strong>atedStr<strong>in</strong>g.<br />

KeyWord = NullTerm<strong>in</strong>atedStr<strong>in</strong>g.<br />

Any = 0x14 NullTerm<strong>in</strong>atedStr<strong>in</strong>g<br />

| ByteLenEncoded.<br />

ByteLenEncoded = 0x16 Len8 ByteSequence<br />

| 0x17 Len16 ByteSequence<br />

| 0x19 Len32 ByteSequence.<br />

ByteSequence = Byte*.<br />

<strong>Agent</strong>IdentifierSequence = (<strong>Agent</strong>Identifier)* EndOfCollection.<br />

<strong>Agent</strong>Identifier = 0x02 <strong>Agent</strong>Name<br />

[Addresses]<br />

[Resolvers]<br />

(UserDef<strong>in</strong>edParameter)*<br />

EndOfCollection.<br />

<strong>Agent</strong>Name = NullTerm<strong>in</strong>atedStr<strong>in</strong>g.<br />

Addresses = 0x02 UrlSequence.<br />

Resolvers = 0x03 <strong>Agent</strong>IdentifierSequence.<br />

UserDef<strong>in</strong>edParameter = 0x05 NullTerm<strong>in</strong>atedStr<strong>in</strong>g Any.<br />

UrlSequence = (URL)* EndOfCollection.<br />

URL = NullTerm<strong>in</strong>atedStr<strong>in</strong>g.<br />

Str<strong>in</strong>gSequence = (NullTerm<strong>in</strong>atedStr<strong>in</strong>g)* EndOfCollection.<br />

B<strong>in</strong>DateTimeToken = 0x20 B<strong>in</strong>Date /* Absolute time */<br />

| 0x21 B<strong>in</strong>Date /* Relative time (+) */<br />

| 0x22 B<strong>in</strong>Date /* Relative time (-) */<br />

| 0x24 B<strong>in</strong>Date TypeDesignator /* Absolute time */<br />

| 0x25 B<strong>in</strong>Date TypeDesignator. /* Relative time (+) */<br />

| 0x26 B<strong>in</strong>Date TypeDesignator. /* Relative time (-) */<br />

B<strong>in</strong>Date = Year Month Day Hour M<strong>in</strong>ute Second Millisecond.<br />

/* See comment 3 (Section 2.4) */<br />

EndOfCollection = 0x01.<br />

EmptyLen16 = 0x00 0x00.<br />

4


220<br />

221<br />

222<br />

223<br />

224<br />

225<br />

226<br />

227<br />

228<br />

229<br />

230<br />

231<br />

232<br />

233<br />

234<br />

235<br />

236<br />

237<br />

238<br />

239<br />

240<br />

241<br />

242<br />

243<br />

244<br />

245<br />

246<br />

247<br />

248<br />

249<br />

250<br />

251<br />

252<br />

253<br />

254<br />

255<br />

256<br />

257<br />

258<br />

259<br />

260<br />

261<br />

262<br />

263<br />

264<br />

265<br />

266<br />

267<br />

268<br />

269<br />

270<br />

271<br />

272<br />

© 1996-2002 Foundation for Intelligent Physical <strong>Agent</strong>s <strong>FIPA</strong> AMT <strong>Envelope</strong> <strong>Representation</strong> <strong>in</strong> <strong>Bit</strong>-Efficient Encod<strong>in</strong>g<br />

Len8 = Byte. /* See comment 6 (Section 2.4) */<br />

Len16 = Short. /* See comment 6 (Section 2.4) */<br />

Len32 = Long. /* See comment 6 (Section 2.4) */<br />

Year = Byte Byte.<br />

Month = Byte.<br />

Day = Byte.<br />

Hour = Byte.<br />

M<strong>in</strong>ute = Byte.<br />

Second = Byte.<br />

Millisecond = Byte Byte.<br />

Str<strong>in</strong>g = /* As <strong>in</strong> [<strong>FIPA</strong>00070] */<br />

CodedNumber = /* See comment 4 (Section 2.4) */<br />

TypeDesignator = /* As <strong>in</strong> [<strong>FIPA</strong>00070] */<br />

2.4 Notes on the Grammar Rules<br />

1. Normally, the length of an envelope does not exceed 65536 bytes (2^16). Therefore, only two bytes are reserved<br />

for envelope length (len16). However, the syntax also allows envelopes with greater lengths. In this case, the<br />

sender sets the reserved envelope length parameter (two bytes) to length zero and the follow<strong>in</strong>g four bytes are<br />

used to represent the real length (maximum envelope length is therefore 2^32 bytes).<br />

The length of the envelope comprises all the parts of the envelope, <strong>in</strong>clud<strong>in</strong>g the message identifier and the length<br />

parameter itself. The length of the envelope is expressed <strong>in</strong> the network byte order.<br />

2. The payload (ACL message) starts at the first byte after the Base<strong>Envelope</strong>. White space is allowed between the<br />

envelope and the ACL message only if the syntax of ACL allows this. For <strong>in</strong>stance, fipa.acl.rep.str<strong>in</strong>g.std<br />

allows white space, but fipa.acl.rep.bitefficient.std does not.<br />

3. Dates are coded as numbers, that is, four bits are reserved for each ASCII number (see comment 4 below).<br />

Information as to whether the type designator is present or not is coded <strong>in</strong>to an identifier byte. These parameters<br />

always have static length (two bytes for year and milliseconds, one byte for other components).<br />

4. Numbers are coded by reserv<strong>in</strong>g four bits for each digit <strong>in</strong> the number’s ASCII representation, that is, two ASCII<br />

numbers are coded <strong>in</strong>to one byte. Table 2 shows a 4-bit code for each number and special codes that may appear<br />

<strong>in</strong> ASCII coded numbers.<br />

If the ASCII presentation of a number conta<strong>in</strong>s an odd number of characters, the last four bits of the coded number<br />

are set to zero (the Padd<strong>in</strong>g token), otherwise an additional 0x00 byte is added to the end of the coded number. If<br />

the number to be coded is either an <strong>in</strong>teger, decimal number, or octal number, the identifier byte 0x12 is used. For<br />

hexadecimal numbers, the identifier byte 0x13 is used. Hexadecimal numbers are converted to <strong>in</strong>tegers before<br />

cod<strong>in</strong>g (the cod<strong>in</strong>g scheme does not allow characters from a through f to appear <strong>in</strong> number form).<br />

5


273<br />

274<br />

275<br />

276<br />

277<br />

278<br />

279<br />

280<br />

281<br />

282<br />

283<br />

© 1996-2002 Foundation for Intelligent Physical <strong>Agent</strong>s <strong>FIPA</strong> AMT <strong>Envelope</strong> <strong>Representation</strong> <strong>in</strong> <strong>Bit</strong>-Efficient Encod<strong>in</strong>g<br />

Token Code Token Code<br />

Padd<strong>in</strong>g 0000 7 1000<br />

0 0001 8 1001<br />

1 0010 9 1010<br />

2 0011 + 1100<br />

3 0100 E 1101<br />

4 0101 - 1110<br />

5 0110 . 1111<br />

6 0111<br />

Table 2: B<strong>in</strong>ary <strong>Representation</strong> of Number Tokens<br />

5. All envelope parameters def<strong>in</strong>ed <strong>in</strong> [<strong>FIPA</strong>00067] have a predef<strong>in</strong>ed code. If an envelope conta<strong>in</strong>s a user-def<strong>in</strong>ed<br />

parameter, an extension mechanism is used (byte 0x00). The names of the user-def<strong>in</strong>ed envelope parameters<br />

should have the prefix “X-CompanyName-”.<br />

6. Byte is a one-byte code word, Short is a short <strong>in</strong>teger (two bytes, network byte order) and Long is a long <strong>in</strong>teger<br />

(four bytes, network byte order).<br />

6


284<br />

285<br />

286<br />

287<br />

288<br />

289<br />

290<br />

291<br />

292<br />

293<br />

294<br />

295<br />

296<br />

© 1996-2002 Foundation for Intelligent Physical <strong>Agent</strong>s <strong>FIPA</strong> AMT <strong>Envelope</strong> <strong>Representation</strong> <strong>in</strong> <strong>Bit</strong>-Efficient Encod<strong>in</strong>g<br />

3 References<br />

[<strong>FIPA</strong>00067] <strong>FIPA</strong> <strong>Agent</strong> <strong>Message</strong> <strong>Transport</strong> Service Specification. Foundation for Intelligent Physical <strong>Agent</strong>s, 2000.<br />

http://www.fipa.org/specs/fipa00067/<br />

[<strong>FIPA</strong>00069] <strong>FIPA</strong> ACL <strong>Message</strong> <strong>Representation</strong> <strong>in</strong> <strong>Bit</strong>-Efficient Encod<strong>in</strong>g Specification. Foundation for Intelligent<br />

Physical <strong>Agent</strong>s, 2000.<br />

http://www.fipa.org/specs/fipa00069/<br />

[<strong>FIPA</strong>00070] <strong>FIPA</strong> ACL <strong>Message</strong> <strong>Representation</strong> <strong>in</strong> Str<strong>in</strong>g Specification. Foundation for Intelligent Physical <strong>Agent</strong>s,<br />

2000.<br />

http://www.fipa.org/specs/fipa00070/<br />

[<strong>FIPA</strong>00071] <strong>FIPA</strong> ACL <strong>Message</strong> <strong>Representation</strong> <strong>in</strong> XML Specification. Foundation for Intelligent Physical <strong>Agent</strong>s,<br />

2000.<br />

http://www.fipa.org/specs/fipa00071/<br />

7


297<br />

298<br />

299<br />

300<br />

301<br />

302<br />

303<br />

304<br />

305<br />

306<br />

307<br />

308<br />

309<br />

310<br />

311<br />

312<br />

313<br />

314<br />

315<br />

316<br />

317<br />

318<br />

319<br />

320<br />

321<br />

322<br />

323<br />

324<br />

325<br />

326<br />

327<br />

328<br />

329<br />

330<br />

331<br />

332<br />

333<br />

334<br />

335<br />

336<br />

337<br />

338<br />

339<br />

340<br />

341<br />

342<br />

343<br />

344<br />

345<br />

© 1996-2002 Foundation for Intelligent Physical <strong>Agent</strong>s <strong>FIPA</strong> AMT <strong>Envelope</strong> <strong>Representation</strong> <strong>in</strong> <strong>Bit</strong>-Efficient Encod<strong>in</strong>g<br />

4 Informative Annex A — Examples<br />

1. Here is a simple example of an envelope encoded us<strong>in</strong>g XML representation:<br />

<br />

<br />

<br />

<br />

<br />

receiver@foo.com<br />

<br />

http://foo.com/acc<br />

<br />

<br />

<br />

<br />

<br />

sender@bar.com<br />

<br />

http://bar.com/acc<br />

<br />

<br />

<br />

fipa.acl.rep.xml.std<br />

20000508T042651481<br />

<br />

<br />

<br />

<br />

<br />

<br />

<br />

Us<strong>in</strong>g the bit-efficient representation, the envelope becomes:<br />

0xfe 0x00 0x88 0x12 0x20 0x31 0x11 0x06 0x19 0x15 0x37 0x62 0x59 0x20 0x02 0x03 0x02<br />

‘r’ ‘e’ ‘c’ ‘e’ ‘i’ ‘v’ ‘e’ ‘r’ ‘@’ ‘f’ ‘o’ ‘o’ ‘.’ ‘c’ ‘o’ ‘m’ 0x00<br />

0x02 ‘h’ ‘t’ ‘t’ ‘p’ ‘:’ ‘/’ ‘/’ ‘f’ ‘o’ ‘o’ ‘.’ ‘c’ ‘o’ ‘m’ ‘/’ ‘a’<br />

‘c’ ‘c’ 0x00 0x01 0x01 0x02 ‘s’ ‘e’ ‘n’ ‘d’ ‘e’ ‘r’ ‘@’ ‘b’ ‘a’ ‘r’ ‘.’<br />

‘c’ ‘o’ ‘m’ 0x00 0x02 ‘h’ ‘t’ ‘t’ ‘p’ ‘:’ ‘/’ ‘/’ ‘b’ ‘a’ ‘r’ ‘.’ ‘c’<br />

‘o’ ‘m’ ‘/’ ‘a’ ‘c’ ‘c’ 0x00 0x01 0x01 0x0a ‘h’ ‘t’ ‘t’ ‘p’ ‘:’ ‘/’ ‘/’<br />

‘b’ ‘a’ ‘r’ ‘.’ ‘c’ ‘o’ ‘m’ ‘/’ ‘a’ ‘c’ ‘c’ 0x00 0x20 0x31 0x11 0x06 0x19<br />

0x15 0x37 0x62 0x59 0x20 0x03 ‘1’ ‘2’ ‘3’ ‘4’ ‘5’ ‘6’ ‘7’ ‘8’ ‘9’ 0x00 0x01<br />

The length of the orig<strong>in</strong>al message is about 584 bytes and the encoded result is 136 bytes giv<strong>in</strong>g a compression<br />

ratio of about 4:1.<br />

8


346<br />

347<br />

348<br />

349<br />

350<br />

351<br />

352<br />

353<br />

354<br />

355<br />

356<br />

357<br />

358<br />

359<br />

360<br />

361<br />

362<br />

363<br />

364<br />

365<br />

366<br />

367<br />

368<br />

369<br />

370<br />

371<br />

372<br />

373<br />

374<br />

375<br />

376<br />

377<br />

378<br />

379<br />

380<br />

381<br />

382<br />

383<br />

384<br />

385<br />

386<br />

387<br />

388<br />

389<br />

390<br />

391<br />

392<br />

393<br />

394<br />

395<br />

396<br />

397<br />

398<br />

399<br />

400<br />

401<br />

402<br />

403<br />

404<br />

405<br />

406<br />

407<br />

408<br />

409<br />

© 1996-2002 Foundation for Intelligent Physical <strong>Agent</strong>s <strong>FIPA</strong> AMT <strong>Envelope</strong> <strong>Representation</strong> <strong>in</strong> <strong>Bit</strong>-Efficient Encod<strong>in</strong>g<br />

2. Here is an example that covers all aspects of an envelope.<br />

<br />

<br />

<br />

<br />

<br />

receiver@foo.com<br />

<br />

http://foo.com/acc<br />

<br />

<br />

<br />

resolver@bar.com<br />

<br />

http://bar.com/acc1<br />

http://bar.com/acc2<br />

http://bar.com/acc3<br />

<br />

<br />

<br />

<br />

<br />

<br />

<br />

sender@bar.com<br />

<br />

http://bar.com/acc<br />

<br />

<br />

<br />

resolver@foobar.com<br />

<br />

http://foobar.com/acc1<br />

http://foobar.com/acc2<br />

http://foobar.com/acc3<br />

<br />

<br />

<br />

<br />

<br />

No comments!<br />

fipa.acl.rep.xml.std<br />

US-ASCII<br />

20000508T042651481<br />

<br />

<br />

<strong>in</strong>tendedreceiver@foobar.com<br />

<br />

http://foobar.com/acc1<br />

http://foobar.com/acc2<br />

http://foobar.com/acc3<br />

<br />

<br />

<br />

resolver@foobar.com<br />

<br />

http://foobar.com/acc1<br />

9


410<br />

411<br />

412<br />

413<br />

414<br />

415<br />

416<br />

417<br />

418<br />

419<br />

420<br />

421<br />

422<br />

423<br />

424<br />

425<br />

426<br />

427<br />

428<br />

429<br />

430<br />

431<br />

432<br />

433<br />

434<br />

435<br />

436<br />

437<br />

438<br />

439<br />

440<br />

441<br />

442<br />

443<br />

444<br />

445<br />

446<br />

447<br />

448<br />

449<br />

450<br />

451<br />

452<br />

453<br />

454<br />

455<br />

456<br />

457<br />

458<br />

459<br />

460<br />

461<br />

462<br />

463<br />

464<br />

465<br />

466<br />

467<br />

468<br />

469<br />

470<br />

471<br />

© 1996-2002 Foundation for Intelligent Physical <strong>Agent</strong>s <strong>FIPA</strong> AMT <strong>Envelope</strong> <strong>Representation</strong> <strong>in</strong> <strong>Bit</strong>-Efficient Encod<strong>in</strong>g<br />

http://foobar.com/acc2<br />

http://foobar.com/acc3<br />

<br />

<br />

<br />

resolver@foobar.com<br />

<br />

http://foobar.com/acc1<br />

http://foobar.com/acc2<br />

http://foobar.com/acc3<br />

<br />

<br />

<br />

<br />

<br />

<br />

<br />

<br />

<br />

<br />

<br />

<br />

<br />

<br />

<br />

<br />

Us<strong>in</strong>g the bit-efficient representation, the envelope becomes:<br />

0xfe 0x01 0xdb 0x12 0x20 0x31 0x11 0x06 0x19 0x15 0x37 0x62 0x59 0x20 0x02 0x02 ‘r’<br />

‘e’ ‘c’ ‘e’ ‘i’ ‘v’ ‘e’ ‘r’ ‘@’ ‘f’ ‘o’ ‘o’ ‘.’ ‘c’ ‘o’ ‘m’ 0x00 0x02<br />

‘h’ ‘t’ ‘t’ ‘p’ ‘:’ ‘/’ ‘/’ ‘f’ ‘o’ ‘o’ ‘.’ ‘c’ ‘o’ ‘m’ ‘/’ ‘a’ ‘c’<br />

‘c’ 0x00 0x01 0x03 0x02 ‘s’ ‘e’ ‘n’ ‘d’ ‘e’ ‘r’ ‘@’ ‘b’ ‘a’ ‘r’ ‘.’ ‘c’<br />

‘o’ ‘m’ 0x00 0x02 ‘h’ ‘t’ ‘t’ ‘p’ ‘:’ ‘/’ ‘/’ ‘b’ ‘a’ ‘r’ ‘.’ ‘c’ ‘o’<br />

‘m’ ‘/’ ‘a’ ‘c’ ‘c’ 0x00 0x01 0x07 ‘U’ ‘S’ ‘-’ ‘A’ ‘S’ ‘C’ ‘I’ ‘I’ 0x00<br />

0x01 0x09 0x02 ‘i’ ‘n’ ‘t’ ‘e’ ‘n’ ‘d’ ‘e’ ‘d’ ‘r’ ‘e’ ‘c’ ‘e’ ‘i’ ‘v’<br />

‘e’ ‘r’ ‘@’ ‘f’ ‘o’ ‘o’ ‘b’ ‘a’ ‘r’ ‘.’ ‘c’ ‘o’ ‘m’ 0x00 0x02 ‘h’ ‘t’<br />

‘t’ ‘p’ ‘:’ ‘/’ ‘/’ ‘f’ ‘o’ ‘o’ ‘b’ ‘a’ ‘r’ ‘.’ ‘c’ ‘o’ ‘m’ ‘/’ ‘a’<br />

‘c’ ‘c’ ‘1’ 0x00 ‘h’ ‘t’ ‘t’ ‘p’ ‘:’ ‘/’ ‘/’ ‘f’ ‘o’ ‘o’ ‘b’ ‘a’ ‘r’<br />

‘.’ ‘c’ ‘o’ ‘m’ ‘/’ ‘a’ ‘c’ ‘c’ ‘2’ 0x00 ‘h’ ‘t’ ‘t’ ‘p’ ‘:’ ‘/’ ‘/’<br />

‘f’ ‘o’ ‘o’ ‘b’ ‘a’ ‘r’ ‘.’ ‘c’ ‘o’ ‘m’ ‘/’ ‘a’ ‘c’ ‘c’ ‘3’ 0x00 0x01<br />

0x03 0x02 ‘r’ ‘e’ ‘s’ ‘o’ ‘l’ ‘v’ ‘e’ ‘r’ ‘@’ ‘f’ ‘o’ ‘o’ ‘b’ ‘a’ ‘r’<br />

‘.’ ‘c’ ‘o’ ‘m’ 0x00 0x02 ‘h’ ‘t’ ‘t’ ‘p’ ‘:’ ‘/’ ‘/’ ‘f’ ‘o’ ‘o’ ‘b’<br />

‘a’ ‘r’ ‘.’ ‘c’ ‘o’ ‘m’ ‘/’ ‘a’ ‘c’ ‘c’ ‘1’ 0x00 ‘h’ ‘t’ ‘t’ ‘p’ ‘:’<br />

‘/’ ‘/’ ‘f’ ‘o’ ‘o’ ‘b’ ‘a’ ‘r’ ‘.’ ‘c’ ‘o’ ‘m’ ‘/’ ‘a’ ‘c’ ‘c’ ‘2’<br />

0x00 ‘h’ ‘t’ ‘t’ ‘p’ ‘:’ ‘/’ ‘/’ ‘f’ ‘o’ ‘o’ ‘b’ ‘a’ ‘r’ ‘.’ ‘c’ ‘o’<br />

‘m’ ‘/’ ‘a’ ‘c’ ‘c’ ‘3’ 0x00 0x01 0x03 0x02 ‘r’ ‘e’ ‘s’ ‘o’ ‘l’ ‘v’ ‘e’<br />

‘r’ ‘@’ ‘f’ ‘o’ ‘o’ ‘b’ ‘a’ ‘r’ ‘.’ ‘c’ ‘o’ ‘m’ 0x00 0x02 ‘h’ ‘t’ ‘t’<br />

‘p’ ‘:’ ‘/’ ‘/’ ‘f’ ‘o’ ‘o’ ‘b’ ‘a’ ‘r’ ‘.’ ‘c’ ‘o’ ‘m’ ‘/’ ‘a’ ‘c’<br />

‘c’ ‘1’ 0x00 ‘h’ ‘t’ ‘t’ ‘p’ ‘:’ ‘/’ ‘/’ ‘f’ ‘o’ ‘o’ ‘b’ ‘a’ ‘r’ ‘.’<br />

‘c’ ‘o’ ‘m’ ‘/’ ‘a’ ‘c’ ‘c’ ‘2’ 0x00 ‘h’ ‘t’ ‘t’ ‘p’ ‘:’ ‘/’ ‘/’ ‘f’<br />

‘o’ ‘o’ ‘b’ ‘a’ ‘r’ ‘.’ ‘c’ ‘o’ ‘m’ ‘/’ ‘a’ ‘c’ ‘c’ ‘3’ 0x00 0x01 0x01<br />

0x0a ‘h’ ‘t’ ‘t’ ‘p’ ‘:’ ‘/’ ‘/’ ‘f’ ‘o’ ‘o’ ‘.’ ‘c’ ‘o’ ‘m’ ‘/’ ‘a’<br />

‘c’ ‘c’ 0x00 0x20 0x31 0x11 0x06 0x19 0x15 0x37 0x62 0x59 0x20 0x02 ‘h’ ‘t’ ‘t’<br />

‘p’ ‘:’ ‘/’ ‘/’ ‘f’ ‘o’ ‘o’ ‘b’ ‘a’ ‘r’ ‘.’ ‘c’ ‘o’ ‘m’ ‘/’ ‘a’ ‘c’<br />

‘c’ 0x00 0x03 ‘1’ ‘2’ ‘3’ ‘4’ ‘5’ ‘6’ ‘7’ ‘8’ ‘9’ 0x00 0x01 0x01 0x04 ‘h’<br />

‘t’ ‘t’ ‘p’ ‘:’ ‘/’ ‘/’ ‘b’ ‘a’ ‘r’ ‘.’ ‘c’ ‘o’ ‘m’ ‘/’ ‘a’ ‘c’ ‘c’<br />

0x00 0x01<br />

10


472<br />

473<br />

474<br />

© 1996-2002 Foundation for Intelligent Physical <strong>Agent</strong>s <strong>FIPA</strong> AMT <strong>Envelope</strong> <strong>Representation</strong> <strong>in</strong> <strong>Bit</strong>-Efficient Encod<strong>in</strong>g<br />

The length of the orig<strong>in</strong>al message is about 2360 bytes and the encoded result is 475 bytes giv<strong>in</strong>g a compression<br />

ratio of about 5:1.<br />

11


475<br />

476<br />

477<br />

478<br />

479<br />

480<br />

481<br />

482<br />

483<br />

484<br />

485<br />

© 1996-2002 Foundation for Intelligent Physical <strong>Agent</strong>s <strong>FIPA</strong> AMT <strong>Envelope</strong> <strong>Representation</strong> <strong>in</strong> <strong>Bit</strong>-Efficient Encod<strong>in</strong>g<br />

5 Informative Annex B — ChangeLog<br />

5.1 2002/11/01 - version C by TC X2S<br />

Entire document: Removed encrypted field<br />

Page 4, l<strong>in</strong>e 159: Added optional UserDef<strong>in</strong>edParameter to the ReceivedObject<br />

Page 4, l<strong>in</strong>e 202: Changed the identifier byte of the UserDef<strong>in</strong>edParameter from 0x04 to 0x05<br />

Page 4, l<strong>in</strong>e 210: Added signs to B<strong>in</strong>DateTimeToken<br />

Page 7, l<strong>in</strong>es 281-464: Moved Section 3 to Informative Annex A<br />

5.2 2002/12/03 - version D by <strong>FIPA</strong> Architecture Board<br />

Entire document: Promoted to Standard status<br />

12

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!