fipa_acl  1.4
bitefficient_message_format.h
Go to the documentation of this file.
1 #ifndef FIPA_ACL_BITEFFICIENT_FORMATTER_H
2 #define FIPA_ACL_BITEFFICIENT_FORMATTER_H
3 
4 #include <fipa_acl/message_generator/message_format.h>
5 
6 namespace fipa {
7 namespace acl {
8 
10 {
11 public:
13 
18  std::string apply(const ACLMessage& msg) const;
19 
30  std::string getBitAID(const AgentID& aid, int depth) const;
31 
35  std::string getBitHeader() const;
36 
40  char getBitMessageID() const;
41 
46  char getBitMessageVersion() const;
47 
53  std::string getBitMessageType(const ACLMessage& msg) const;
54 
59  std::string getBitBinWord(const std::string& sword) const;
60 
64  std::string getBitMessageParameters(const ACLMessage& msg) const;
65 
69  std::string getBitPredefMessageParams(const ACLMessage& msg) const;
70 
74  std::string getBitUserdefMessageParams(const ACLMessage& msg) const;
75 
81  std::string getBitUserdefParams(const std::vector<UserdefParam>& params) const;
82 
87  std::string bitParseParam(const UserdefParam&) const;
88 
92  std::string getBinURLCol(const std::vector<std::string>&) const;
93 
97  std::string getBitResolvers(const std::vector<AgentID>& aids,int depth) const;
98 
103  std::string getBitAIDColl(const std::vector<AgentID>& aids, int depth) const;
104 
111  std::string getBitBinExpression(const std::string& sword,char c) const;
112 
116  std::string getBitBinExpression(double n,char base) const;
117 
122  std::string getBitBinNumber(double n,char base) const;
123 
128  std::string getByteLengthEncodedString(const std::string& sword) const;
129 
134  std::string getBitBinString(const std::string& sword) const;
135 
139  std::string getBitDigits(const std::string& dig) const;
140 
141 };
142 
143 } // end namespace acl
144 } // end namespace fipa
145 
146 #endif // FIPA_ACL_BITEFFICIENT_FORMATTER_H
std::string getBitBinString(const std::string &sword) const
implements the binary string production; functionality not complete as code tables are not yet implem...
std::string apply(const ACLMessage &msg) const
char getBitMessageID() const
depending on the flags it sets the ID
Abstract class which should be implemented by a specific format to encode an ACLMessage according to ...
std::string bitParseParam(const UserdefParam &) const
parses one user defined parameter the specification does not differentiate at this level between mess...
std::string getBitDigits(const std::string &dig) const
std::string getBitUserdefParams(const std::vector< UserdefParam > &params) const
parses a set of user defined parameters; different from the getBitUserdefMessageParams() method in th...
char getBitMessageVersion() const
gets the message version in one byte the message version has a very specific format: digit+dot+digit ...
std::string getBitBinWord(const std::string &sword) const
quite frequently used production; currently it does not have complete functionality: the code tables ...
std::string getBitMessageParameters(const ACLMessage &msg) const
puts together all the message parameters
std::string getBitResolvers(const std::vector< AgentID > &aids, int depth) const
basically a wrapper function of the getBitAIDColl(), to add the required specific flag ...
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 tur...
std::string getBinURLCol(const std::vector< std::string > &) const
currently used to encode the addresses of the AgentID instances(strings)
This class provides a representation of a message conforming to the FIPA specification SC00061...
Definition: acl_message.h:55
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 mod...
std::string getBitPredefMessageParams(const ACLMessage &msg) const
checks all predefined message parameters whether they are set or not and it encodes them accordingly ...
std::string getBitAID(const AgentID &aid, int depth) const
encodes an AgentID instance
overloaded equality operator for UserdefParam class objects
Definition: userdef_param.h:25
std::string getBitHeader() const
puts the header toghether
std::string getByteLengthEncodedString(const std::string &sword) const
std::string getBitUserdefMessageParams(const ACLMessage &msg) const
Implements the general AgentID functionality, which is present throughout the fipa specifications(FIP...
Definition: agent_id.h:37
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...
std::string getBitMessageType(const ACLMessage &msg) const
encodes the message performative; it compares the string of the message performative to all the prede...