|
fipa_acl
1.4
|
Allows to parse a bytestream that conforms to the bitefficient representation of FIPA messages to a ACLMessage. More...
#include <bitefficient_message_parser.h>
Inherits fipa::acl::MessageParserImplementation.
Public Member Functions | |
| bool | parseData (const std::string &storage, ACLMessage &msg) |
| parses a correctly encoded message according to grammar_bitefficient.h and creates a Message object for internal use More... | |
| bool | buildMessage (const Message &parsedMsg, ACLMessage &msg) |
| creates an unpopulated message object and passes it around to have its fields populated, along with the parsed message where the data is extracted from More... | |
Allows to parse a bytestream that conforms to the bitefficient representation of FIPA messages to a ACLMessage.
Given a bytestream that conforms to the FIPA Standard for the bitefficient representation of messages, this class can be used to parse this stream into a ACLMessage. The parsing makes extensive use of the boost::spirit library, a library whose contribution we want to acknowledge here. The Spirit library has been used to define the grammar and the underlying parser, i.e. the core of this library.
Internals: Since the parser works with a number of customized data structures to facilitate parsing, a number of function have been implemented in order to perform the conversion to the datastructure required for a ACLMessage. Yet (by August 2010), we haven't done any performance evaluation of the library.
Definition at line 43 of file bitefficient_message_parser.h.
| bool fipa::acl::BitefficientMessageParser::buildMessage | ( | const Message & | parsedMsg, |
| ACLMessage & | msg | ||
| ) |
creates an unpopulated message object and passes it around to have its fields populated, along with the parsed message where the data is extracted from
| parsedMsg | The (intermediate) message from the spirit parser |
| msg | The (final) ACLMessage to be filled with the parsed data |
Definition at line 40 of file bitefficient_message_parser.cpp.
|
virtual |
parses a correctly encoded message according to grammar_bitefficient.h and creates a Message object for internal use
| storage | Array of bytes that represent the bitefficient FIPA encoded message |
| msg | The message extracted from the data |
Reimplemented from fipa::acl::MessageParserImplementation.
Definition at line 21 of file bitefficient_message_parser.cpp.
1.8.6