|
fipa_acl
1.4
|
#include <bitefficient_message_format.h>
Inherits fipa::acl::MessageFormat.
Public Member Functions | |
| virtual | ~BitefficientMessageFormat () |
| std::string | apply (const ACLMessage &msg) const |
| std::string | getBitAID (const AgentID &aid, int depth) const |
| encodes an AgentID instance More... | |
| std::string | getBitHeader () const |
| puts the header toghether More... | |
| char | getBitMessageID () const |
| depending on the flags it sets the ID More... | |
| char | getBitMessageVersion () const |
| gets the message version in one byte the message version has a very specific format: digit+dot+digit More... | |
| std::string | getBitMessageType (const ACLMessage &msg) const |
| encodes the message performative; it compares the string of the message performative to all the predefined ones; if it is one of them it returns accordingly if not it returns the custom performative More... | |
| std::string | getBitBinWord (const std::string &sword) const |
| quite frequently used production; currently it does not have complete functionality: the code tables need to be implemented in order to use them More... | |
| std::string | getBitMessageParameters (const ACLMessage &msg) const |
| puts together all the message parameters More... | |
| std::string | getBitPredefMessageParams (const ACLMessage &msg) const |
| checks all predefined message parameters whether they are set or not and it encodes them accordingly More... | |
| std::string | getBitUserdefMessageParams (const ACLMessage &msg) const |
| std::string | getBitUserdefParams (const std::vector< UserdefParam > ¶ms) const |
| parses a set of user defined parameters; different from the getBitUserdefMessageParams() method in that there is more general; the former is to be called only for message parameters; difference was imposed by the specification More... | |
| std::string | bitParseParam (const UserdefParam &) const |
| parses one user defined parameter the specification does not differentiate at this level between message parameters and other kinds so this method is called by both More... | |
| std::string | getBinURLCol (const std::vector< std::string > &) const |
| currently used to encode the addresses of the AgentID instances(strings) More... | |
| std::string | getBitResolvers (const std::vector< AgentID > &aids, int depth) const |
| basically a wrapper function of the getBitAIDColl(), to add the required specific flag More... | |
| std::string | getBitAIDColl (const std::vector< AgentID > &aids, int depth) const |
| parses a set of AgentID instances the resolvers depth variable that is being passed around is not modified in this function More... | |
| std::string | getBitBinExpression (const std::string &sword, char c) const |
| implements the binary expression production of the grammar; not complete(w.r.t. the specification) in functionality implementing the messages without the rest of the architecture makes it difficult to anticipate when and how some productions may/will be used so only a few of the productions were implemented(for the binary expression) and the char parameter was added to choose between them, as no other decission maker/constraint was identified More... | |
| std::string | getBitBinExpression (double n, char base) const |
| overloaded version of the above function More... | |
| std::string | getBitBinNumber (double n, char base) const |
| parses a number according to the specification(see comment 9 of the specification) for ease it is turned into a string and passed on More... | |
| std::string | getByteLengthEncodedString (const std::string &sword) const |
| std::string | getBitBinString (const std::string &sword) const |
| implements the binary string production; functionality not complete as code tables are not yet implemented the second argument is an explicit option for codeTables(needed for the getBitBinExpression() ) More... | |
| std::string | getBitDigits (const std::string &dig) const |
Definition at line 9 of file bitefficient_message_format.h.
|
inlinevirtual |
Definition at line 12 of file bitefficient_message_format.h.
|
virtual |
Applies the format to the message
Implements fipa::acl::MessageFormat.
Definition at line 25 of file bitefficient_message_format.cpp.
| std::string fipa::acl::BitefficientMessageFormat::bitParseParam | ( | const UserdefParam & | p | ) | const |
parses one user defined parameter the specification does not differentiate at this level between message parameters and other kinds so this method is called by both
Definition at line 244 of file bitefficient_message_format.cpp.
| std::string fipa::acl::BitefficientMessageFormat::getBinURLCol | ( | const std::vector< std::string > & | adrr | ) | const |
currently used to encode the addresses of the AgentID instances(strings)
Definition at line 267 of file bitefficient_message_format.cpp.
| std::string fipa::acl::BitefficientMessageFormat::getBitAID | ( | const AgentID & | aid, |
| int | depth | ||
| ) | const |
encodes an AgentID instance
as some fields are optional the method first checks for their existance it also keeps record of the res_depth
| aid | AgentID object pointer to be encoded |
| depth | depth of the resolver tree to be encoded |
Definition at line 250 of file bitefficient_message_format.cpp.
| std::string fipa::acl::BitefficientMessageFormat::getBitAIDColl | ( | const std::vector< AgentID > & | aids, |
| int | depth | ||
| ) | const |
parses a set of AgentID instances the resolvers depth variable that is being passed around is not modified in this function
Definition at line 283 of file bitefficient_message_format.cpp.
| std::string fipa::acl::BitefficientMessageFormat::getBitBinExpression | ( | const std::string & | sword, |
| char | c | ||
| ) | const |
implements the binary expression production of the grammar; not complete(w.r.t. the specification) in functionality implementing the messages without the rest of the architecture makes it difficult to anticipate when and how some productions may/will be used so only a few of the productions were implemented(for the binary expression) and the char parameter was added to choose between them, as no other decission maker/constraint was identified
Definition at line 297 of file bitefficient_message_format.cpp.
| std::string fipa::acl::BitefficientMessageFormat::getBitBinExpression | ( | double | n, |
| char | base | ||
| ) | const |
overloaded version of the above function
Definition at line 313 of file bitefficient_message_format.cpp.
| std::string fipa::acl::BitefficientMessageFormat::getBitBinNumber | ( | double | n, |
| char | base | ||
| ) | const |
parses a number according to the specification(see comment 9 of the specification) for ease it is turned into a string and passed on
Definition at line 318 of file bitefficient_message_format.cpp.
| std::string fipa::acl::BitefficientMessageFormat::getBitBinString | ( | const std::string & | sword | ) | const |
implements the binary string production; functionality not complete as code tables are not yet implemented the second argument is an explicit option for codeTables(needed for the getBitBinExpression() )
Definition at line 332 of file bitefficient_message_format.cpp.
| std::string fipa::acl::BitefficientMessageFormat::getBitBinWord | ( | const std::string & | sword | ) | const |
quite frequently used production; currently it does not have complete functionality: the code tables need to be implemented in order to use them
Definition at line 124 of file bitefficient_message_format.cpp.
| std::string fipa::acl::BitefficientMessageFormat::getBitDigits | ( | const std::string & | dig | ) | const |
Get bitefficient representation of digits
| std::string fipa::acl::BitefficientMessageFormat::getBitHeader | ( | ) | const |
puts the header toghether
Definition at line 73 of file bitefficient_message_format.cpp.
| char fipa::acl::BitefficientMessageFormat::getBitMessageID | ( | ) | const |
depending on the flags it sets the ID
Definition at line 83 of file bitefficient_message_format.cpp.
| std::string fipa::acl::BitefficientMessageFormat::getBitMessageParameters | ( | const ACLMessage & | msg | ) | const |
puts together all the message parameters
Definition at line 134 of file bitefficient_message_format.cpp.
| std::string fipa::acl::BitefficientMessageFormat::getBitMessageType | ( | const ACLMessage & | msg | ) | const |
encodes the message performative; it compares the string of the message performative to all the predefined ones; if it is one of them it returns accordingly if not it returns the custom performative
Definition at line 102 of file bitefficient_message_format.cpp.
| char fipa::acl::BitefficientMessageFormat::getBitMessageVersion | ( | ) | const |
gets the message version in one byte the message version has a very specific format: digit+dot+digit
Definition at line 96 of file bitefficient_message_format.cpp.
| std::string fipa::acl::BitefficientMessageFormat::getBitPredefMessageParams | ( | const ACLMessage & | msg | ) | const |
checks all predefined message parameters whether they are set or not and it encodes them accordingly
Content added at higher level to minimize copies of large content objects
Definition at line 141 of file bitefficient_message_format.cpp.
| std::string fipa::acl::BitefficientMessageFormat::getBitResolvers | ( | const std::vector< AgentID > & | aids, |
| int | depth | ||
| ) | const |
basically a wrapper function of the getBitAIDColl(), to add the required specific flag
Definition at line 278 of file bitefficient_message_format.cpp.
| std::string fipa::acl::BitefficientMessageFormat::getBitUserdefMessageParams | ( | const ACLMessage & | msg | ) | const |
parses all the user defined parameters of the message if any
Definition at line 212 of file bitefficient_message_format.cpp.
| std::string fipa::acl::BitefficientMessageFormat::getBitUserdefParams | ( | const std::vector< UserdefParam > & | params | ) | const |
parses a set of user defined parameters; different from the getBitUserdefMessageParams() method in that there is more general; the former is to be called only for message parameters; difference was imposed by the specification
Definition at line 234 of file bitefficient_message_format.cpp.
| std::string fipa::acl::BitefficientMessageFormat::getByteLengthEncodedString | ( | const std::string & | sword | ) | const |
Retrieve the byte length encoded string for the given word
| sword | String containing the data to convert |
Definition at line 292 of file bitefficient_message_format.cpp.
1.8.13